Class PersistenceMemberElement
- java.lang.Object
-
- com.sun.jdo.api.persistence.model.jdo.PersistenceElement
-
- com.sun.jdo.api.persistence.model.jdo.PersistenceMemberElement
-
- All Implemented Interfaces:
PersistenceElementProperties,Comparable
- Direct Known Subclasses:
FieldGroupElement,PersistenceFieldElement
public abstract class PersistenceMemberElement extends PersistenceElement
- Version:
- %I%
- Author:
- raccah
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfacePersistenceMemberElement.ImplPluggable implementation of member elements.
-
Field Summary
-
Fields 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
Constructors Modifier Constructor Description PersistenceMemberElement()Create new PersistenceMemberElement with no implementation.protectedPersistenceMemberElement(PersistenceMemberElement.Impl impl, PersistenceClassElement declaringClass)Create new PersistenceMemberElement with the provided implementation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)Overrides PersistenceElement'sequalsmethod to add comparison of the name of the declaring class this persistence element.PersistenceClassElementgetDeclaringClass()Get the declaring class.inthashCode()Overrides PersistenceElement'shashCodemethod to add the hashCode of this persistence element's declaring class.voidsetDeclaringClass(PersistenceClassElement declaringClass)Set the declaring class of this member element.-
Methods inherited from class com.sun.jdo.api.persistence.model.jdo.PersistenceElement
addPropertyChangeListener, addVetoableChangeListener, compareTo, getImpl, getMessages, getName, removePropertyChangeListener, removeVetoableChangeListener, setImpl, setName, toString
-
-
-
-
Constructor Detail
-
PersistenceMemberElement
public PersistenceMemberElement()
Create new PersistenceMemberElement with no implementation. This constructor should only be used for cloning and archiving.
-
PersistenceMemberElement
protected PersistenceMemberElement(PersistenceMemberElement.Impl impl, PersistenceClassElement declaringClass)
Create new PersistenceMemberElement with the provided implementation. The implementation is responsible for storing all properties of the object.- Parameters:
impl- the implementation to usedeclaringClass- the class to attach to
-
-
Method Detail
-
getDeclaringClass
public PersistenceClassElement getDeclaringClass()
Get the declaring class.- Returns:
- the class that owns this member element, or
nullif the element is not attached to any class
-
setDeclaringClass
public void setDeclaringClass(PersistenceClassElement declaringClass)
Set the declaring class of this member element. This method should only be used internally and for cloning and archiving.- Parameters:
declaringClass- the declaring class of this member element
-
equals
public boolean equals(Object obj)
Overrides PersistenceElement'sequalsmethod to add comparison of the name of the declaring class this persistence element. The method returnsfalseif obj does not have a declaring class with the same name as this persistence element.- Overrides:
equalsin classPersistenceElement- Parameters:
obj- the reference object with which to compare.- Returns:
trueif this object is the same as the obj argument;falseotherwise.
-
hashCode
public int hashCode()
Overrides PersistenceElement'shashCodemethod to add the hashCode of this persistence element's declaring class.- Overrides:
hashCodein classPersistenceElement- Returns:
- a hash code value for this object.
-
-