Module org.eclipse.persistence.jpa
Class InheritanceMetadata
java.lang.Object
org.eclipse.persistence.internal.jpa.metadata.ORMetadata
org.eclipse.persistence.internal.jpa.metadata.inheritance.InheritanceMetadata
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
-
Field Summary
Fields inherited from class org.eclipse.persistence.internal.jpa.metadata.ORMetadata
m_project
-
Constructor Summary
ConstructorDescriptionINTERNAL: Used for XML loading.InheritanceMetadata
(MetadataAnnotation inheritance, MetadataAccessor accessor) INTERNAL: Used for annotation loading. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addClassExtractor
(MetadataDescriptor descriptor, EntityAccessor accessor) INTERNAL: Set the class extractor class name on the inheritance policy.protected void
addClassIndicator
(MetadataDescriptor descriptor, EntityAccessor accessor) INTERNAL: Recursive method.protected void
addClassIndicatorField
(MetadataDescriptor descriptor, EntityAccessor accessor) INTERNAL: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.boolean
INTERNAL:INTERNAL: Used for OX mapping.int
hashCode()
void
process
(MetadataDescriptor descriptor) INTERNAL: The process method method will be called with the descriptor from every entity in the hierarchy.protected void
processInheritanceRoot
(MetadataDescriptor descriptor, EntityAccessor accessor) INTERNAL: Process the inheritance metadata of a root class.protected void
processInheritanceSubclass
(MetadataDescriptor descriptor, EntityAccessor accessor, EntityAccessor rootAccessor) INTERNAL: Process the inheritance metadata of a sub class.protected void
setInheritancePolicy
(MetadataDescriptor descriptor) INTERNAL: Recursive method.void
setStrategy
(String strategy) INTERNAL: Used for OX mapping.protected void
setTablePerClassInheritancePolicy
(MetadataDescriptor descriptor) INTERNAL:boolean
INTERNAL:boolean
INTERNAL:boolean
INTERNAL:Methods inherited from class org.eclipse.persistence.internal.jpa.metadata.ORMetadata
getAccessibleObject, getAccessibleObjectName, getAnnotation, getBoxedType, getDatabaseTypeEnum, getEntityMappings, getFullyQualifiedClassName, getIdentifier, getJavaClass, getJavaClassName, getLoader, getLocation, getLogger, getMetadataClass, getMetadataClass, getMetadataClass, getMetadataFactory, getName, getPrimitiveClassForName, getProject, getText, getXMLElement, hasIdentifier, hasText, initXMLClassName, initXMLObject, initXMLObject, initXMLObjects, initXMLTextObject, loadedFromAnnotation, loadedFromEclipseLinkXML, loadedFromXML, merge, mergeORObjectLists, mergeORObjects, mergeSimpleObjects, reloadEntity, reloadMappedSuperclass, setAccessibleObject, setEntityMappings, setFieldName, setFieldName, setProject, shouldOverride, valuesMatch, valuesMatch
-
Constructor Details
-
InheritanceMetadata
public InheritanceMetadata()INTERNAL: Used for XML loading. -
InheritanceMetadata
INTERNAL: Used for annotation loading.
-
-
Method Details
-
addClassExtractor
INTERNAL: Set the class extractor class name on the inheritance policy. -
addClassIndicator
INTERNAL: Recursive method. -
addClassIndicatorField
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
INTERNAL:- Specified by:
equals
in classORMetadata
-
hashCode
public int hashCode() -
getStrategy
INTERNAL: Used for OX mapping. -
process
INTERNAL: The process method method will be called with the descriptor from every entity in the hierarchy. -
processInheritanceRoot
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
INTERNAL: Recursive method. -
setStrategy
INTERNAL: Used for OX mapping. -
setTablePerClassInheritancePolicy
INTERNAL: -
usesJoinedStrategy
public boolean usesJoinedStrategy()INTERNAL: -
usesSingleTableStrategy
public boolean usesSingleTableStrategy()INTERNAL: -
usesTablePerClassStrategy
public boolean usesTablePerClassStrategy()INTERNAL:
-