Module org.eclipse.persistence.core
Class QNameInheritancePolicy
java.lang.Object
org.eclipse.persistence.core.descriptors.CoreInheritancePolicy<AbstractRecord,AbstractSession,ClassDescriptor,DatabaseField>
org.eclipse.persistence.descriptors.InheritancePolicy
org.eclipse.persistence.internal.oxm.QNameInheritancePolicy
- All Implemented Interfaces:
Serializable
,Cloneable
INTERNAL:
Purpose: A Subclass of Inheritance Policy to be used with XML Descriptors. If the class indicator field is an xsi:type, the value of that field may be a qualified type name. For example xsi:type="myns:my-type-name". Since any given XML document can use different prefixes for these namespaces, we must be able to find the class based on QName instead of just the string "myns:my-type-name".
- Since:
- 10.1.3
- See Also:
-
Field Summary
Fields inherited from class org.eclipse.persistence.descriptors.InheritancePolicy
allChildClassIndicators, allTables, childDescriptors, childrenJoinExpression, childrenTables, childrenTablesJoinExpressions, classExtractor, classExtractorName, classIndicatorField, classIndicatorMapping, classNameIndicatorMapping, describesNonPersistentSubclasses, descriptor, isJoinedStrategy, onlyInstancesExpression, parentClass, parentClassName, parentDescriptor, readAllSubclassesView, rootParentDescriptor, shouldAlwaysUseOuterJoin, shouldOuterJoinSubclasses, shouldReadSubclasses, shouldUseClassNameAsIndicator, useDescriptorsToValidateInheritedObjects, withAllSubclassesExpression
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addClassIndicatorFieldToRow
(AbstractRecord databaseRow) INTERNAL: Add abstract class indicator information to the database row.Class
<?> classFromRow
(AbstractRecord rowFromDatabase, AbstractSession session) INTERNAL: This method is invoked only for the abstract descriptors.void
initialize
(AbstractSession session) INTERNAL: Initialized the inheritance properties of the descriptor once the mappings are initialized.void
preInitialize
(AbstractSession session) INTERNAL: Allow the inheritance properties of the descriptor to be initialized.void
setClassIndicatorFieldName
(String fieldName) PUBLIC: To set the class indicator field name.void
setNamespaceResolver
(NamespaceResolver resolver) protected void
Override to control order of uniqueTables, child tablenames should be first since getDefaultRootElement on an XMLDescriptor will return the first table.Methods inherited from class org.eclipse.persistence.descriptors.InheritancePolicy
addChildDescriptor, addChildTableJoinExpression, addChildTableJoinExpressionToAllParents, addClassIndicator, addClassIndicatorFieldToInsertRow, addClassIndicatorTypeToParent, addClassNameIndicator, addFieldsToParent, appendWithAllSubclassesExpression, buildClassIndicatorSelectStatement, buildViewSelectStatement, classFromValue, clone, convertClassNamesToClasses, convertClassNameToClass, dontReadSubclassesOnQueries, dontUseClassNameAsIndicator, getAllChildClassIndicators, getAllChildDescriptors, getAllChildDescriptors, getAllTables, getChildDescriptors, getChildrenJoinExpression, getChildrenTables, getChildrenTablesJoinExpressions, getClassExtractionMethod, getClassExtractionMethodName, getClassExtractor, getClassIndicatorAssociations, getClassIndicatorField, getClassIndicatorFieldName, getClassIndicatorMapping, getClassIndicatorValue, getClassIndicatorValue, getClassNameIndicatorMapping, getDescribesNonPersistentSubclasses, getDescriptor, getDescriptor, getOnlyInstancesExpression, getParentClass, getParentClassName, getParentDescriptor, getReadAllSubclassesView, getReadAllSubclassesViewName, getRootParentDescriptor, getSubclassDescriptor, getUseDescriptorsToValidateInheritedObjects, getWithAllSubclassesExpression, hasChildren, hasClassExtractor, hasClassIndicator, hasMultipleTableChild, hasView, initializeCacheInvalidationPolicy, initializeClassExtractor, initializeOnlyInstancesExpression, initializeOptimisticLocking, initializeWithAllSubclassesExpression, isChildDescriptor, isJoinedStrategy, isRootParentDescriptor, postInitialize, readSubclassesOnQueries, remoteInitialization, removeChildren, requiresMultipleTableSubclassRead, selectAllRowUsingCustomMultipleTableSubclassRead, selectAllRowUsingDefaultMultipleTableSubclassRead, selectAllRowUsingMultipleTableSubclassRead, selectOneRowUsingCustomMultipleTableSubclassRead, selectOneRowUsingDefaultMultipleTableSubclassRead, selectOneRowUsingMultipleTableSubclassRead, setAllChildClassIndicators, setAlwaysUseOuterJoinForClassType, setChildDescriptors, setClassExtractionMethodName, setClassExtractor, setClassExtractorName, setClassIndicatorAssociations, setClassIndicatorField, setClassIndicatorMapping, setClassNameIndicatorMapping, setDescribesNonPersistentSubclasses, setDescriptor, setJoinedStrategy, setOnlyInstancesExpression, setParentClass, setParentClassName, setParentDescriptor, setReadAllSubclassesView, setReadAllSubclassesViewName, setShouldOuterJoinSubclasses, setShouldReadSubclasses, setShouldReadSubclasses, setShouldUseClassNameAsIndicator, setSingleTableStrategy, setUseDescriptorsToValidateInheritedObjects, setWithAllSubclassesExpression, shouldAlwaysUseOuterJoin, shouldOuterJoinSubclasses, shouldReadSubclasses, shouldReadSubclassesValue, shouldUseClassNameAsIndicator, toString, useClassNameAsIndicator
-
Constructor Details
-
QNameInheritancePolicy
public QNameInheritancePolicy() -
QNameInheritancePolicy
-
-
Method Details
-
updateTables
protected void updateTables()Override to control order of uniqueTables, child tablenames should be first since getDefaultRootElement on an XMLDescriptor will return the first table.- Overrides:
updateTables
in classInheritancePolicy
-
preInitialize
INTERNAL: Allow the inheritance properties of the descriptor to be initialized. The descriptor's parent must first be initialized.- Overrides:
preInitialize
in classInheritancePolicy
- Throws:
DescriptorException
-
initialize
INTERNAL: Initialized the inheritance properties of the descriptor once the mappings are initialized. This is done before formal postInitialize during the end of mapping initialize.- Overrides:
initialize
in classInheritancePolicy
-
classFromRow
public Class<?> classFromRow(AbstractRecord rowFromDatabase, AbstractSession session) throws DescriptorException INTERNAL: This method is invoked only for the abstract descriptors.- Overrides:
classFromRow
in classInheritancePolicy
- Throws:
DescriptorException
-
setNamespaceResolver
-
setClassIndicatorFieldName
PUBLIC: To set the class indicator field name. This is the name of the field in the table that stores what type of object this is.- Overrides:
setClassIndicatorFieldName
in classInheritancePolicy
-
addClassIndicatorFieldToRow
INTERNAL: Add abstract class indicator information to the database row. This is required when building a row for an insert or an update of a concrete child descriptor.- Overrides:
addClassIndicatorFieldToRow
in classInheritancePolicy
-