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
  • Constructor Details

    • 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 use
      declaringClass - the class to attach to
  • Method Details

    • getDeclaringClass

      public PersistenceClassElement getDeclaringClass()
      Get the declaring class.
      Returns:
      the class that owns this member element, or null if 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's equals method to add comparison of the name of the declaring class this persistence element. The method returns false if obj does not have a declaring class with the same name as this persistence element.
      Overrides:
      equals in class PersistenceElement
      Parameters:
      obj - the reference object with which to compare.
      Returns:
      true if this object is the same as the obj argument; false otherwise.
    • hashCode

      public int hashCode()
      Overrides PersistenceElement's hashCode method to add the hashCode of this persistence element's declaring class.
      Overrides:
      hashCode in class PersistenceElement
      Returns:
      a hash code value for this object.