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:
java.io.Serializable,java.lang.Cloneable
public class QNameInheritancePolicy extends InheritancePolicy
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
- Author:
- mmacivor
- See Also:
- Serialized Form
-
-
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
Constructors Constructor Description QNameInheritancePolicy()QNameInheritancePolicy(ClassDescriptor desc)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddClassIndicatorFieldToRow(AbstractRecord databaseRow)INTERNAL: Add abstract class indicator information to the database row.java.lang.ClassclassFromRow(AbstractRecord rowFromDatabase, AbstractSession session)INTERNAL: This method is invoked only for the abstract descriptors.voidinitialize(AbstractSession session)INTERNAL: Initialized the inheritance properties of the descriptor once the mappings are initialized.voidpreInitialize(AbstractSession session)INTERNAL: Allow the inheritance properties of the descriptor to be initialized.voidsetClassIndicatorFieldName(java.lang.String fieldName)PUBLIC: To set the class indicator field name.voidsetNamespaceResolver(NamespaceResolver resolver)protected voidupdateTables()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 Detail
-
QNameInheritancePolicy
public QNameInheritancePolicy()
-
QNameInheritancePolicy
public QNameInheritancePolicy(ClassDescriptor desc)
-
-
Method Detail
-
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:
updateTablesin classInheritancePolicy
-
preInitialize
public void preInitialize(AbstractSession session) throws DescriptorException
INTERNAL: Allow the inheritance properties of the descriptor to be initialized. The descriptor's parent must first be initialized.- Overrides:
preInitializein classInheritancePolicy- Throws:
DescriptorException
-
initialize
public void initialize(AbstractSession session)
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:
initializein classInheritancePolicy
-
classFromRow
public java.lang.Class classFromRow(AbstractRecord rowFromDatabase, AbstractSession session) throws DescriptorException
INTERNAL: This method is invoked only for the abstract descriptors.- Overrides:
classFromRowin classInheritancePolicy- Throws:
DescriptorException
-
setNamespaceResolver
public void setNamespaceResolver(NamespaceResolver resolver)
-
setClassIndicatorFieldName
public void setClassIndicatorFieldName(java.lang.String fieldName)
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:
setClassIndicatorFieldNamein classInheritancePolicy
-
addClassIndicatorFieldToRow
public void addClassIndicatorFieldToRow(AbstractRecord databaseRow)
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:
addClassIndicatorFieldToRowin classInheritancePolicy
-
-