java.lang.Object
org.eclipse.persistence.internal.jpa.metadata.ORMetadata
org.eclipse.persistence.internal.jpa.metadata.inheritance.InheritanceMetadata

public class InheritanceMetadata extends ORMetadata
Object to represent inheritance metadata. The processing of this metadata to its related class descriptors should be performed by this class. Key notes: - any metadata mapped from XML to this class must be compared in the equals method. - when loading from annotations, the constructor accepts the metadata accessor this metadata was loaded from. Used it to look up any 'companion' annotation needed for processing. - methods should be preserved in alphabetical order.
Since:
EclipseLink 1.0
  • Constructor Details

    • InheritanceMetadata

      public InheritanceMetadata()
      INTERNAL: Used for XML loading.
    • InheritanceMetadata

      public InheritanceMetadata(MetadataAnnotation inheritance, MetadataAccessor accessor)
      INTERNAL: Used for annotation loading.
  • Method Details

    • addClassExtractor

      protected void addClassExtractor(MetadataDescriptor descriptor, EntityAccessor accessor)
      INTERNAL: Set the class extractor class name on the inheritance policy.
    • addClassIndicator

      protected void addClassIndicator(MetadataDescriptor descriptor, EntityAccessor accessor)
      INTERNAL: Recursive method.
    • addClassIndicatorField

      protected void addClassIndicatorField(MetadataDescriptor descriptor, EntityAccessor accessor)
      INTERNAL:
    • addTablePerClassParentMappings

      public void addTablePerClassParentMappings(MetadataDescriptor startingDescriptor, MetadataDescriptor realDescriptor)
      INTERNAL: Recursive method to traverse table per class inheritance hierarchy and grab all the 'inherited' accessors for subclasses of the hierarchy. What we know: - All parent classes will already have been processed. Inheritance hierarchies are processed top->down. - Always go through the given descriptors pointer to its class accessor, as we can not rely on the reloaded accessors for inheritance checks, mapped superclasses etc. Use the descriptors provided. - When adding accessors from superclasses to an inheritance subclasses descriptor, they must be reloaded/cloned and cannot be shared. Otherwise the processing of those accessor will only be performed once by their 'real' owning entity accessor.
    • equals

      public boolean equals(Object objectToCompare)
      INTERNAL:
      Specified by:
      equals in class ORMetadata
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getStrategy

      public String getStrategy()
      INTERNAL: Used for OX mapping.
    • process

      public void process(MetadataDescriptor descriptor)
      INTERNAL: The process method method will be called with the descriptor from every entity in the hierarchy.
    • processInheritanceRoot

      protected void processInheritanceRoot(MetadataDescriptor descriptor, EntityAccessor accessor)
      INTERNAL: Process the inheritance metadata of a root class.
    • processInheritanceSubclass

      protected void processInheritanceSubclass(MetadataDescriptor descriptor, EntityAccessor accessor, EntityAccessor rootAccessor)
      INTERNAL: Process the inheritance metadata of a sub class.
    • setInheritancePolicy

      protected void setInheritancePolicy(MetadataDescriptor descriptor)
      INTERNAL: Recursive method.
    • setStrategy

      public void setStrategy(String strategy)
      INTERNAL: Used for OX mapping.
    • setTablePerClassInheritancePolicy

      protected void setTablePerClassInheritancePolicy(MetadataDescriptor descriptor)
      INTERNAL:
    • usesJoinedStrategy

      public boolean usesJoinedStrategy()
      INTERNAL:
    • usesSingleTableStrategy

      public boolean usesSingleTableStrategy()
      INTERNAL:
    • usesTablePerClassStrategy

      public boolean usesTablePerClassStrategy()
      INTERNAL: