Search in sources :

Example 26 with ModelVetoException

use of com.sun.jdo.api.persistence.model.ModelVetoException in project Payara by payara.

the class MappingTableElementImpl method addReferencingKey.

/**
 * Adds a referencing key to the list of keys in this mapping table.
 * @param referencingKey referencing key element to be added
 * @exception ModelException if impossible
 */
public void addReferencingKey(MappingReferenceKeyElement referencingKey) throws ModelException {
    try {
        fireVetoableChange(PROP_REFERENCING_KEYS, null, null);
        getReferencingKeys().add(referencingKey);
        firePropertyChange(PROP_REFERENCING_KEYS, null, null);
    } catch (PropertyVetoException e) {
        throw new ModelVetoException(e);
    }
}
Also used : PropertyVetoException(java.beans.PropertyVetoException) ModelVetoException(com.sun.jdo.api.persistence.model.ModelVetoException)

Aggregations

ModelVetoException (com.sun.jdo.api.persistence.model.ModelVetoException)26 PropertyVetoException (java.beans.PropertyVetoException)24 ModelException (com.sun.jdo.api.persistence.model.ModelException)4 ArrayList (java.util.ArrayList)2 MappingTableElement (com.sun.jdo.api.persistence.model.mapping.MappingTableElement)1