Class PersistenceElementImpl
java.lang.Object
com.sun.jdo.api.persistence.model.jdo.impl.PersistenceElementImpl
- All Implemented Interfaces:
PersistenceElement.Impl,PersistenceElementProperties
- Direct Known Subclasses:
PersistenceClassElementImpl,PersistenceMemberElementImpl
public abstract class PersistenceElementImpl
extends Object
implements PersistenceElement.Impl, PersistenceElementProperties
- Version:
- %I%
- Author:
- raccah
-
Field Summary
Fields inherited from interface com.sun.jdo.api.persistence.model.jdo.PersistenceElement.Impl
ADD, REMOVE, SETFields inherited from interface com.sun.jdo.api.persistence.model.jdo.PersistenceElementProperties
PROP_CARDINALITY, PROP_COLLECTION_CLASS, PROP_DELETE_ACTION, PROP_ELEMENT_CLASS, PROP_FIELDS, PROP_GROUPS, PROP_IDENTITY, PROP_INVERSE_FIELD, PROP_KEY_CLASS, PROP_KEY_FIELD, PROP_MODIFIED, PROP_NAME, PROP_PERSISTENCE, PROP_PREFETCH, PROP_SENSITIVITY, PROP_UPDATE_ACTION -
Constructor Summary
ConstructorsConstructorDescriptionCreate new PersistenceElementImpl with no corresponding name.PersistenceElementImpl(String name) Creates new PersistenceElementImpl with the corresponding name -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a property change listener.voidAdd a vetoable change listener.voidattachToElement(PersistenceElement element) Called to attach the implementation to a specific element.protected voidfirePropertyChange(String name, Object o, Object n) Fires property change event.protected voidfireVetoableChange(String name, Object o, Object n) Fires vetoable change event.getName()Get the name of this persistence element.voidRemove a property change listener.voidRemove a vetoable change listener.voidSet the name of this persistence element.
-
Constructor Details
-
PersistenceElementImpl
public PersistenceElementImpl()Create new PersistenceElementImpl with no corresponding name. This constructor should only be used for cloning and archiving. -
PersistenceElementImpl
Creates new PersistenceElementImpl with the corresponding name- Parameters:
name- the name of the element
-
-
Method Details
-
attachToElement
Called to attach the implementation to a specific element. Will be called in the element's constructor. Allows implementors of this interface to store a reference to the holder class, useful for implementing the property change listeners.- Specified by:
attachToElementin interfacePersistenceElement.Impl- Parameters:
element- the element to attach to
-
firePropertyChange
Fires property change event.- Parameters:
name- property nameo- old valuen- new value
-
addPropertyChangeListener
Add a property change listener.- Specified by:
addPropertyChangeListenerin interfacePersistenceElement.Impl- Parameters:
l- the listener to add
-
removePropertyChangeListener
Remove a property change listener.- Specified by:
removePropertyChangeListenerin interfacePersistenceElement.Impl- Parameters:
l- the listener to remove
-
fireVetoableChange
Fires vetoable change event.- Parameters:
name- property nameo- old valuen- new value- Throws:
PropertyVetoException- when the change is vetoed by a listener
-
addVetoableChangeListener
Add a vetoable change listener.- Specified by:
addVetoableChangeListenerin interfacePersistenceElement.Impl- Parameters:
l- the listener to add
-
removeVetoableChangeListener
Remove a vetoable change listener.- Specified by:
removeVetoableChangeListenerin interfacePersistenceElement.Impl- Parameters:
l- the listener to remove
-
getName
Get the name of this persistence element.- Specified by:
getNamein interfacePersistenceElement.Impl- Returns:
- the name
-
setName
Set the name of this persistence element.- Specified by:
setNamein interfacePersistenceElement.Impl- Parameters:
name- the name- Throws:
ModelException- if impossible
-