Top Description Fields Constructors Methods
org.eclipse.persistence.internal.oxm

public Class QNameInheritancePolicy

extends InheritancePolicy
Class Inheritance
Imports
java.util.Iterator, .HashMap, .Map, .Vector, javax.xml.namespace.QName, org.eclipse.persistence.descriptors.ClassDescriptor, .InheritancePolicy, .MultitenantPolicy, org.eclipse.persistence.exceptions.DescriptorException, org.eclipse.persistence.internal.core.helper.CoreClassConstants, .CoreField, org.eclipse.persistence.internal.helper.DatabaseTable, .Helper, org.eclipse.persistence.internal.sessions.AbstractRecord, .AbstractSession, org.eclipse.persistence.oxm.NamespaceResolver, .XMLDescriptor, .XMLField, org.eclipse.persistence.oxm.record.XMLRecord

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".

Author
mmacivor
Since
10.1.3

Field Summary

Modifier and TypeField and Description
private NamespaceResolver
private boolean
Inherited from org.eclipse.persistence.descriptors.InheritancePolicy:
allChildClassIndicatorsallTableschildDescriptorschildrenJoinExpressionchildrenTableschildrenTablesJoinExpressionsclassExtractorclassExtractorNameclassIndicatorFieldclassIndicatorMappingclassNameIndicatorMappingdescribesNonPersistentSubclassesdescriptorisJoinedStrategyonlyInstancesExpressionparentClassparentClassNameparentDescriptorreadAllSubclassesViewrootParentDescriptorshouldAlwaysUseOuterJoinshouldOuterJoinSubclassesshouldReadSubclassesshouldUseClassNameAsIndicatoruseDescriptorsToValidateInheritedObjectswithAllSubclassesExpression

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public void
addClassIndicatorFieldToRow(AbstractRecord databaseRow)

Overrides org.eclipse.persistence.descriptors.InheritancePolicy.addClassIndicatorFieldToRow.

INTERNAL: Add abstract class indicator information to the database row.
public Class<?>
classFromRow(AbstractRecord rowFromDatabase, AbstractSession session)

Overrides org.eclipse.persistence.descriptors.InheritancePolicy.classFromRow.

INTERNAL: This method is invoked only for the abstract descriptors.
public void
initialize(AbstractSession session)

Overrides org.eclipse.persistence.descriptors.InheritancePolicy.initialize.

INTERNAL: Initialized the inheritance properties of the descriptor once the mappings are initialized.
public void
preInitialize(AbstractSession session)

Overrides org.eclipse.persistence.descriptors.InheritancePolicy.preInitialize.

INTERNAL: Allow the inheritance properties of the descriptor to be initialized.
public void
public void
protected void
updateTables()

Overrides org.eclipse.persistence.descriptors.InheritancePolicy.updateTables.

Override to control order of uniqueTables, child tablenames should be first since getDefaultRootElement on an XMLDescriptor will return the first table.
Inherited from org.eclipse.persistence.descriptors.InheritancePolicy:
addChildDescriptoraddChildTableJoinExpressionaddChildTableJoinExpressionToAllParentsaddClassIndicatoraddClassIndicatorFieldToInsertRowaddClassIndicatorTypeToParentaddClassNameIndicatoraddFieldsToParentappendWithAllSubclassesExpressionbuildClassIndicatorSelectStatementbuildViewSelectStatementclassFromValuecloneconvertClassNamesToClassesconvertClassNameToClassdontReadSubclassesOnQueriesdontUseClassNameAsIndicatorgetAllChildClassIndicatorsgetAllChildDescriptorsgetAllChildDescriptorsgetAllTablesgetChildDescriptorsgetChildrenJoinExpressiongetChildrenTablesgetChildrenTablesJoinExpressionsgetClassExtractionMethodgetClassExtractionMethodNamegetClassExtractorgetClassIndicatorAssociationsgetClassIndicatorFieldgetClassIndicatorFieldNamegetClassIndicatorMappinggetClassIndicatorValuegetClassIndicatorValuegetClassNameIndicatorMappinggetDescribesNonPersistentSubclassesgetDescriptorgetDescriptorgetOnlyInstancesExpressiongetParentClassgetParentClassNamegetParentDescriptorgetReadAllSubclassesViewgetReadAllSubclassesViewNamegetRootParentDescriptorgetSubclassDescriptorgetUseDescriptorsToValidateInheritedObjectsgetWithAllSubclassesExpressionhasChildrenhasClassExtractorhasClassIndicatorhasMultipleTableChildhasViewinitializeCacheInvalidationPolicyinitializeClassExtractorinitializeOnlyInstancesExpressioninitializeOptimisticLockinginitializeWithAllSubclassesExpressionisChildDescriptorisJoinedStrategyisRootParentDescriptorpostInitializereadSubclassesOnQueriesremoteInitializationremoveChildrenrequiresMultipleTableSubclassReadselectAllRowUsingCustomMultipleTableSubclassReadselectAllRowUsingDefaultMultipleTableSubclassReadselectAllRowUsingMultipleTableSubclassReadselectOneRowUsingCustomMultipleTableSubclassReadselectOneRowUsingDefaultMultipleTableSubclassReadselectOneRowUsingMultipleTableSubclassReadsetAllChildClassIndicatorssetAlwaysUseOuterJoinForClassTypesetChildDescriptorssetClassExtractionMethodNamesetClassExtractorsetClassExtractorNamesetClassIndicatorAssociationssetClassIndicatorFieldsetClassIndicatorMappingsetClassNameIndicatorMappingsetDescribesNonPersistentSubclassessetDescriptorsetJoinedStrategysetOnlyInstancesExpressionsetParentClasssetParentClassNamesetParentDescriptorsetReadAllSubclassesViewsetReadAllSubclassesViewNamesetShouldOuterJoinSubclassessetShouldReadSubclassessetShouldReadSubclassessetShouldUseClassNameAsIndicatorsetSingleTableStrategysetUseDescriptorsToValidateInheritedObjectssetWithAllSubclassesExpressionshouldAlwaysUseOuterJoinshouldOuterJoinSubclassesshouldReadSubclassesshouldReadSubclassesValueshouldUseClassNameAsIndicatortoStringuseClassNameAsIndicator

Field Detail

namespaceResolverback to summary
private NamespaceResolver namespaceResolver
usesXsiTypeback to summary
private boolean usesXsiType

Constructor Detail

QNameInheritancePolicyback to summary
public QNameInheritancePolicy()
QNameInheritancePolicyback to summary
public QNameInheritancePolicy(ClassDescriptor desc)

Method Detail

addClassIndicatorFieldToRowback to summary
public void addClassIndicatorFieldToRow(AbstractRecord databaseRow)

Overrides org.eclipse.persistence.descriptors.InheritancePolicy.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.

Annotations
@Override
classFromRowback to summary
public Class<?> classFromRow(AbstractRecord rowFromDatabase, AbstractSession session) throws DescriptorException

Overrides org.eclipse.persistence.descriptors.InheritancePolicy.classFromRow.

INTERNAL: This method is invoked only for the abstract descriptors.

Annotations
@Override
initializeback to summary
public void initialize(AbstractSession session)

Overrides org.eclipse.persistence.descriptors.InheritancePolicy.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.

Annotations
@Override
preInitializeback to summary
public void preInitialize(AbstractSession session) throws DescriptorException

Overrides org.eclipse.persistence.descriptors.InheritancePolicy.preInitialize.

INTERNAL: Allow the inheritance properties of the descriptor to be initialized. The descriptor's parent must first be initialized.

Annotations
@Override
setClassIndicatorFieldNameback to summary
public void setClassIndicatorFieldName(String fieldName)

Overrides org.eclipse.persistence.descriptors.InheritancePolicy.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.

Annotations
@Override
setNamespaceResolverback to summary
public void setNamespaceResolver(NamespaceResolver resolver)
updateTablesback to summary
protected void updateTables()

Overrides org.eclipse.persistence.descriptors.InheritancePolicy.updateTables.

Override to control order of uniqueTables, child tablenames should be first since getDefaultRootElement on an XMLDescriptor will return the first table.

Annotations
@Override