Class XMLCompositeCollectionMapping
- All Implemented Interfaces:
Serializable
,Cloneable
,CompositeCollectionMapping<AbstractSession,
,AttributeAccessor, ContainerPolicy, Converter, ClassDescriptor, DatabaseField, XMLMarshaller, Session, UnmarshalKeepAsElementPolicy, XMLUnmarshaller, XMLRecord> CompositeObjectMapping<AbstractSession,
,AttributeAccessor, ContainerPolicy, Converter, ClassDescriptor, DatabaseField, XMLMarshaller, Session, UnmarshalKeepAsElementPolicy, XMLUnmarshaller, XMLRecord> Mapping<AbstractSession,
,AttributeAccessor, ContainerPolicy, ClassDescriptor, DatabaseField, XMLRecord> XMLContainerMapping
,XMLConverterMapping<XMLMarshaller,
,Session, XMLUnmarshaller> ContainerMapping
,ArrayCollectionMapping
,XMLMapping
,XMLNillableMapping
- Direct Known Subclasses:
XMLVariableXPathCollectionMapping
Composite collection XML mappings map an attribute that contains a homogeneous collection of objects to multiple XML elements. Use composite collection XML mappings to represent one-to-many relationships. Composite collection XML mappings can reference any class that has a TopLink descriptor. The attribute in the object mapped must implement either the Java Collection interface (for example, Vector or HashSet) or Map interface (for example, Hashtable or TreeMap). The CompositeCollectionMapping class allows a reference to the mapped class and the indexing type for that class. This mapping is, by definition, privately owned.
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 path and positional information; the last node in the XPath forms the local
root node for the composite object. The XPath is specified on the mapping using the setXPath
method.
The following XPath statements may be used to specify the location of XML data relating to an object's name attribute:
XPath | Description |
---|---|
phone-number | The phone number information is stored in the phone-number element. |
contact-info/phone-number | The XPath statement may be used to specify any valid path. |
phone-number[2] | The XPath statement may contain positional information. In this case the phone number information is stored in the second occurrence of the phone-number element. |
Mapping a Composite Collection:
XML Schema
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="customer" type="customer-type"/>
<xsd:complexType name="customer-type">
<xsd:sequence>
<xsd:element name="first-name" type="xsd:string"/>
<xsd:element name="last-name" type="xsd:string"/>
<xsd:element name="phone-number">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="number" type="xsd:string"/>
</xsd:sequence>
<xsd:attribute name="type" type="xsd:string"/>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
Code Sample
XMLCompositeCollectionMapping phoneNumbersMapping = new XMLCompositeCollectionMapping();
phoneNumbersMapping.setAttributeName("phoneNumbers");
phoneNumbersMapping.setXPath("phone-number");
phoneNumbersMapping.setReferenceClass(PhoneNumber.class);
More Information: For more information about using the XML Composite Collection Mapping, see the "Understanding XML Mappings" chapter of the Oracle TopLink Developer's Guide.
- Since:
- Oracle TopLink 10g Release 2 (10.1.3)
- See Also:
-
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.foundation.AbstractCompositeCollectionMapping
converter, field
Fields inherited from class org.eclipse.persistence.mappings.AggregateMapping
hasNestedIdentityReference, referenceClass, referenceClassName, referenceDescriptor
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
Fields inherited from interface org.eclipse.persistence.internal.oxm.mappings.XMLContainerMapping
EMPTY_CONTAINER_DEFAULT
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Object
buildCompositeObject
(ClassDescriptor descriptor, AbstractRecord nestedRow, ObjectBuildingQuery query, CacheKey parentCacheKey, JoinedAttributeManager joinManger, AbstractSession targetSession) protected AbstractRecord
buildCompositeRow
(Object attributeValue, AbstractSession session, AbstractRecord parentRow, DatabaseMapping.WriteType writeType) protected AbstractRecord
buildCompositeRowForDescriptor
(ClassDescriptor classDesc, Object attributeValue, AbstractSession session, XMLRecord parentRow, DatabaseMapping.WriteType writeType) buildObjectFromNestedRow
(AbstractRecord nestedRow, JoinedAttributeManager joinManager, ObjectBuildingQuery sourceQuery, AbstractSession executionSession, boolean isTargetProtected) void
convertClassNamesToClasses
(ClassLoader classLoader) INTERNAL: Convert all the class-name-based settings in this mapping to actual class-based settings.convertDataValueToObjectValue
(Object value, Session session, XMLUnmarshaller unmarshaller) INTERNALconvertObjectValueToDataValue
(Object value, Session session, XMLMarshaller marshaller) INTERNALDeprecated.Replaced by getInverseReferenceMapping().getAttributeAccessor()Deprecated.Replaced by getInverseReferenceMapping().getAttributeName()Deprecated.Replaced by getInverseReferenceMapping().getGetMethodName()Deprecated.Replaced by getInverseReferenceMapping().getSetMethodName()protected XMLDescriptor
getDescriptor
(XMLRecord xmlRecord, AbstractSession session, QName rootQName) INTERNAL: Get the AbstractNullPolicy from the Mapping.
The default policy is NullPolicy.protected ClassDescriptor
getReferenceDescriptor
(Class<?> theClass, AbstractSession session) INTERNAL: For inheritance purposes.getReferenceDescriptor
(DOMRecord xmlRecord) boolean
Return true if the original container on the object should be used if present.Get the Wrapper NullPolicy from the Mapping.getXPath()
Get the XPath Stringvoid
initialize
(AbstractSession session) INTERNAL: The mapping is initialized with the given session.protected void
protected void
boolean
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
INTERNAL: Some mappings support no attribute (transformation and multitenant primary key).boolean
INTERNAL:void
preInitialize
(AbstractSession session) INTERNAL: Allow for initialization of properties and validation.void
setAttributeValueInObject
(Object object, Object value) INTERNAL: Set the value of the attribute mapped by this mapping.void
setContainerAccessor
(AttributeAccessor anAttributeAccessor) Deprecated.Replaced by getInverseReferenceMapping().setAttributeAccessor()void
setContainerAttributeName
(String attributeName) Deprecated.Replaced by getInverseReferenceMapping().setAttributeName()void
setContainerGetMethodName
(String methodName) Deprecated.Replaced by getInverseReferenceMapping().setGetMethodName()void
setContainerSetMethodName
(String methodName) Deprecated.Replaced by getInverseReferenceMapping().setSetMethodName()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
setIsWriteOnly
(boolean b) void
setKeepAsElementPolicy
(UnmarshalKeepAsElementPolicy keepAsElementPolicy) void
setNullPolicy
(AbstractNullPolicy aNullPolicy) Set the AbstractNullPolicy on the mapping
The default policy is NullPolicy.void
setReuseContainer
(boolean reuseContainer) Specify whether the original container on the object should be used if present.void
Set the Wrapper NullPolicy on the Mapping.void
Set the Mapping field name attribute to the given XPath StringvalueFromRow
(AbstractRecord row, JoinedAttributeManager joinManager, ObjectBuildingQuery sourceQuery, CacheKey cacheKey, AbstractSession executionSession, boolean isTargetProtected, Boolean[] wasCacheUsed) INTERNAL: Build and return an aggregate collection from the specified row.void
writeFromObjectIntoRow
(Object object, AbstractRecord row, AbstractSession session, DatabaseMapping.WriteType writeType) INTERNAL:void
writeSingleValue
(Object value, Object parent, XMLRecord record, 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.foundation.AbstractCompositeCollectionMapping
buildAddedElementFromChangeSet, buildBackupClonePart, buildChangeSet, buildClonePart, buildCopyOfAttributeValue, buildElementFromChangeSet, buildElementFromElement, buildExpression, buildRemovedElementFromChangeSet, cascadeDiscoverAndPersistUnregisteredNewObjects, cascadePerformRemoveIfRequired, cascadeRegisterNewIfRequired, collectFields, compareElements, compareElementsForChange, compareForChange, compareObjects, convertToChangeRecord, createMapComponentFromRow, fixAttributeValue, getAttributeValueFromBackupClone, getContainerPolicy, getConverter, getField, getRealCollectionAttributeValueFromObject, getStructureName, hasConverter, isAbstractCompositeCollectionMapping, isCollectionMapping, iterateOnAttributeValue, mapKeyHasChanged, mergeChangesIntoObject, mergeIntoObject, postDeleteAttributeValue, postInsertAttributeValue, postUpdateAttributeValue, preDeleteAttributeValue, preInsertAttributeValue, preUpdateAttributeValue, setContainerPolicy, setConverter, setField, simpleAddToCollectionChangeRecord, simpleRemoveFromCollectionChangeRecord, useCollectionClass, useCollectionClassName, useListClassName, useMapClass, useMapClassName, verifyDeleteOfAttributeValue, writeFromObjectIntoRowForUpdate, writeFromObjectIntoRowWithChangeRecord, writeInsertFieldsIntoRow
Methods inherited from class org.eclipse.persistence.mappings.AggregateMapping
buildAggregateDeleteQuery, buildAggregateModifyQuery, buildAggregateWriteQuery, buildBackupClone, buildClone, buildCloneFromRow, buildClonePart, buildCopy, buildNewMergeInstanceOf, compareAttributeValues, executeEvent, fixObjectReferences, getObjectBuilder, getObjectBuilderForClass, getQueryManager, getReferenceClass, getReferenceClassName, getReferenceDescriptor, getReferenceDescriptor, hasNestedIdentityReference, isAggregateMapping, iterate, load, loadAll, mergeAttributeValue, postDelete, postInsert, postUpdate, preDelete, preInsert, preUpdate, remoteInitialization, setReferenceClass, setReferenceClassName, setReferenceDescriptor, updateChangeRecord, verifyDelete
Methods inherited from class org.eclipse.persistence.mappings.DatabaseMapping
addUnconvertedProperty, buildBackupCloneForPartObject, buildChangeRecord, buildCloneForPartObject, buildContainerClone, buildObjectJoinExpression, buildObjectJoinExpression, buildShallowOriginalFromRow, calculateDeferredChanges, cascadePerformRemovePrivateOwnedObjectFromChangeSetIfRequired, clone, cloneFields, collectQueryParameters, convertConverterClassNamesToClasses, createCloneValueHolder, derivesId, earlyPreDelete, extractNestedExpressions, extractNestedNonAggregateExpressions, fixRealObjectReferences, getAttributeAccessor, getAttributeClassification, getAttributeName, getAttributeValueFromObject, getDerivedIdMapping, getDescriptor, getFieldClassification, getFields, getGetMethodName, getMapsIdValue, getObjectCorrespondingTo, getOrderByNormalizedExpressions, getProperties, getProperty, getRealAttributeValueFromAttribute, getRealAttributeValueFromObject, getRelationshipPartner, getSelectFields, getSelectTables, getSetMethodName, getUnconvertedProperties, getValueFromRemoteValueHolder, getWeight, hasConstraintDependency, hasDependency, hasInverseConstraintDependency, hasMapsIdValue, hasRootExpressionThatShouldUseOuterJoin, hasUnconvertedProperties, instantiateAttribute, isAbstractColumnMapping, isAbstractCompositeDirectCollectionMapping, isAbstractCompositeObjectMapping, isAbstractDirectMapping, isAggregateCollectionMapping, isAggregateObjectMapping, isAttributeValueFromObjectInstantiated, isCacheable, isCandidateForPrivateOwnedRemoval, isCascadedLockingSupported, isChangeTrackingSupported, isCloningRequired, 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, performDataModificationEvent, postCalculateChanges, postCalculateChangesOnDeleted, postInitialize, postInitializeSourceAndTargetExpressions, prepareCascadeLockingPolicy, readFromResultSetIntoObject, readFromRowIntoObject, readOnly, readWrite, recordPrivateOwnedRemovals, rehashFieldDependancies, 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, toString, updateCollectionChangeRecord, validateAfterInitialization, validateBeforeInitialization, valueFromObject, valueFromResultSet, valueFromRow, writeFromAttributeIntoRow, writeFromObjectIntoRowForShallowInsert, writeFromObjectIntoRowForShallowInsertWithChangeRecord, writeFromObjectIntoRowForUpdateAfterShallowInsert, writeFromObjectIntoRowForUpdateBeforeShallowDelete, writeFromObjectIntoRowForWhereClause, writeUpdateFieldsIntoRow
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.eclipse.persistence.mappings.structures.ArrayCollectionMapping
getAttributeName, setRealAttributeValueInObject
Methods inherited from interface org.eclipse.persistence.internal.oxm.mappings.CompositeCollectionMapping
useCollectionClass, useCollectionClassName
Methods inherited from interface org.eclipse.persistence.internal.oxm.mappings.CompositeObjectMapping
getReferenceClass, getReferenceClassName, hasConverter, setConverter, setField, setReferenceClass, setReferenceClassName
Methods inherited from interface org.eclipse.persistence.internal.oxm.mappings.Mapping
getAttributeAccessor, getAttributeClassification, getAttributeName, getAttributeValueFromObject, getContainerPolicy, getDescriptor, getField, getReferenceDescriptor, isAbstractCompositeCollectionMapping, isAbstractCompositeDirectCollectionMapping, isAbstractCompositeObjectMapping, isAbstractDirectMapping, isCollectionMapping, isReadOnly, isReferenceMapping, isTransformationMapping, setAttributeAccessor, setAttributeName, setGetMethodName, setIsReadOnly, setProperties, setSetMethodName
-
Constructor Details
-
XMLCompositeCollectionMapping
public XMLCompositeCollectionMapping()
-
-
Method Details
-
getContainerAccessor
Deprecated.Replaced by getInverseReferenceMapping().getAttributeAccessor()Gets the AttributeAccessor that is used to get and set the value of the container on the target object. -
setContainerAccessor
Deprecated.Replaced by getInverseReferenceMapping().setAttributeAccessor()Sets the AttributeAccessor that is used to get and set the value of the container on the target object.- Parameters:
anAttributeAccessor
- - the accessor to be used.
-
setContainerAttributeName
Deprecated.Replaced by getInverseReferenceMapping().setAttributeName()Sets the name of the backpointer attribute on the target object. Used to populate the backpointer. If the specified attribute doesn't exist on the reference class of this mapping, a DescriptorException will be thrown during initialize.- Parameters:
attributeName
- - the name of the backpointer attribute to be populated
-
getContainerAttributeName
Deprecated.Replaced by getInverseReferenceMapping().getAttributeName()Gets the name of the backpointer attribute on the target object. -
setContainerGetMethodName
Deprecated.Replaced by getInverseReferenceMapping().setGetMethodName()Sets the method name to be used when accessing the value of the back pointer on the target object of this mapping. If the specified method isn't declared on the reference class of this mapping, a DescriptorException will be thrown during initialize.- Parameters:
methodName
- - the name of the getter method to be used.
-
getContainerGetMethodName
Deprecated.Replaced by getInverseReferenceMapping().getGetMethodName()Gets the name of the method to be used when accessing the value of the back pointer on the target object of this mapping. -
getContainerSetMethodName
Deprecated.Replaced by getInverseReferenceMapping().getSetMethodName()Gets the name of the method to be used when setting the value of the back pointer on the target object of this mapping. -
setContainerSetMethodName
Deprecated.Replaced by getInverseReferenceMapping().setSetMethodName()Sets the name of the method to be used when setting the value of the back pointer on the target object of this mapping. If the specified method isn't declared on the reference class of this mapping, a DescriptorException will be raised during initialize.- Parameters:
methodName
- - the name of the setter method to be used.
-
isXMLMapping
public boolean isXMLMapping()INTERNAL:- Overrides:
isXMLMapping
in classDatabaseMapping
-
convertClassNamesToClasses
Description copied from class:AbstractCompositeCollectionMapping
INTERNAL: Convert all the class-name-based settings in this mapping to actual class-based settings. This method is used when converting a project that has been built with class names to a project with classes.- Specified by:
convertClassNamesToClasses
in interfaceMapping<AbstractSession,
AttributeAccessor, ContainerPolicy, ClassDescriptor, DatabaseField, XMLRecord> - Specified by:
convertClassNamesToClasses
in interfaceXMLMapping
- Overrides:
convertClassNamesToClasses
in classAbstractCompositeCollectionMapping
- Parameters:
classLoader
- TODO
-
initialize
INTERNAL: The mapping is initialized with the given session. This mapping is fully initialized after this.- Overrides:
initialize
in classAbstractCompositeCollectionMapping
- Throws:
DescriptorException
-
initializeMapContainerPolicy
-
initializeReferenceDescriptorAndField
-
getXPath
Get the XPath String- Returns:
- String the XPath String associated with this Mapping *
-
setXPath
Set the Mapping field name attribute to the given XPath String- Specified by:
setXPath
in interfaceCompositeObjectMapping<AbstractSession,
AttributeAccessor, ContainerPolicy, Converter, ClassDescriptor, DatabaseField, XMLMarshaller, Session, UnmarshalKeepAsElementPolicy, XMLUnmarshaller, XMLRecord> - Parameters:
xpathString
- String
-
buildCompositeObject
protected Object buildCompositeObject(ClassDescriptor descriptor, AbstractRecord nestedRow, ObjectBuildingQuery query, CacheKey parentCacheKey, JoinedAttributeManager joinManger, AbstractSession targetSession) - Specified by:
buildCompositeObject
in classAbstractCompositeCollectionMapping
-
buildCompositeRow
protected AbstractRecord buildCompositeRow(Object attributeValue, AbstractSession session, AbstractRecord parentRow, DatabaseMapping.WriteType writeType) - Specified by:
buildCompositeRow
in classAbstractCompositeCollectionMapping
-
buildCompositeRowForDescriptor
protected AbstractRecord buildCompositeRowForDescriptor(ClassDescriptor classDesc, Object attributeValue, AbstractSession session, XMLRecord parentRow, DatabaseMapping.WriteType writeType) -
writeFromObjectIntoRow
public void writeFromObjectIntoRow(Object object, AbstractRecord row, AbstractSession session, DatabaseMapping.WriteType writeType) throws DescriptorException INTERNAL:- Overrides:
writeFromObjectIntoRow
in classAbstractCompositeCollectionMapping
- Throws:
DescriptorException
-
valueFromRow
public Object valueFromRow(AbstractRecord row, JoinedAttributeManager joinManager, ObjectBuildingQuery sourceQuery, CacheKey cacheKey, AbstractSession executionSession, boolean isTargetProtected, Boolean[] wasCacheUsed) throws DatabaseException Description copied from class:AbstractCompositeCollectionMapping
INTERNAL: Build and return an aggregate collection from the specified row.- Overrides:
valueFromRow
in classAbstractCompositeCollectionMapping
- Throws:
DatabaseException
-
buildObjectFromNestedRow
public Object buildObjectFromNestedRow(AbstractRecord nestedRow, JoinedAttributeManager joinManager, ObjectBuildingQuery sourceQuery, AbstractSession executionSession, boolean isTargetProtected) -
getReferenceDescriptor
-
getReferenceDescriptor
Description copied from class:AggregateMapping
INTERNAL: For inheritance purposes.- Overrides:
getReferenceDescriptor
in classAggregateMapping
-
writeSingleValue
public void writeSingleValue(Object value, Object parent, XMLRecord record, 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 interfaceMapping<AbstractSession,
AttributeAccessor, ContainerPolicy, ClassDescriptor, DatabaseField, XMLRecord> - Specified by:
writeSingleValue
in interfaceXMLMapping
- Parameters:
value
- - The value to be marshalledrecord
- - The Record the value is being marshalled too.
-
setNullPolicy
Set the AbstractNullPolicy on the mapping
The default policy is NullPolicy.- Specified by:
setNullPolicy
in interfaceCompositeObjectMapping<AbstractSession,
AttributeAccessor, ContainerPolicy, Converter, ClassDescriptor, DatabaseField, XMLMarshaller, Session, UnmarshalKeepAsElementPolicy, XMLUnmarshaller, XMLRecord> - Specified by:
setNullPolicy
in interfaceXMLNillableMapping
-
getNullPolicy
INTERNAL: Get the AbstractNullPolicy from the Mapping.
The default policy is NullPolicy.- Specified by:
getNullPolicy
in interfaceCompositeObjectMapping<AbstractSession,
AttributeAccessor, ContainerPolicy, Converter, ClassDescriptor, DatabaseField, XMLMarshaller, Session, UnmarshalKeepAsElementPolicy, XMLUnmarshaller, XMLRecord> - Specified by:
getNullPolicy
in interfaceXMLNillableMapping
-
getKeepAsElementPolicy
-
setKeepAsElementPolicy
-
getDescriptor
protected XMLDescriptor getDescriptor(XMLRecord xmlRecord, AbstractSession session, QName rootQName) throws XMLMarshalException - Throws:
XMLMarshalException
-
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
- Returns:
- TODO
-
setIsWriteOnly
public void setIsWriteOnly(boolean b) - Specified by:
setIsWriteOnly
in interfaceCompositeObjectMapping<AbstractSession,
AttributeAccessor, ContainerPolicy, Converter, ClassDescriptor, DatabaseField, XMLMarshaller, Session, UnmarshalKeepAsElementPolicy, XMLUnmarshaller, XMLRecord> - Specified by:
setIsWriteOnly
in interfaceXMLMapping
-
preInitialize
Description copied from class:DatabaseMapping
INTERNAL: Allow for initialization of properties and validation.- Overrides:
preInitialize
in classDatabaseMapping
- Throws:
DescriptorException
-
setAttributeValueInObject
Description copied from class:DatabaseMapping
INTERNAL: Set the value of the attribute mapped by this mapping.- Specified by:
setAttributeValueInObject
in interfaceMapping<AbstractSession,
AttributeAccessor, ContainerPolicy, ClassDescriptor, DatabaseField, XMLRecord> - Overrides:
setAttributeValueInObject
in classDatabaseMapping
- Parameters:
object
- TODOvalue
- TODO- 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 interfaceXMLContainerMapping
-
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 interfaceXMLContainerMapping
-
getInverseReferenceMapping
-
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 interfaceXMLContainerMapping
- 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 interfaceXMLContainerMapping
- Since:
- EclipseLink 2.3.3
-
getWrapperNullPolicy
Description copied from interface:XMLContainerMapping
Get the Wrapper NullPolicy from the Mapping.- Specified by:
getWrapperNullPolicy
in interfaceXMLContainerMapping
-
setWrapperNullPolicy
Description copied from interface:XMLContainerMapping
Set the Wrapper NullPolicy on the Mapping.- Specified by:
setWrapperNullPolicy
in interfaceXMLContainerMapping
-
convertObjectValueToDataValue
public Object convertObjectValueToDataValue(Object value, Session session, XMLMarshaller marshaller) INTERNAL- Specified by:
convertObjectValueToDataValue
in interfaceXMLConverterMapping<XMLMarshaller,
Session, XMLUnmarshaller> - Since:
- EclipseLink 2.5.0
-
convertDataValueToObjectValue
public Object convertDataValueToObjectValue(Object value, Session session, XMLUnmarshaller unmarshaller) INTERNAL- Specified by:
convertDataValueToObjectValue
in interfaceXMLConverterMapping<XMLMarshaller,
Session, XMLUnmarshaller> - Since:
- EclipseLink 2.5.0
-