public abstract class PersistenceElement extends Object implements PersistenceElementProperties, Comparable
Modifier and Type | Class and Description |
---|---|
static interface |
PersistenceElement.Impl
Pluggable implementation of the storage of element properties.
|
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
Modifier | Constructor and Description |
---|---|
|
PersistenceElement()
Create new PersistenceElement with no implementation.
|
protected |
PersistenceElement(PersistenceElement.Impl impl)
Create new PersistenceElement with the provided implementation.
|
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangeListener(PropertyChangeListener l)
Add a property change listener.
|
void |
addVetoableChangeListener(VetoableChangeListener l)
Add a vetoable change listener.
|
int |
compareTo(Object o)
Compares this object with the specified object for order.
|
boolean |
equals(Object obj)
Overrides Object's
equals method by comparing the name of this persistence element
with the name of the argument obj. |
PersistenceElement.Impl |
getImpl() |
protected static ResourceBundle |
getMessages() |
String |
getName()
Get the name of this persistence element.
|
int |
hashCode()
Overrides Object's
hashCode method to return the hashCode of this persistence element's name. |
void |
removePropertyChangeListener(PropertyChangeListener l)
Remove a property change listener.
|
void |
removeVetoableChangeListener(VetoableChangeListener l)
Remove a vetoable change listener.
|
void |
setImpl(PersistenceElement.Impl impl)
Set the implementation factory of this persistence element.
|
void |
setName(String name)
Set the name of this persistence element.
|
String |
toString()
Overrides Object's
toString method to return the name
of this persistence element. |
public PersistenceElement()
protected PersistenceElement(PersistenceElement.Impl impl)
impl
- the implementation to usepublic final PersistenceElement.Impl getImpl()
protected static final ResourceBundle getMessages()
public final void addPropertyChangeListener(PropertyChangeListener l)
l
- the listener to addPersistenceElementProperties
public final void removePropertyChangeListener(PropertyChangeListener l)
l
- the listener to removePersistenceElementProperties
public final void addVetoableChangeListener(VetoableChangeListener l)
l
- the listener to addPersistenceElementProperties
public final void removeVetoableChangeListener(VetoableChangeListener l)
l
- the listener to removePersistenceElementProperties
public String getName()
public void setName(String name) throws ModelException
name
- the nameModelException
- if impossiblepublic String toString()
toString
method to return the name
of this persistence element.public boolean equals(Object obj)
equals
method by comparing the name of this persistence element
with the name of the argument obj. The method returns false
if obj does not have
the same dynamic type as this persistence element.public int hashCode()
hashCode
method to return the hashCode of this persistence element's name.public int compareTo(Object o)
compareTo
in interface Comparable
o
- the Object to be compared.ClassCastException
- - if the specified object is null or is not an instance of PersistenceElementpublic void setImpl(PersistenceElement.Impl impl)
impl
- the implementation to useCopyright © 2018. All rights reserved.