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

public abstract Class XMLAbstractAnyMapping

extends DatabaseMapping
Class Inheritance
Known Direct Subclasses
org.eclipse.persistence.oxm.mappings.XMLAnyCollectionMapping, org.eclipse.persistence.oxm.mappings.XMLAnyObjectMapping
Imports
javax.xml.namespace.QName, org.eclipse.persistence.descriptors.ClassDescriptor, org.eclipse.persistence.exceptions.DescriptorException, .XMLMarshalException, org.eclipse.persistence.internal.descriptors.ObjectBuilder, org.eclipse.persistence.internal.oxm.ConversionManager, org.eclipse.persistence.internal.queries.ContainerPolicy, .JoinedAttributeManager, org.eclipse.persistence.internal.sessions.AbstractSession, org.eclipse.persistence.mappings.DatabaseMapping, org.eclipse.persistence.oxm.XMLContext, .XMLDescriptor, .XMLRoot, org.eclipse.persistence.oxm.mappings.converters.XMLConverter, org.eclipse.persistence.oxm.record.DOMRecord, .XMLRecord, org.eclipse.persistence.platform.xml.XMLPlatformFactory, org.eclipse.persistence.queries.ObjectBuildingQuery, org.w3c.dom.Element, .Node

Purpose: An abstract superclass for XMLAnyObjectMapping and XMLAnyCollectionMapping. Maps an attribute of an object to an xs:any construct in the schema.

See Also
XMLAnyObjectMapping, XMLAnyCollectionMapping

Field Summary

Modifier and TypeField and Description
private boolean
private UnmarshalKeepAsElementPolicy
Inherited from org.eclipse.persistence.mappings.DatabaseMapping:
attributeAccessorattributeNamederivedIdMappingderivesIddescriptorfieldsisCacheableisInSopObjectisJPAIdisLazyisMapKeyMappingisOptionalisPrimaryKeyMappingisReadOnlyisRemotelyInitializedmapsIdValueNO_FIELDSNO_WEIGHTpropertiesunconvertedPropertiesweightWEIGHT_AGGREGATEWEIGHT_DIRECTWEIGHT_TO_ONEWEIGHT_TRANSFORM

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected Object
buildObjectAndWrapInXMLRoot(ClassDescriptor referenceDescriptor, XMLConverter converter, ObjectBuildingQuery query, DOMRecord record, DOMRecord nestedRecord, JoinedAttributeManager joinManager, AbstractSession session, Node next, Object container, ContainerPolicy containerPolicy)

Uses a given reference descriptor to build an object based on a given DOMRecord.

protected Object
buildObjectForNonXMLRoot(ClassDescriptor referenceDescriptor, XMLConverter converter, ObjectBuildingQuery query, DOMRecord record, DOMRecord nestedRecord, JoinedAttributeManager joinManager, AbstractSession session, Node next, Object container, ContainerPolicy containerPolicy)

protected Object
buildObjectNoReferenceDescriptor(DOMRecord record, XMLConverter converter, AbstractSession session, Node next, Object container, ContainerPolicy cp)

Convenience method that takes a given Node and applies namespace information, converts it if necessary, and adds the resulting object to the given ContainerPolicy if non-null.

protected XMLRoot
buildXMLRoot(Node node, Object object)

Convenience method that builds an XMLRoot wrapping a given object.

protected XMLRoot
buildXMLRootForText(Node node, QName schemaTypeQName, XMLConverter converter, AbstractSession session, DOMRecord record)

Convenience method that takes a given node and checks the first child for TEXT_NODE.

protected XMLDescriptor
getDescriptor(XMLRecord xmlRecord, AbstractSession session, QName rootQName)

public UnmarshalKeepAsElementPolicy
public boolean
isWriteOnly()

Overrides org.eclipse.persistence.mappings.DatabaseMapping.isWriteOnly.

INTERNAL: Some mappings support no attribute (transformation and multitenant primary key).
public void
preInitialize(AbstractSession session)

Overrides org.eclipse.persistence.mappings.DatabaseMapping.preInitialize.

INTERNAL: Allow for initialization of properties and validation.
public void
setAttributeValueInObject(Object
TODO
object
,
Object
TODO
value
)

Overrides org.eclipse.persistence.mappings.DatabaseMapping.setAttributeValueInObject.

INTERNAL: Set the value of the attribute mapped by this mapping.
public void
setIsWriteOnly(boolean b)

public void
Inherited from org.eclipse.persistence.mappings.DatabaseMapping:
addUnconvertedPropertybuildBackupClonebuildBackupCloneForPartObjectbuildChangeRecordbuildClonebuildCloneForPartObjectbuildCloneFromRowbuildContainerClonebuildCopybuildExpressionbuildObjectJoinExpressionbuildObjectJoinExpressionbuildShallowOriginalFromRowcalculateDeferredChangescascadeDiscoverAndPersistUnregisteredNewObjectscascadePerformRemoveIfRequiredcascadePerformRemovePrivateOwnedObjectFromChangeSetIfRequiredcascadeRegisterNewIfRequiredclonecloneFieldscollectFieldscollectQueryParameterscompareForChangecompareObjectsconvertClassNamesToClassesconvertConverterClassNamesToClassescreateCloneValueHolderderivesIdearlyPreDeleteextractNestedExpressionsextractNestedNonAggregateExpressionsfixObjectReferencesfixRealObjectReferencesgetAttributeAccessorgetAttributeClassificationgetAttributeNamegetAttributeValueFromObjectgetContainerPolicygetDerivedIdMappinggetDescriptorgetFieldgetFieldClassificationgetFieldsgetGetMethodNamegetMapsIdValuegetObjectCorrespondingTogetOrderByNormalizedExpressionsgetPropertiesgetPropertygetRealAttributeValueFromAttributegetRealAttributeValueFromObjectgetRealCollectionAttributeValueFromObjectgetReferenceDescriptorgetRelationshipPartnergetSelectFieldsgetSelectTablesgetSetMethodNamegetUnconvertedPropertiesgetValueFromRemoteValueHoldergetWeighthasConstraintDependencyhasDependencyhasInverseConstraintDependencyhasMapsIdValuehasNestedIdentityReferencehasRootExpressionThatShouldUseOuterJoinhasUnconvertedPropertiesinitializeinstantiateAttributeisAbstractColumnMappingisAbstractCompositeCollectionMappingisAbstractCompositeDirectCollectionMappingisAbstractCompositeObjectMappingisAbstractDirectMappingisAggregateCollectionMappingisAggregateMappingisAggregateObjectMappingisAttributeValueFromObjectInstantiatedisCacheableisCandidateForPrivateOwnedRemovalisCascadedLockingSupportedisChangeTrackingSupportedisCloningRequiredisCollectionMappingisDatabaseMappingisDirectCollectionMappingisDirectMapMappingisDirectToFieldMappingisDirectToXMLTypeMappingisEISMappingisElementCollectionMappingisForeignReferenceMappingisInAndOutSopObjectisInOnlySopObjectisInSopObjectisJoiningSupportedisJPAIdisLazyisLockableMappingisManyToManyMappingisManyToOneMappingisMapKeyMappingisMultitenantPrimaryKeyMappingisNestedTableMappingisObjectReferenceMappingisOneToManyMappingisOneToOneMappingisOptionalisOutOnlySopObjectisOutSopObjectisOwnedisPrimaryKeyMappingisPrivateOwnedisReadOnlyisReferenceMappingisRelationalMappingisRemotelyInitializedisStructureMappingisTransformationMappingisUnidirectionalOneToManyMappingisUsingMethodAccessisVariableOneToOneMappingisXMLMappingiterateiterateOnRealAttributeValueloadloadAllmergeChangesIntoObjectmergeIntoObjectperformDataModificationEventpostCalculateChangespostCalculateChangesOnDeletedpostDeletepostInitializepostInitializeSourceAndTargetExpressionspostInsertpostUpdatepreDeletepreInsertprepareCascadeLockingPolicypreUpdatereadFromResultSetIntoObjectreadFromRowIntoObjectreadOnlyreadWriterecordPrivateOwnedRemovalsrehashFieldDependanciesremoteInitializationremotelyInitializedreplaceValueHoldersInsetAttributeAccessorsetAttributeNamesetChangeListenersetDerivedIdMappingsetDerivesIdsetDescriptorsetFieldssetGetMethodNamesetIsCacheablesetIsInAndOutSopObjectsetIsInSopObjectsetIsJPAIdsetIsLazysetIsMapKeyMappingsetIsOptionalsetIsOutSopObjectsetIsPrimaryKeyMappingsetIsReadOnlysetMapsIdValuesetPropertiessetPropertysetRealAttributeValueInObjectsetSetMethodNamesetWeightsimpleAddToCollectionChangeRecordsimpleRemoveFromCollectionChangeRecordtoStringupdateChangeRecordupdateCollectionChangeRecordvalidateAfterInitializationvalidateBeforeInitializationvalueFromObjectvalueFromResultSetvalueFromRowvalueFromRowverifyDeletewriteFromAttributeIntoRowwriteFromObjectIntoRowwriteFromObjectIntoRowForShallowInsertwriteFromObjectIntoRowForShallowInsertWithChangeRecordwriteFromObjectIntoRowForUpdatewriteFromObjectIntoRowForUpdateAfterShallowInsertwriteFromObjectIntoRowForUpdateBeforeShallowDeletewriteFromObjectIntoRowForWhereClausewriteFromObjectIntoRowWithChangeRecordwriteInsertFieldsIntoRowwriteUpdateFieldsIntoRow

Field Detail

isWriteOnlyback to summary
private boolean isWriteOnly
keepAsElementPolicyback to summary
private UnmarshalKeepAsElementPolicy keepAsElementPolicy

Constructor Detail

XMLAbstractAnyMappingback to summary
public XMLAbstractAnyMapping()

Method Detail

buildObjectAndWrapInXMLRootback to summary
protected Object buildObjectAndWrapInXMLRoot(ClassDescriptor referenceDescriptor, XMLConverter converter, ObjectBuildingQuery query, DOMRecord record, DOMRecord nestedRecord, JoinedAttributeManager joinManager, AbstractSession session, Node next, Object container, ContainerPolicy containerPolicy)

Uses a given reference descriptor to build an object based on a given DOMRecord. If a converter is provided it is applied to the newly built object. The reference descriptor will wrap the object in an XMLRoot if required, and the object will be added to the given Container Policy if it is non-null.

buildObjectForNonXMLRootback to summary
protected Object buildObjectForNonXMLRoot(ClassDescriptor referenceDescriptor, XMLConverter converter, ObjectBuildingQuery query, DOMRecord record, DOMRecord nestedRecord, JoinedAttributeManager joinManager, AbstractSession session, Node next, Object container, ContainerPolicy containerPolicy)
buildObjectNoReferenceDescriptorback to summary
protected Object buildObjectNoReferenceDescriptor(DOMRecord record, XMLConverter converter, AbstractSession session, Node next, Object container, ContainerPolicy cp)

Convenience method that takes a given Node and applies namespace information, converts it if necessary, and adds the resulting object to the given ContainerPolicy if non-null.

buildXMLRootback to summary
protected XMLRoot buildXMLRoot(Node node, Object object)

Convenience method that builds an XMLRoot wrapping a given object. The local name and uri are set using the given Node.

buildXMLRootForTextback to summary
protected XMLRoot buildXMLRootForText(Node node, QName schemaTypeQName, XMLConverter converter, AbstractSession session, DOMRecord record)

Convenience method that takes a given node and checks the first child for TEXT_NODE. If the first child is a text node containing a non-empty String, the String value will be processed and wrapped in an XMLRoot. If schemaTypeQName represents a default XML type (boolean, dateTime, etc) the String value will be converted to that type. If a converter is provided it will be applied before wrapping in an XMLRoot.

getDescriptorback to summary
protected XMLDescriptor getDescriptor(XMLRecord xmlRecord, AbstractSession session, QName rootQName) throws XMLMarshalException
getKeepAsElementPolicyback to summary
public UnmarshalKeepAsElementPolicy getKeepAsElementPolicy()
isWriteOnlyback to summary
public boolean isWriteOnly()

Overrides org.eclipse.persistence.mappings.DatabaseMapping.isWriteOnly.

Doc from org.eclipse.persistence.mappings.DatabaseMapping.isWriteOnly.

INTERNAL: Some mappings support no attribute (transformation and multitenant primary key).

Returns:boolean

Doc from org.eclipse.persistence.core.mappings.CoreMapping.isWriteOnly.

TODO

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

Overrides org.eclipse.persistence.mappings.DatabaseMapping.preInitialize.

Doc from org.eclipse.persistence.mappings.DatabaseMapping.preInitialize.

INTERNAL: Allow for initialization of properties and validation.

Annotations
@Override
setAttributeValueInObjectback to summary
public void setAttributeValueInObject(Object object, Object value) throws DescriptorException

Overrides org.eclipse.persistence.mappings.DatabaseMapping.setAttributeValueInObject.

Doc from org.eclipse.persistence.mappings.DatabaseMapping.setAttributeValueInObject.

INTERNAL: Set the value of the attribute mapped by this mapping.

Parameters
object:Object

Doc from org.eclipse.persistence.core.mappings.CoreMapping.setAttributeValueInObject.

TODO

value:Object

Doc from org.eclipse.persistence.core.mappings.CoreMapping.setAttributeValueInObject.

TODO

Annotations
@Override
setIsWriteOnlyback to summary
public void setIsWriteOnly(boolean b)
setKeepAsElementPolicyback to summary
public void setKeepAsElementPolicy(UnmarshalKeepAsElementPolicy keepAsElementPolicy)