public abstract class PersistenceElementImpl extends Object implements PersistenceElement.Impl, PersistenceElementProperties
ADD, REMOVE, SET
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 and Description |
---|
PersistenceElementImpl()
Create new PersistenceElementImpl with no corresponding name.
|
PersistenceElementImpl(String name)
Creates new PersistenceElementImpl with the corresponding name
|
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangeListener(PropertyChangeListener l)
Add a property change listener.
|
void |
addVetoableChangeListener(VetoableChangeListener l)
Add a vetoable change listener.
|
void |
attachToElement(PersistenceElement element)
Called to attach the implementation to a specific
element.
|
protected void |
firePropertyChange(String name,
Object o,
Object n)
Fires property change event.
|
protected void |
fireVetoableChange(String name,
Object o,
Object n)
Fires vetoable change event.
|
String |
getName()
Get the name of this persistence element.
|
void |
removePropertyChangeListener(PropertyChangeListener l)
Remove a property change listener.
|
void |
removeVetoableChangeListener(VetoableChangeListener l)
Remove a vetoable change listener.
|
void |
setName(String name)
Set the name of this persistence element.
|
public PersistenceElementImpl()
public PersistenceElementImpl(String name)
name
- the name of the elementpublic void attachToElement(PersistenceElement element)
attachToElement
in interface PersistenceElement.Impl
element
- the element to attach toprotected void firePropertyChange(String name, Object o, Object n)
name
- property nameo
- old valuen
- new valuepublic void addPropertyChangeListener(PropertyChangeListener l)
addPropertyChangeListener
in interface PersistenceElement.Impl
l
- the listener to addpublic void removePropertyChangeListener(PropertyChangeListener l)
removePropertyChangeListener
in interface PersistenceElement.Impl
l
- the listener to removeprotected void fireVetoableChange(String name, Object o, Object n) throws PropertyVetoException
name
- property nameo
- old valuen
- new valuePropertyVetoException
- when the change is vetoed by a listenerpublic void addVetoableChangeListener(VetoableChangeListener l)
addVetoableChangeListener
in interface PersistenceElement.Impl
l
- the listener to addpublic void removeVetoableChangeListener(VetoableChangeListener l)
removeVetoableChangeListener
in interface PersistenceElement.Impl
l
- the listener to removepublic String getName()
getName
in interface PersistenceElement.Impl
public void setName(String name) throws ModelException
setName
in interface PersistenceElement.Impl
name
- the nameModelException
- if impossibleCopyright © 2018. All rights reserved.