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

public Class XMLAnyAttributeMapping

extends DatabaseMapping
implements XMLMapping, AnyAttributeMapping<AbstractSession, AttributeAccessor, ContainerPolicy, ClassDescriptor, DatabaseField, XMLRecord>
Class Inheritance
All Implemented Interfaces
org.eclipse.persistence.internal.oxm.mappings.AnyAttributeMapping, org.eclipse.persistence.internal.oxm.mappings.XMLContainerMapping, org.eclipse.persistence.internal.oxm.mappings.Mapping, org.eclipse.persistence.oxm.mappings.XMLMapping
Imports
java.util.ArrayList, .HashMap, .List, .Map, .Vector, javax.xml.namespace.QName, org.eclipse.persistence.descriptors.ClassDescriptor, org.eclipse.persistence.exceptions.DatabaseException, .DescriptorException, .XMLMarshalException, org.eclipse.persistence.internal.descriptors.DescriptorIterator, org.eclipse.persistence.internal.helper.DatabaseField, .Helper, org.eclipse.persistence.internal.identitymaps.CacheKey, org.eclipse.persistence.internal.oxm.Namespace, .XMLObjectBuilder, .XPathEngine, org.eclipse.persistence.internal.oxm.mappings.AnyAttributeMapping, .XMLContainerMapping, org.eclipse.persistence.internal.queries.ContainerPolicy, .JoinedAttributeManager, .MappedKeyMapContainerPolicy, org.eclipse.persistence.internal.sessions.AbstractRecord, .AbstractSession, .ChangeRecord, .MergeManager, .ObjectChangeSet, .UnitOfWorkImpl, org.eclipse.persistence.internal.sessions.remote.ObjectDescriptor, org.eclipse.persistence.mappings.AttributeAccessor, .DatabaseMapping, org.eclipse.persistence.oxm.NamespaceResolver, .XMLConstants, .XMLContext, .XMLDescriptor, .XMLField, org.eclipse.persistence.oxm.mappings.nullpolicy.AbstractNullPolicy, org.eclipse.persistence.oxm.record.DOMRecord, .XMLRecord, org.eclipse.persistence.queries.ObjectBuildingQuery, .ObjectLevelReadQuery, org.eclipse.persistence.sessions.remote.DistributedSession, org.w3c.dom.Attr, .Element, .NamedNodeMap, .Node

Purpose:The XMLAnyAttributeMapping is used to map to an attribute in an object to any xml attributes contained on a specific element in the XML Document. The attribute in the object will contain a map of attribute values keyed on QName. In the case that one or more of the attributes found on the specified element is already mapped to another attribute in the object, that attribute will be ignored during the unmarshal operation.

Setting the XPath: TopLink XML mappings make use of XPath statements to find the relevant data in an XML document. The XPath statement is relative to the context node specified in the descriptor. The XPath may contain node type, path, and positional information. The XPath is specified on the mapping using the setXPath method. Note that for XML Any Attribute Mappings the XPath is optional. Not setting the xpath, will cause the mapping to look for any attribute children directly owned by the current Element.

Field Summary

Modifier and TypeField and Description
private MappedKeyMapContainerPolicy
private XMLField
private boolean
private boolean
private boolean
private boolean
private boolean
private AbstractNullPolicy
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
public void
buildBackupClone(Object
TODO
clone
,
Object
TODO
backup
,
UnitOfWorkImpl
TODO
unitOfWork
)

Implements abstract org.eclipse.persistence.mappings.DatabaseMapping.buildBackupClone.

INTERNAL: Clone the attribute from the clone and assign it to the backup.
public void
buildClone(Object
TODO
original
,
CacheKey
TODO
cacheKey
,
Object
TODO
clone
,
Integer
TODO
refreshCascade
,
AbstractSession
TODO
cloningSession
)

Implements abstract org.eclipse.persistence.mappings.DatabaseMapping.buildClone.

INTERNAL: Clone the attribute from the original and assign it to the clone.
public void
buildCloneFromRow(AbstractRecord
TODO
Record
,
JoinedAttributeManager
TODO
joinManager
,
Object
TODO
clone
,
CacheKey
TODO
sharedCacheKey
,
ObjectBuildingQuery
TODO
sourceQuery
,
UnitOfWorkImpl
TODO
unitOfWork
,
AbstractSession
TODO
executionSession
)

Implements abstract org.eclipse.persistence.mappings.DatabaseMapping.buildCloneFromRow.

INTERNAL: A combination of readFromRowIntoObject and buildClone.
protected AbstractRecord
buildCompositeRow(Object attributeValue, AbstractSession session, AbstractRecord parentRow)

private Object
public void
cascadePerformRemoveIfRequired(Object
TODO
object
,
UnitOfWorkImpl
TODO
uow
,
Map<K, V>
TODO
visitedObjects
)

Implements abstract org.eclipse.persistence.mappings.DatabaseMapping.cascadePerformRemoveIfRequired.

INTERNAL: Cascade perform delete through mappings that require the cascade
public void
cascadeRegisterNewIfRequired(Object
TODO
object
,
UnitOfWorkImpl
TODO
uow
,
Map<K, V>
TODO
visitedObjects
)

Implements abstract org.eclipse.persistence.mappings.DatabaseMapping.cascadeRegisterNewIfRequired.

INTERNAL: Cascade registerNew for Create through mappings that require the cascade
public Object
public ChangeRecord

Returns:

prototype.changeset.ChangeRecord
compareForChange
(Object
TODO
clone
,
Object
TODO
backup
,
ObjectChangeSet
TODO
owner
,
AbstractSession
TODO
session
)

Implements abstract org.eclipse.persistence.mappings.DatabaseMapping.compareForChange.

INTERNAL: This method was created in VisualAge.
public boolean
compareObjects(Object
TODO
firstObject
,
Object
TODO
secondObject
,
AbstractSession
TODO
session
)

Implements abstract org.eclipse.persistence.mappings.DatabaseMapping.compareObjects.

INTERNAL: Compare the attributes belonging to this mapping for the objects.
public void
fixObjectReferences(Object
TODO
object
,
Map<Object, ObjectDescriptor>
TODO
objectDescriptors
,
Map<Object, Object>
TODO
processedObjects
,
ObjectLevelReadQuery
TODO
query
,
DistributedSession
TODO
session
)

Implements abstract org.eclipse.persistence.mappings.DatabaseMapping.fixObjectReferences.

INTERNAL: An object has been serialized from the server to the client.
public ContainerPolicy
protected XMLDescriptor
public DatabaseField
getField()

Overrides org.eclipse.persistence.mappings.DatabaseMapping.getField.

Implements org.eclipse.persistence.internal.oxm.mappings.Mapping.getField.

INTERNAL: Return the field associated with this mapping if there is exactly one.
public Vector<E>
getFields()

Overrides org.eclipse.persistence.mappings.DatabaseMapping.getFields.

INTERNAL: Returns a vector of all the fields this mapping represents.
public boolean
getReuseContainer()

Implements org.eclipse.persistence.internal.oxm.mappings.XMLContainerMapping.getReuseContainer.

Return true if the original container on the object should be used if present.
public AbstractNullPolicy
public void
initialize(AbstractSession session)

Overrides org.eclipse.persistence.mappings.DatabaseMapping.initialize.

INTERNAL: Allow for initialization of properties and validation.
public boolean
isDefaultEmptyContainer()

Implements org.eclipse.persistence.internal.oxm.mappings.XMLContainerMapping.isDefaultEmptyContainer.

INTERNAL Return true if an empty container should be set on the object if there is no presence of the collection in the XML document.
public boolean
public boolean
public boolean
isWriteOnly()

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

Implements org.eclipse.persistence.oxm.mappings.XMLMapping.isWriteOnly.

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

Overrides org.eclipse.persistence.mappings.DatabaseMapping.isXMLMapping.

INTERNAL: All relational mappings should implement this method to return true.
public void
iterate(DescriptorIterator iterator)

Implements abstract org.eclipse.persistence.mappings.DatabaseMapping.iterate.

INTERNAL: Iterate on the appropriate attribute value.
public void
mergeChangesIntoObject(Object target, ChangeRecord changeRecord, Object source, MergeManager mergeManager, AbstractSession targetSession)

Implements abstract org.eclipse.persistence.mappings.DatabaseMapping.mergeChangesIntoObject.

INTERNAL: Merge changes from the source to the target object.
public void
mergeIntoObject(Object target, boolean isTargetUninitialized, Object source, MergeManager mergeManager, AbstractSession targetSession)

Implements abstract org.eclipse.persistence.mappings.DatabaseMapping.mergeIntoObject.

INTERNAL: Merge changes from the source to the target object.
public void
preInitialize(AbstractSession session)

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

INTERNAL: Allow for initialization of properties and validation.
public void
public void
public void
setDefaultEmptyContainer(boolean defaultEmptyContainer)

Implements org.eclipse.persistence.internal.oxm.mappings.XMLContainerMapping.setDefaultEmptyContainer.

INTERNAL Indicate whether by default an empty container should be set on the field/property if the collection is not present in the XML document.
public void
public void
public void
public void
setReuseContainer(boolean reuseContainer)

Implements org.eclipse.persistence.internal.oxm.mappings.XMLContainerMapping.setReuseContainer.

Specify whether the original container on the object should be used if present.
public void
public void
public void
public void
useMapClass(Class<?> concreteMapClass)

public void
useMapClassName(String concreteMapClassName)

Implements org.eclipse.persistence.internal.oxm.mappings.AnyAttributeMapping.useMapClassName.

INTERNAL: Indicates the name of the Map class to be used.
public Object
valueFromRow(AbstractRecord row, JoinedAttributeManager joinManager, ObjectBuildingQuery sourceQuery, CacheKey cacheKey, AbstractSession executionSession, boolean isTargetProtected, Boolean[] wasCacheUsed)

Overrides org.eclipse.persistence.mappings.DatabaseMapping.valueFromRow.

INTERNAL: A subclass should implement this method if it wants different behavior.
public void
writeFromObjectIntoRow(Object object, AbstractRecord row, AbstractSession session, DatabaseMapping.WriteType writeType)

Overrides org.eclipse.persistence.mappings.DatabaseMapping.writeFromObjectIntoRow.

INTERNAL: A subclass should implement this method if it wants different behavior.
public void
writeSingleValue(Object
- The value to be marshalled
attributeValue
,
Object parent, XMLRecord
- The Record the value is being marshalled too.
row
,
AbstractSession session)

Implements org.eclipse.persistence.oxm.mappings.XMLMapping.writeSingleValue, org.eclipse.persistence.internal.oxm.mappings.Mapping.writeSingleValue.

INTERNAL: A method that marshals a single value to the provided Record based on this mapping's XPath.
Inherited from org.eclipse.persistence.mappings.DatabaseMapping:
addUnconvertedPropertybuildBackupCloneForPartObjectbuildChangeRecordbuildCloneForPartObjectbuildContainerClonebuildCopybuildExpressionbuildObjectJoinExpressionbuildObjectJoinExpressionbuildShallowOriginalFromRowcalculateDeferredChangescascadeDiscoverAndPersistUnregisteredNewObjectscascadePerformRemovePrivateOwnedObjectFromChangeSetIfRequiredcloneFieldscollectFieldscollectQueryParametersconvertClassNamesToClassesconvertConverterClassNamesToClassescreateCloneValueHolderderivesIdearlyPreDeleteextractNestedExpressionsextractNestedNonAggregateExpressionsfixRealObjectReferencesgetAttributeAccessorgetAttributeClassificationgetAttributeNamegetAttributeValueFromObjectgetDerivedIdMappinggetDescriptorgetFieldClassificationgetGetMethodNamegetMapsIdValuegetObjectCorrespondingTogetOrderByNormalizedExpressionsgetPropertiesgetPropertygetRealAttributeValueFromAttributegetRealAttributeValueFromObjectgetRealCollectionAttributeValueFromObjectgetReferenceDescriptorgetRelationshipPartnergetSelectFieldsgetSelectTablesgetSetMethodNamegetUnconvertedPropertiesgetValueFromRemoteValueHoldergetWeighthasConstraintDependencyhasDependencyhasInverseConstraintDependencyhasMapsIdValuehasNestedIdentityReferencehasRootExpressionThatShouldUseOuterJoinhasUnconvertedPropertiesinstantiateAttributeisAbstractColumnMappingisAbstractCompositeCollectionMappingisAbstractCompositeDirectCollectionMappingisAbstractCompositeObjectMappingisAbstractDirectMappingisAggregateCollectionMappingisAggregateMappingisAggregateObjectMappingisAttributeValueFromObjectInstantiatedisCacheableisCandidateForPrivateOwnedRemovalisCascadedLockingSupportedisChangeTrackingSupportedisCloningRequiredisCollectionMappingisDatabaseMappingisDirectCollectionMappingisDirectMapMappingisDirectToFieldMappingisDirectToXMLTypeMappingisEISMappingisElementCollectionMappingisForeignReferenceMappingisInAndOutSopObjectisInOnlySopObjectisInSopObjectisJoiningSupportedisJPAIdisLazyisLockableMappingisManyToManyMappingisManyToOneMappingisMapKeyMappingisMultitenantPrimaryKeyMappingisNestedTableMappingisObjectReferenceMappingisOneToManyMappingisOneToOneMappingisOptionalisOutOnlySopObjectisOutSopObjectisOwnedisPrimaryKeyMappingisPrivateOwnedisReadOnlyisReferenceMappingisRelationalMappingisRemotelyInitializedisStructureMappingisTransformationMappingisUnidirectionalOneToManyMappingisUsingMethodAccessisVariableOneToOneMappingiterateOnRealAttributeValueloadloadAllperformDataModificationEventpostCalculateChangespostCalculateChangesOnDeletedpostDeletepostInitializepostInitializeSourceAndTargetExpressionspostInsertpostUpdatepreDeletepreInsertprepareCascadeLockingPolicypreUpdatereadFromResultSetIntoObjectreadFromRowIntoObjectreadOnlyreadWriterecordPrivateOwnedRemovalsrehashFieldDependanciesremoteInitializationremotelyInitializedreplaceValueHoldersInsetAttributeAccessorsetAttributeNamesetChangeListenersetDerivedIdMappingsetDerivesIdsetDescriptorsetFieldssetGetMethodNamesetIsCacheablesetIsInAndOutSopObjectsetIsInSopObjectsetIsJPAIdsetIsLazysetIsMapKeyMappingsetIsOptionalsetIsOutSopObjectsetIsPrimaryKeyMappingsetIsReadOnlysetMapsIdValuesetPropertiessetPropertysetRealAttributeValueInObjectsetSetMethodNamesetWeightsimpleAddToCollectionChangeRecordsimpleRemoveFromCollectionChangeRecordtoStringupdateChangeRecordupdateCollectionChangeRecordvalidateAfterInitializationvalidateBeforeInitializationvalueFromObjectvalueFromResultSetvalueFromRowverifyDeletewriteFromAttributeIntoRowwriteFromObjectIntoRowForShallowInsertwriteFromObjectIntoRowForShallowInsertWithChangeRecordwriteFromObjectIntoRowForUpdatewriteFromObjectIntoRowForUpdateAfterShallowInsertwriteFromObjectIntoRowForUpdateBeforeShallowDeletewriteFromObjectIntoRowForWhereClausewriteFromObjectIntoRowWithChangeRecordwriteInsertFieldsIntoRowwriteUpdateFieldsIntoRow