public class XMLCompositeCollectionMapping extends AbstractCompositeCollectionMapping implements org.eclipse.persistence.internal.oxm.mappings.CompositeCollectionMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,Converter,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLMarshaller,Session,UnmarshalKeepAsElementPolicy,XMLUnmarshaller,XMLRecord>, XMLMapping, XMLNillableMapping
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.
DatabaseMapping.WriteType
converter, field
hasNestedIdentityReference, referenceClass, referenceClassName, referenceDescriptor
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 and Description |
---|
XMLCompositeCollectionMapping() |
Modifier and Type | Method and Description |
---|---|
protected java.lang.Object |
buildCompositeObject(ClassDescriptor descriptor,
org.eclipse.persistence.internal.sessions.AbstractRecord nestedRow,
ObjectBuildingQuery query,
org.eclipse.persistence.internal.identitymaps.CacheKey parentCacheKey,
org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManger,
org.eclipse.persistence.internal.sessions.AbstractSession targetSession) |
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,
DatabaseMapping.WriteType writeType) |
protected org.eclipse.persistence.internal.sessions.AbstractRecord |
buildCompositeRowForDescriptor(ClassDescriptor classDesc,
java.lang.Object attributeValue,
org.eclipse.persistence.internal.sessions.AbstractSession session,
XMLRecord parentRow,
DatabaseMapping.WriteType writeType) |
java.lang.Object |
buildObjectFromNestedRow(org.eclipse.persistence.internal.sessions.AbstractRecord nestedRow,
org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager,
ObjectBuildingQuery sourceQuery,
org.eclipse.persistence.internal.sessions.AbstractSession executionSession,
boolean isTargetProtected) |
void |
convertClassNamesToClasses(java.lang.ClassLoader classLoader)
INTERNAL:
Convert all the class-name-based settings in this mapping to actual class-based
settings.
|
java.lang.Object |
convertDataValueToObjectValue(java.lang.Object value,
Session session,
XMLUnmarshaller unmarshaller)
INTERNAL
|
java.lang.Object |
convertObjectValueToDataValue(java.lang.Object value,
Session session,
XMLMarshaller marshaller)
INTERNAL
|
AttributeAccessor |
getContainerAccessor()
Deprecated.
Replaced by getInverseReferenceMapping().getAttributeAccessor()
|
java.lang.String |
getContainerAttributeName()
Deprecated.
Replaced by getInverseReferenceMapping().getAttributeName()
|
java.lang.String |
getContainerGetMethodName()
Deprecated.
Replaced by getInverseReferenceMapping().getGetMethodName()
|
java.lang.String |
getContainerSetMethodName()
Deprecated.
Replaced by getInverseReferenceMapping().getSetMethodName()
|
protected XMLDescriptor |
getDescriptor(XMLRecord xmlRecord,
org.eclipse.persistence.internal.sessions.AbstractSession session,
javax.xml.namespace.QName rootQName) |
XMLInverseReferenceMapping |
getInverseReferenceMapping() |
UnmarshalKeepAsElementPolicy |
getKeepAsElementPolicy() |
AbstractNullPolicy |
getNullPolicy()
INTERNAL:
Get the AbstractNullPolicy from the Mapping.
|
protected ClassDescriptor |
getReferenceDescriptor(java.lang.Class theClass,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
For inheritance purposes.
|
ClassDescriptor |
getReferenceDescriptor(DOMRecord xmlRecord) |
boolean |
getReuseContainer()
Return true if the original container on the object should be used if
present.
|
AbstractNullPolicy |
getWrapperNullPolicy() |
java.lang.String |
getXPath()
Get the XPath String
|
void |
initialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
The mapping is initialized with the given session.
|
protected void |
initializeMapContainerPolicy(org.eclipse.persistence.internal.sessions.AbstractSession session,
org.eclipse.persistence.internal.queries.MapContainerPolicy cp) |
protected void |
initializeReferenceDescriptorAndField(org.eclipse.persistence.internal.sessions.AbstractSession session) |
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 |
isWriteOnly()
INTERNAL:
Some mappings support no attribute (transformation and multitenant primary key).
|
boolean |
isXMLMapping()
INTERNAL:
|
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 |
setContainerAccessor(AttributeAccessor anAttributeAccessor)
Deprecated.
Replaced by getInverseReferenceMapping().setAttributeAccessor()
|
void |
setContainerAttributeName(java.lang.String attributeName)
Deprecated.
Replaced by getInverseReferenceMapping().setAttributeName()
|
void |
setContainerGetMethodName(java.lang.String methodName)
Deprecated.
Replaced by getInverseReferenceMapping().setGetMethodName()
|
void |
setContainerSetMethodName(java.lang.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 |
setWrapperNullPolicy(AbstractNullPolicy policy) |
void |
setXPath(java.lang.String xpathString)
Set the Mapping field name attribute to the given XPath String
|
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:
Build and return an aggregate collection from the specified row.
|
void |
writeFromObjectIntoRow(java.lang.Object object,
org.eclipse.persistence.internal.sessions.AbstractRecord row,
org.eclipse.persistence.internal.sessions.AbstractSession session,
DatabaseMapping.WriteType writeType)
INTERNAL:
|
void |
writeSingleValue(java.lang.Object value,
java.lang.Object parent,
XMLRecord record,
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.
|
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
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
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
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
useCollectionClass, useCollectionClassName
getReferenceClass, getReferenceClassName, hasConverter, setConverter, setField, setReferenceClass, setReferenceClassName
getAttributeAccessor, getAttributeClassification, getAttributeName, getAttributeValueFromObject, getContainerPolicy, getDescriptor, getField, getReferenceDescriptor, isAbstractCompositeCollectionMapping, isAbstractCompositeDirectCollectionMapping, isAbstractCompositeObjectMapping, isAbstractDirectMapping, isCollectionMapping, isReadOnly, isReferenceMapping, isTransformationMapping, setAttributeAccessor, setAttributeName, setGetMethodName, setIsReadOnly, setProperties, setSetMethodName
getAttributeName, setRealAttributeValueInObject
@Deprecated public AttributeAccessor getContainerAccessor()
@Deprecated public void setContainerAccessor(AttributeAccessor anAttributeAccessor)
anAttributeAccessor
- - the accessor to be used.@Deprecated public void setContainerAttributeName(java.lang.String attributeName)
attributeName
- - the name of the backpointer attribute to be populated@Deprecated public java.lang.String getContainerAttributeName()
@Deprecated public void setContainerGetMethodName(java.lang.String methodName)
methodName
- - the name of the getter method to be used.@Deprecated public java.lang.String getContainerGetMethodName()
@Deprecated public java.lang.String getContainerSetMethodName()
@Deprecated public void setContainerSetMethodName(java.lang.String methodName)
methodName
- - the name of the setter method to be used.public boolean isXMLMapping()
isXMLMapping
in class DatabaseMapping
public void convertClassNamesToClasses(java.lang.ClassLoader classLoader)
AbstractCompositeCollectionMapping
convertClassNamesToClasses
in interface 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>
convertClassNamesToClasses
in interface XMLMapping
convertClassNamesToClasses
in class AbstractCompositeCollectionMapping
public void initialize(org.eclipse.persistence.internal.sessions.AbstractSession session) throws DescriptorException
initialize
in class AbstractCompositeCollectionMapping
DescriptorException
protected void initializeMapContainerPolicy(org.eclipse.persistence.internal.sessions.AbstractSession session, org.eclipse.persistence.internal.queries.MapContainerPolicy cp)
protected void initializeReferenceDescriptorAndField(org.eclipse.persistence.internal.sessions.AbstractSession session)
public java.lang.String getXPath()
public void setXPath(java.lang.String xpathString)
setXPath
in interface org.eclipse.persistence.internal.oxm.mappings.CompositeObjectMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,Converter,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLMarshaller,Session,UnmarshalKeepAsElementPolicy,XMLUnmarshaller,XMLRecord>
xpathString
- Stringprotected java.lang.Object buildCompositeObject(ClassDescriptor descriptor, org.eclipse.persistence.internal.sessions.AbstractRecord nestedRow, ObjectBuildingQuery query, org.eclipse.persistence.internal.identitymaps.CacheKey parentCacheKey, org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManger, org.eclipse.persistence.internal.sessions.AbstractSession targetSession)
buildCompositeObject
in class AbstractCompositeCollectionMapping
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, DatabaseMapping.WriteType writeType)
buildCompositeRow
in class AbstractCompositeCollectionMapping
protected org.eclipse.persistence.internal.sessions.AbstractRecord buildCompositeRowForDescriptor(ClassDescriptor classDesc, java.lang.Object attributeValue, org.eclipse.persistence.internal.sessions.AbstractSession session, XMLRecord parentRow, DatabaseMapping.WriteType writeType)
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
writeFromObjectIntoRow
in class AbstractCompositeCollectionMapping
DescriptorException
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
AbstractCompositeCollectionMapping
valueFromRow
in class AbstractCompositeCollectionMapping
DatabaseException
public java.lang.Object buildObjectFromNestedRow(org.eclipse.persistence.internal.sessions.AbstractRecord nestedRow, org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager, ObjectBuildingQuery sourceQuery, org.eclipse.persistence.internal.sessions.AbstractSession executionSession, boolean isTargetProtected)
public ClassDescriptor getReferenceDescriptor(DOMRecord xmlRecord)
protected ClassDescriptor getReferenceDescriptor(java.lang.Class theClass, org.eclipse.persistence.internal.sessions.AbstractSession session)
AggregateMapping
getReferenceDescriptor
in class AggregateMapping
public void writeSingleValue(java.lang.Object value, java.lang.Object parent, XMLRecord record, org.eclipse.persistence.internal.sessions.AbstractSession session)
XMLMapping
writeSingleValue
in interface 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>
writeSingleValue
in interface XMLMapping
value
- - The value to be marshalledrecord
- - The Record the value is being marshalled too.public void setNullPolicy(AbstractNullPolicy aNullPolicy)
setNullPolicy
in interface org.eclipse.persistence.internal.oxm.mappings.CompositeObjectMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,Converter,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLMarshaller,Session,UnmarshalKeepAsElementPolicy,XMLUnmarshaller,XMLRecord>
setNullPolicy
in interface XMLNillableMapping
aNullPolicy
- public AbstractNullPolicy getNullPolicy()
getNullPolicy
in interface org.eclipse.persistence.internal.oxm.mappings.CompositeObjectMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,Converter,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLMarshaller,Session,UnmarshalKeepAsElementPolicy,XMLUnmarshaller,XMLRecord>
getNullPolicy
in interface XMLNillableMapping
public UnmarshalKeepAsElementPolicy getKeepAsElementPolicy()
getKeepAsElementPolicy
in interface org.eclipse.persistence.internal.oxm.mappings.CompositeObjectMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,Converter,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLMarshaller,Session,UnmarshalKeepAsElementPolicy,XMLUnmarshaller,XMLRecord>
public void setKeepAsElementPolicy(UnmarshalKeepAsElementPolicy keepAsElementPolicy)
setKeepAsElementPolicy
in interface org.eclipse.persistence.internal.oxm.mappings.CompositeObjectMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,Converter,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLMarshaller,Session,UnmarshalKeepAsElementPolicy,XMLUnmarshaller,XMLRecord>
protected XMLDescriptor getDescriptor(XMLRecord xmlRecord, org.eclipse.persistence.internal.sessions.AbstractSession session, javax.xml.namespace.QName rootQName) throws XMLMarshalException
XMLMarshalException
public boolean isWriteOnly()
DatabaseMapping
isWriteOnly
in interface XMLMapping
isWriteOnly
in class DatabaseMapping
public void setIsWriteOnly(boolean b)
setIsWriteOnly
in interface org.eclipse.persistence.internal.oxm.mappings.CompositeObjectMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,Converter,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLMarshaller,Session,UnmarshalKeepAsElementPolicy,XMLUnmarshaller,XMLRecord>
setIsWriteOnly
in interface XMLMapping
public void preInitialize(org.eclipse.persistence.internal.sessions.AbstractSession session) throws DescriptorException
DatabaseMapping
preInitialize
in class DatabaseMapping
DescriptorException
public void setAttributeValueInObject(java.lang.Object object, java.lang.Object value) throws DescriptorException
DatabaseMapping
setAttributeValueInObject
in interface 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>
setAttributeValueInObject
in class DatabaseMapping
DescriptorException
public boolean getReuseContainer()
getReuseContainer
in interface org.eclipse.persistence.internal.oxm.mappings.XMLContainerMapping
public void setReuseContainer(boolean reuseContainer)
setReuseContainer
in interface org.eclipse.persistence.internal.oxm.mappings.XMLContainerMapping
public XMLInverseReferenceMapping getInverseReferenceMapping()
getInverseReferenceMapping
in interface org.eclipse.persistence.internal.oxm.mappings.CompositeObjectMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,Converter,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLMarshaller,Session,UnmarshalKeepAsElementPolicy,XMLUnmarshaller,XMLRecord>
public boolean isDefaultEmptyContainer()
isDefaultEmptyContainer
in interface org.eclipse.persistence.internal.oxm.mappings.XMLContainerMapping
public void setDefaultEmptyContainer(boolean defaultEmptyContainer)
setDefaultEmptyContainer
in interface org.eclipse.persistence.internal.oxm.mappings.XMLContainerMapping
public AbstractNullPolicy getWrapperNullPolicy()
getWrapperNullPolicy
in interface org.eclipse.persistence.internal.oxm.mappings.XMLContainerMapping
public void setWrapperNullPolicy(AbstractNullPolicy policy)
setWrapperNullPolicy
in interface org.eclipse.persistence.internal.oxm.mappings.XMLContainerMapping
public java.lang.Object convertObjectValueToDataValue(java.lang.Object value, Session session, XMLMarshaller marshaller)
convertObjectValueToDataValue
in interface org.eclipse.persistence.internal.oxm.mappings.XMLConverterMapping<XMLMarshaller,Session,XMLUnmarshaller>
public java.lang.Object convertDataValueToObjectValue(java.lang.Object value, Session session, XMLUnmarshaller unmarshaller)
convertDataValueToObjectValue
in interface org.eclipse.persistence.internal.oxm.mappings.XMLConverterMapping<XMLMarshaller,Session,XMLUnmarshaller>