Class XMLAnyAttributeMapping
- java.lang.Object
-
- org.eclipse.persistence.core.mappings.CoreMapping<AttributeAccessor,org.eclipse.persistence.internal.sessions.AbstractSession,org.eclipse.persistence.internal.queries.ContainerPolicy,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField>
-
- org.eclipse.persistence.mappings.DatabaseMapping
-
- org.eclipse.persistence.oxm.mappings.XMLAnyAttributeMapping
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,org.eclipse.persistence.internal.oxm.mappings.AnyAttributeMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLRecord>
,org.eclipse.persistence.internal.oxm.mappings.Mapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLRecord>
,org.eclipse.persistence.internal.oxm.mappings.XMLContainerMapping
,XMLMapping
public class XMLAnyAttributeMapping extends DatabaseMapping implements XMLMapping, org.eclipse.persistence.internal.oxm.mappings.AnyAttributeMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLRecord>
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.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.persistence.mappings.DatabaseMapping
DatabaseMapping.WriteType
-
-
Field Summary
-
Fields inherited from class org.eclipse.persistence.mappings.DatabaseMapping
attributeAccessor, attributeName, derivedIdMapping, derivesId, descriptor, fields, isCacheable, isInSopObject, isJPAId, isLazy, isMapKeyMapping, isOptional, isPrimaryKeyMapping, isReadOnly, isRemotelyInitialized, mapsIdValue, NO_FIELDS, NO_WEIGHT, properties, unconvertedProperties, weight, WEIGHT_AGGREGATE, WEIGHT_DIRECT, WEIGHT_TO_ONE, WEIGHT_TRANSFORM
-
-
Constructor Summary
Constructors Constructor Description XMLAnyAttributeMapping()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
buildBackupClone(java.lang.Object clone, java.lang.Object backup, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork)
INTERNAL: Clone the attribute from the clone and assign it to the backup.void
buildClone(java.lang.Object original, org.eclipse.persistence.internal.identitymaps.CacheKey cacheKey, java.lang.Object clone, java.lang.Integer refreshCascade, org.eclipse.persistence.internal.sessions.AbstractSession cloningSession)
INTERNAL: Clone the attribute from the original and assign it to the clone.void
buildCloneFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord Record, org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager, java.lang.Object clone, org.eclipse.persistence.internal.identitymaps.CacheKey sharedCacheKey, ObjectBuildingQuery sourceQuery, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork, org.eclipse.persistence.internal.sessions.AbstractSession executionSession)
INTERNAL: A combination of readFromRowIntoObject and buildClone.protected org.eclipse.persistence.internal.sessions.AbstractRecord
buildCompositeRow(java.lang.Object attributeValue, org.eclipse.persistence.internal.sessions.AbstractSession session, org.eclipse.persistence.internal.sessions.AbstractRecord parentRow)
void
cascadePerformRemoveIfRequired(java.lang.Object object, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow, java.util.Map visitedObjects)
INTERNAL: Cascade perform delete through mappings that require the cascadevoid
cascadeRegisterNewIfRequired(java.lang.Object object, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow, java.util.Map visitedObjects)
INTERNAL: Cascade registerNew for Create through mappings that require the cascadejava.lang.Object
clone()
INTERNAL: Clones itself.org.eclipse.persistence.internal.sessions.ChangeRecord
compareForChange(java.lang.Object clone, java.lang.Object backup, org.eclipse.persistence.internal.sessions.ObjectChangeSet owner, org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: This method was created in VisualAge.boolean
compareObjects(java.lang.Object firstObject, java.lang.Object secondObject, org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Compare the attributes belonging to this mapping for the objects.void
fixObjectReferences(java.lang.Object object, java.util.Map objectDescriptors, java.util.Map processedObjects, ObjectLevelReadQuery query, DistributedSession session)
INTERNAL: An object has been serialized from the server to the client.org.eclipse.persistence.internal.queries.ContainerPolicy
getContainerPolicy()
INTERNAL: Return the mapping's containerPolicy.protected XMLDescriptor
getDescriptor(XMLRecord xmlRecord, org.eclipse.persistence.internal.sessions.AbstractSession session)
org.eclipse.persistence.internal.helper.DatabaseField
getField()
INTERNAL: Return the field associated with this mapping if there is exactly one.java.util.Vector
getFields()
INTERNAL: Returns a vector of all the fields this mapping represents.boolean
getReuseContainer()
Return true if the original container on the object should be used if present.AbstractNullPolicy
getWrapperNullPolicy()
void
initialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Allow for initialization of properties and validation.boolean
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.boolean
isNamespaceDeclarationIncluded()
boolean
isSchemaInstanceIncluded()
boolean
isWriteOnly()
INTERNAL: Some mappings support no attribute (transformation and multitenant primary key).boolean
isXMLMapping()
INTERNAL: All relational mappings should implement this method to return true.void
iterate(org.eclipse.persistence.internal.descriptors.DescriptorIterator iterator)
INTERNAL: Iterate on the appropriate attribute value.void
mergeChangesIntoObject(java.lang.Object target, org.eclipse.persistence.internal.sessions.ChangeRecord changeRecord, java.lang.Object source, org.eclipse.persistence.internal.sessions.MergeManager mergeManager, org.eclipse.persistence.internal.sessions.AbstractSession targetSession)
INTERNAL: Merge changes from the source to the target object.void
mergeIntoObject(java.lang.Object target, boolean isTargetUninitialized, java.lang.Object source, org.eclipse.persistence.internal.sessions.MergeManager mergeManager, org.eclipse.persistence.internal.sessions.AbstractSession targetSession)
INTERNAL: Merge changes from the source to the target object.void
preInitialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Allow for initialization of properties and validation.void
setAttributeValueInObject(java.lang.Object object, java.lang.Object value)
INTERNAL: Set the value of the attribute mapped by this mapping.void
setContainerPolicy(org.eclipse.persistence.internal.queries.ContainerPolicy cp)
void
setDefaultEmptyContainer(boolean defaultEmptyContainer)
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.void
setField(org.eclipse.persistence.internal.helper.DatabaseField field)
void
setIsWriteOnly(boolean b)
void
setNamespaceDeclarationIncluded(boolean isNamespaceDeclarationIncluded)
void
setReuseContainer(boolean reuseContainer)
Specify whether the original container on the object should be used if present.void
setSchemaInstanceIncluded(boolean isSchemaInstanceIncluded)
void
setWrapperNullPolicy(AbstractNullPolicy policy)
void
setXPath(java.lang.String xpath)
void
useMapClass(java.lang.Class concreteMapClass)
void
useMapClassName(java.lang.String concreteMapClassName)
INTERNAL: Indicates the name of the Map class to be used.java.lang.Object
valueFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord row, org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager, ObjectBuildingQuery sourceQuery, org.eclipse.persistence.internal.identitymaps.CacheKey cacheKey, org.eclipse.persistence.internal.sessions.AbstractSession executionSession, boolean isTargetProtected, java.lang.Boolean[] wasCacheUsed)
INTERNAL: A subclass should implement this method if it wants different behavior.void
writeFromObjectIntoRow(java.lang.Object object, org.eclipse.persistence.internal.sessions.AbstractRecord row, org.eclipse.persistence.internal.sessions.AbstractSession session, DatabaseMapping.WriteType writeType)
INTERNAL: A subclass should implement this method if it wants different behavior.void
writeSingleValue(java.lang.Object attributeValue, java.lang.Object parent, XMLRecord row, org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: A method that marshals a single value to the provided Record based on this mapping's XPath.-
Methods inherited from class org.eclipse.persistence.mappings.DatabaseMapping
addUnconvertedProperty, buildBackupCloneForPartObject, buildChangeRecord, buildCloneForPartObject, buildContainerClone, buildCopy, buildExpression, buildObjectJoinExpression, buildObjectJoinExpression, buildShallowOriginalFromRow, calculateDeferredChanges, cascadeDiscoverAndPersistUnregisteredNewObjects, cascadePerformRemovePrivateOwnedObjectFromChangeSetIfRequired, cloneFields, collectFields, collectQueryParameters, convertClassNamesToClasses, convertConverterClassNamesToClasses, createCloneValueHolder, derivesId, earlyPreDelete, extractNestedExpressions, extractNestedNonAggregateExpressions, fixRealObjectReferences, getAttributeAccessor, getAttributeClassification, getAttributeName, getAttributeValueFromObject, getDerivedIdMapping, getDescriptor, getFieldClassification, getGetMethodName, getMapsIdValue, getObjectCorrespondingTo, getOrderByNormalizedExpressions, getProperties, getProperty, getRealAttributeValueFromAttribute, getRealAttributeValueFromObject, getRealCollectionAttributeValueFromObject, getReferenceDescriptor, getRelationshipPartner, getSelectFields, getSelectTables, getSetMethodName, getUnconvertedProperties, getValueFromRemoteValueHolder, getWeight, hasConstraintDependency, hasDependency, hasInverseConstraintDependency, hasMapsIdValue, hasNestedIdentityReference, hasRootExpressionThatShouldUseOuterJoin, hasUnconvertedProperties, instantiateAttribute, isAbstractColumnMapping, isAbstractCompositeCollectionMapping, isAbstractCompositeDirectCollectionMapping, isAbstractCompositeObjectMapping, isAbstractDirectMapping, isAggregateCollectionMapping, isAggregateMapping, isAggregateObjectMapping, isAttributeValueFromObjectInstantiated, isCacheable, isCandidateForPrivateOwnedRemoval, isCascadedLockingSupported, isChangeTrackingSupported, isCloningRequired, isCollectionMapping, isDatabaseMapping, isDirectCollectionMapping, isDirectMapMapping, isDirectToFieldMapping, isDirectToXMLTypeMapping, isEISMapping, isElementCollectionMapping, isForeignReferenceMapping, isInAndOutSopObject, isInOnlySopObject, isInSopObject, isJoiningSupported, isJPAId, isLazy, isLockableMapping, isManyToManyMapping, isManyToOneMapping, isMapKeyMapping, isMultitenantPrimaryKeyMapping, isNestedTableMapping, isObjectReferenceMapping, isOneToManyMapping, isOneToOneMapping, isOptional, isOutOnlySopObject, isOutSopObject, isOwned, isPrimaryKeyMapping, isPrivateOwned, isReadOnly, isReferenceMapping, isRelationalMapping, isRemotelyInitialized, isStructureMapping, isTransformationMapping, isUnidirectionalOneToManyMapping, isUsingMethodAccess, isVariableOneToOneMapping, iterateOnRealAttributeValue, load, loadAll, performDataModificationEvent, postCalculateChanges, postCalculateChangesOnDeleted, postDelete, postInitialize, postInitializeSourceAndTargetExpressions, postInsert, postUpdate, preDelete, preInsert, prepareCascadeLockingPolicy, preUpdate, readFromResultSetIntoObject, readFromRowIntoObject, readOnly, readWrite, recordPrivateOwnedRemovals, rehashFieldDependancies, remoteInitialization, remotelyInitialized, replaceValueHoldersIn, setAttributeAccessor, setAttributeName, setChangeListener, setDerivedIdMapping, setDerivesId, setDescriptor, setFields, setGetMethodName, setIsCacheable, setIsInAndOutSopObject, setIsInSopObject, setIsJPAId, setIsLazy, setIsMapKeyMapping, setIsOptional, setIsOutSopObject, setIsPrimaryKeyMapping, setIsReadOnly, setMapsIdValue, setProperties, setProperty, setRealAttributeValueInObject, setSetMethodName, setWeight, simpleAddToCollectionChangeRecord, simpleRemoveFromCollectionChangeRecord, toString, updateChangeRecord, updateCollectionChangeRecord, validateAfterInitialization, validateBeforeInitialization, valueFromObject, valueFromResultSet, valueFromRow, verifyDelete, writeFromAttributeIntoRow, writeFromObjectIntoRowForShallowInsert, writeFromObjectIntoRowForShallowInsertWithChangeRecord, writeFromObjectIntoRowForUpdate, writeFromObjectIntoRowForUpdateAfterShallowInsert, writeFromObjectIntoRowForUpdateBeforeShallowDelete, writeFromObjectIntoRowForWhereClause, writeFromObjectIntoRowWithChangeRecord, writeInsertFieldsIntoRow, writeUpdateFieldsIntoRow
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.persistence.internal.oxm.mappings.Mapping
getAttributeAccessor, getAttributeClassification, getAttributeName, getAttributeValueFromObject, getDescriptor, getReferenceDescriptor, isAbstractCompositeCollectionMapping, isAbstractCompositeDirectCollectionMapping, isAbstractCompositeObjectMapping, isAbstractDirectMapping, isCollectionMapping, isReadOnly, isReferenceMapping, isTransformationMapping, setAttributeAccessor, setAttributeName, setGetMethodName, setIsReadOnly, setProperties, setSetMethodName
-
Methods inherited from interface org.eclipse.persistence.oxm.mappings.XMLMapping
convertClassNamesToClasses
-
-
-
-
Method Detail
-
buildBackupClone
public void buildBackupClone(java.lang.Object clone, java.lang.Object backup, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork)
INTERNAL: Clone the attribute from the clone and assign it to the backup.- Specified by:
buildBackupClone
in classDatabaseMapping
-
buildClone
public void buildClone(java.lang.Object original, org.eclipse.persistence.internal.identitymaps.CacheKey cacheKey, java.lang.Object clone, java.lang.Integer refreshCascade, org.eclipse.persistence.internal.sessions.AbstractSession cloningSession)
INTERNAL: Clone the attribute from the original and assign it to the clone.- Specified by:
buildClone
in classDatabaseMapping
-
buildCloneFromRow
public void buildCloneFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord Record, org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager, java.lang.Object clone, org.eclipse.persistence.internal.identitymaps.CacheKey sharedCacheKey, ObjectBuildingQuery sourceQuery, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork, org.eclipse.persistence.internal.sessions.AbstractSession executionSession)
Description copied from class:DatabaseMapping
INTERNAL: A combination of readFromRowIntoObject and buildClone.buildClone assumes the attribute value exists on the original and can simply be copied.
readFromRowIntoObject assumes that one is building an original.
Both of the above assumptions are false in this method, and actually attempts to do both at the same time.
Extract value from the row and set the attribute to this value in the working copy clone. In order to bypass the shared cache when in transaction a UnitOfWork must be able to populate working copies directly from the row.
- Specified by:
buildCloneFromRow
in classDatabaseMapping
-
cascadePerformRemoveIfRequired
public void cascadePerformRemoveIfRequired(java.lang.Object object, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow, java.util.Map visitedObjects)
INTERNAL: Cascade perform delete through mappings that require the cascade- Specified by:
cascadePerformRemoveIfRequired
in classDatabaseMapping
-
cascadeRegisterNewIfRequired
public void cascadeRegisterNewIfRequired(java.lang.Object object, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow, java.util.Map visitedObjects)
INTERNAL: Cascade registerNew for Create through mappings that require the cascade- Specified by:
cascadeRegisterNewIfRequired
in classDatabaseMapping
-
clone
public java.lang.Object clone()
Description copied from class:DatabaseMapping
INTERNAL: Clones itself.- Overrides:
clone
in classDatabaseMapping
-
compareForChange
public org.eclipse.persistence.internal.sessions.ChangeRecord compareForChange(java.lang.Object clone, java.lang.Object backup, org.eclipse.persistence.internal.sessions.ObjectChangeSet owner, org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: This method was created in VisualAge.- Specified by:
compareForChange
in classDatabaseMapping
- Returns:
- prototype.changeset.ChangeRecord
-
compareObjects
public boolean compareObjects(java.lang.Object firstObject, java.lang.Object secondObject, org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Compare the attributes belonging to this mapping for the objects.- Specified by:
compareObjects
in classDatabaseMapping
-
fixObjectReferences
public void fixObjectReferences(java.lang.Object object, java.util.Map objectDescriptors, java.util.Map processedObjects, ObjectLevelReadQuery query, DistributedSession session)
INTERNAL: An object has been serialized from the server to the client. Replace the transient attributes of the remote value holders with client-side objects.- Specified by:
fixObjectReferences
in classDatabaseMapping
-
getContainerPolicy
public org.eclipse.persistence.internal.queries.ContainerPolicy getContainerPolicy()
INTERNAL: Return the mapping's containerPolicy.- Specified by:
getContainerPolicy
in interfaceorg.eclipse.persistence.internal.oxm.mappings.Mapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLRecord>
- Overrides:
getContainerPolicy
in classDatabaseMapping
-
getField
public org.eclipse.persistence.internal.helper.DatabaseField getField()
Description copied from class:DatabaseMapping
INTERNAL: Return the field associated with this mapping if there is exactly one. This is required for object relational mapping to print them, but because they are defined in in an Enterprise context they cannot be cast to. Mappings that have a field include direct mappings and object relational mappings.- Specified by:
getField
in interfaceorg.eclipse.persistence.internal.oxm.mappings.Mapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLRecord>
- Overrides:
getField
in classDatabaseMapping
-
initialize
public void initialize(org.eclipse.persistence.internal.sessions.AbstractSession session) throws DescriptorException
Description copied from class:DatabaseMapping
INTERNAL: Allow for initialization of properties and validation.- Overrides:
initialize
in classDatabaseMapping
- Throws:
DescriptorException
-
iterate
public void iterate(org.eclipse.persistence.internal.descriptors.DescriptorIterator iterator)
INTERNAL: Iterate on the appropriate attribute value.- Specified by:
iterate
in classDatabaseMapping
-
setXPath
public void setXPath(java.lang.String xpath)
-
mergeChangesIntoObject
public void mergeChangesIntoObject(java.lang.Object target, org.eclipse.persistence.internal.sessions.ChangeRecord changeRecord, java.lang.Object source, org.eclipse.persistence.internal.sessions.MergeManager mergeManager, org.eclipse.persistence.internal.sessions.AbstractSession targetSession)
INTERNAL: Merge changes from the source to the target object.- Specified by:
mergeChangesIntoObject
in classDatabaseMapping
-
mergeIntoObject
public void mergeIntoObject(java.lang.Object target, boolean isTargetUninitialized, java.lang.Object source, org.eclipse.persistence.internal.sessions.MergeManager mergeManager, org.eclipse.persistence.internal.sessions.AbstractSession targetSession)
INTERNAL: Merge changes from the source to the target object.- Specified by:
mergeIntoObject
in classDatabaseMapping
-
setContainerPolicy
public void setContainerPolicy(org.eclipse.persistence.internal.queries.ContainerPolicy cp)
-
setField
public void setField(org.eclipse.persistence.internal.helper.DatabaseField field)
- Specified by:
setField
in interfaceorg.eclipse.persistence.internal.oxm.mappings.AnyAttributeMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLRecord>
-
valueFromRow
public java.lang.Object valueFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord row, org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager, ObjectBuildingQuery sourceQuery, org.eclipse.persistence.internal.identitymaps.CacheKey cacheKey, org.eclipse.persistence.internal.sessions.AbstractSession executionSession, boolean isTargetProtected, java.lang.Boolean[] wasCacheUsed) throws DatabaseException
Description copied from class:DatabaseMapping
INTERNAL: A subclass should implement this method if it wants different behavior. Returns the value for the mapping from the database row. The execution session is the session the query was executed on, and its platform should be used for data conversion.- Overrides:
valueFromRow
in classDatabaseMapping
- Throws:
DatabaseException
-
getDescriptor
protected XMLDescriptor getDescriptor(XMLRecord xmlRecord, org.eclipse.persistence.internal.sessions.AbstractSession session) throws XMLMarshalException
- Throws:
XMLMarshalException
-
writeFromObjectIntoRow
public void writeFromObjectIntoRow(java.lang.Object object, org.eclipse.persistence.internal.sessions.AbstractRecord row, org.eclipse.persistence.internal.sessions.AbstractSession session, DatabaseMapping.WriteType writeType) throws DescriptorException
Description copied from class:DatabaseMapping
INTERNAL: A subclass should implement this method if it wants different behavior. Write the attribute value from the object to the row.- Overrides:
writeFromObjectIntoRow
in classDatabaseMapping
- Throws:
DescriptorException
-
buildCompositeRow
protected org.eclipse.persistence.internal.sessions.AbstractRecord buildCompositeRow(java.lang.Object attributeValue, org.eclipse.persistence.internal.sessions.AbstractSession session, org.eclipse.persistence.internal.sessions.AbstractRecord parentRow)
-
isXMLMapping
public boolean isXMLMapping()
Description copied from class:DatabaseMapping
INTERNAL: All relational mappings should implement this method to return true.- Overrides:
isXMLMapping
in classDatabaseMapping
-
getFields
public java.util.Vector getFields()
Description copied from class:DatabaseMapping
INTERNAL: Returns a vector of all the fields this mapping represents.- Overrides:
getFields
in classDatabaseMapping
-
useMapClass
public void useMapClass(java.lang.Class concreteMapClass)
-
writeSingleValue
public void writeSingleValue(java.lang.Object attributeValue, java.lang.Object parent, XMLRecord row, org.eclipse.persistence.internal.sessions.AbstractSession session)
Description copied from interface:XMLMapping
INTERNAL: A method that marshals a single value to the provided Record based on this mapping's XPath. Used for Sequenced marshalling.- Specified by:
writeSingleValue
in interfaceorg.eclipse.persistence.internal.oxm.mappings.Mapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLRecord>
- Specified by:
writeSingleValue
in interfaceXMLMapping
- Parameters:
attributeValue
- - The value to be marshalledrow
- - The Record the value is being marshalled too.
-
useMapClassName
public void useMapClassName(java.lang.String concreteMapClassName)
INTERNAL: Indicates the name of the Map class to be used.- Specified by:
useMapClassName
in interfaceorg.eclipse.persistence.internal.oxm.mappings.AnyAttributeMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLRecord>
- Parameters:
concreteMapClassName
-
-
isNamespaceDeclarationIncluded
public boolean isNamespaceDeclarationIncluded()
- Specified by:
isNamespaceDeclarationIncluded
in interfaceorg.eclipse.persistence.internal.oxm.mappings.AnyAttributeMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLRecord>
-
setNamespaceDeclarationIncluded
public void setNamespaceDeclarationIncluded(boolean isNamespaceDeclarationIncluded)
- Specified by:
setNamespaceDeclarationIncluded
in interfaceorg.eclipse.persistence.internal.oxm.mappings.AnyAttributeMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLRecord>
-
isSchemaInstanceIncluded
public boolean isSchemaInstanceIncluded()
- Specified by:
isSchemaInstanceIncluded
in interfaceorg.eclipse.persistence.internal.oxm.mappings.AnyAttributeMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLRecord>
-
setSchemaInstanceIncluded
public void setSchemaInstanceIncluded(boolean isSchemaInstanceIncluded)
- Specified by:
setSchemaInstanceIncluded
in interfaceorg.eclipse.persistence.internal.oxm.mappings.AnyAttributeMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLRecord>
-
isWriteOnly
public boolean isWriteOnly()
Description copied from class:DatabaseMapping
INTERNAL: Some mappings support no attribute (transformation and multitenant primary key).- Specified by:
isWriteOnly
in interfaceXMLMapping
- Overrides:
isWriteOnly
in classDatabaseMapping
-
setIsWriteOnly
public void setIsWriteOnly(boolean b)
- Specified by:
setIsWriteOnly
in interfaceorg.eclipse.persistence.internal.oxm.mappings.AnyAttributeMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLRecord>
- Specified by:
setIsWriteOnly
in interfaceXMLMapping
-
setAttributeValueInObject
public void setAttributeValueInObject(java.lang.Object object, java.lang.Object value) throws DescriptorException
Description copied from class:DatabaseMapping
INTERNAL: Set the value of the attribute mapped by this mapping.- Specified by:
setAttributeValueInObject
in interfaceorg.eclipse.persistence.internal.oxm.mappings.Mapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLRecord>
- Overrides:
setAttributeValueInObject
in classDatabaseMapping
- Throws:
DescriptorException
-
preInitialize
public void preInitialize(org.eclipse.persistence.internal.sessions.AbstractSession session) throws DescriptorException
Description copied from class:DatabaseMapping
INTERNAL: Allow for initialization of properties and validation.- Overrides:
preInitialize
in classDatabaseMapping
- Throws:
DescriptorException
-
getReuseContainer
public boolean getReuseContainer()
Return true if the original container on the object should be used if present. If it is not present then the container policy will be used to create the container.- Specified by:
getReuseContainer
in interfaceorg.eclipse.persistence.internal.oxm.mappings.XMLContainerMapping
-
setReuseContainer
public void setReuseContainer(boolean reuseContainer)
Specify whether the original container on the object should be used if present. If it is not present then the container policy will be used to create the container.- Specified by:
setReuseContainer
in interfaceorg.eclipse.persistence.internal.oxm.mappings.XMLContainerMapping
-
isDefaultEmptyContainer
public boolean 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.- Specified by:
isDefaultEmptyContainer
in interfaceorg.eclipse.persistence.internal.oxm.mappings.XMLContainerMapping
- Since:
- EclipseLink 2.3.3
-
setDefaultEmptyContainer
public void setDefaultEmptyContainer(boolean defaultEmptyContainer)
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.- Specified by:
setDefaultEmptyContainer
in interfaceorg.eclipse.persistence.internal.oxm.mappings.XMLContainerMapping
- Since:
- EclipseLink 2.3.3
-
getWrapperNullPolicy
public AbstractNullPolicy getWrapperNullPolicy()
- Specified by:
getWrapperNullPolicy
in interfaceorg.eclipse.persistence.internal.oxm.mappings.XMLContainerMapping
-
setWrapperNullPolicy
public void setWrapperNullPolicy(AbstractNullPolicy policy)
- Specified by:
setWrapperNullPolicy
in interfaceorg.eclipse.persistence.internal.oxm.mappings.XMLContainerMapping
-
-