public class XMLAnyCollectionMapping extends XMLAbstractAnyMapping implements org.eclipse.persistence.internal.oxm.mappings.AnyCollectionMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,XMLConverter,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLMarshaller,Session,UnmarshalKeepAsElementPolicy,XMLUnmarshaller,XMLRecord>, XMLMapping, ContainerMapping
Any collection XML mappings map an attribute that contains a heterogenous collection of objects to multiple XML elements. Unlike composite collection XML mappings, the referenced objects may be of different types (including String), and do not need to be related to each other through inheritance or a common interface. The corresponding object attribute should be generic enough for all possible application values. Note that each of the referenced objects (except String) must specify a default root element on their descriptor.
Any collection mappings are useful with the following XML schema constructs:
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 Collection Mappings the XPath
is optional.
The following XPath statements may be used to specify the location of XML data relating to an object's name attribute:
| XPath | Description |
|---|---|
| contact-methods | The name information is stored in the contact-methods element. |
| contact-methods/info | The XPath statement may be used to specify any valid path. |
| contact-methods[2] | The XPath statement may contain positional information. In this case the contact information is stored in the second occurrence of the contact-methods element. |
Mapping an element of type xs:anyType as an Any Collection Mapping:
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="contact-methods" type="xsd:anyType"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="address">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="street" type="xsd:string"/>
<xsd:element name="city" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="phone-number" type="xsd:string"/>
</xsd:schema>
Code Sample
XMLAnyCollectionMapping contactMethodsMapping = new XMLAnyCollectionMapping();
contactMethodsMapping.setAttributeName("contactMethods");
contactMethodsMapping.setXPath("contact-methods");
More Information: For more information about using the XML Any Collection Mapping, see the "Understanding XML Mappings" chapter of the Oracle TopLink Developer's Guide.
DatabaseMapping.WriteTypeattributeAccessor, 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 |
|---|
XMLAnyCollectionMapping() |
| Modifier and Type | Method and Description |
|---|---|
void |
buildBackupClone(Object clone,
Object backup,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork)
INTERNAL:
Clone the attribute from the clone and assign it to the backup.
|
void |
buildClone(Object original,
org.eclipse.persistence.internal.identitymaps.CacheKey cacheKey,
Object clone,
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 databaseRow,
org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager,
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(Object attributeValue,
org.eclipse.persistence.internal.sessions.AbstractSession session,
XMLDescriptor referenceDescriptor,
org.eclipse.persistence.internal.sessions.AbstractRecord parentRow,
org.eclipse.persistence.internal.helper.DatabaseField field,
Object originalObject,
boolean wasXMLRoot) |
void |
cascadePerformRemoveIfRequired(Object object,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow,
Map visitedObjects)
INTERNAL:
Cascade perform delete through mappings that require the cascade
|
void |
cascadeRegisterNewIfRequired(Object object,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow,
Map visitedObjects)
INTERNAL:
Cascade registerNew for Create through mappings that require the cascade
|
Object |
clone()
INTERNAL:
Clones itself.
|
org.eclipse.persistence.internal.sessions.ChangeRecord |
compareForChange(Object clone,
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(Object firstObject,
Object secondObject,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
Compare the attributes belonging to this mapping for the objects.
|
Object |
convertDataValueToObjectValue(Object fieldValue,
Session session,
XMLUnmarshaller unmarshaller)
INTERNAL
|
Object |
convertObjectValueToDataValue(Object value,
Session session,
XMLMarshaller marshaller)
INTERNAL
|
void |
fixObjectReferences(Object object,
Map objectDescriptors,
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.
|
XMLConverter |
getConverter() |
org.eclipse.persistence.internal.helper.DatabaseField |
getField()
INTERNAL:
Return the field associated with this mapping if there is exactly one.
|
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()
Get the Wrapper NullPolicy from the Mapping.
|
void |
initialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
Allow for initialization of properties and validation.
|
boolean |
isCollectionMapping()
INTERNAL:
Related mapping should implement this method to return true.
|
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 |
isMixedContent() |
boolean |
isWhitespacePreservedForMixedContent()
Setting this to true indicates that text nodes containing *only* whitespaces should still be
added to the collection as strings for mixed content.
|
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(Object target,
org.eclipse.persistence.internal.sessions.ChangeRecord changeRecord,
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(Object target,
boolean isTargetUninitialized,
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 |
setContainerPolicy(org.eclipse.persistence.internal.queries.ContainerPolicy cp)
PUBLIC:
Set the mapping's container policy.
|
void |
setConverter(XMLConverter conv) |
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 |
setMixedContent(boolean mixed) |
void |
setPreserveWhitespaceForMixedContent(boolean preserveWhitespace) |
void |
setReuseContainer(boolean reuseContainer)
Specify whether the original container on the object should be used if
present.
|
void |
setUseXMLRoot(boolean useXMLRoot) |
void |
setWrapperNullPolicy(AbstractNullPolicy policy)
Set the Wrapper NullPolicy on the Mapping.
|
void |
setXPath(String xpath) |
void |
useCollectionClass(Class concreteContainerClass)
PUBLIC:
Configure the mapping to use an instance of the specified container class
to hold the target objects.
|
void |
useCollectionClassName(String concreteContainerClassName)
PUBLIC:
Configure the mapping to use an instance of the specified container class
to hold the target objects.
|
void |
useListClassName(String concreteContainerClassName)
PUBLIC:
Configure the mapping to use an instance of the specified container class
to hold the target objects.
|
void |
useMapClass(Class concreteContainerClass,
String methodName)
PUBLIC:
Configure the mapping to use an instance of the specified container class
to hold the target objects.
|
void |
useMapClassName(String concreteContainerClass,
String methodName)
PUBLIC:
Configure the mapping to use an instance of the specified container class
to hold the target objects.
|
boolean |
usesXMLRoot() |
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,
Boolean[] wasCacheUsed)
INTERNAL:
A subclass should implement this method if it wants different behavior.
|
void |
writeFromObjectIntoRow(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(Object element,
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.
|
buildObjectAndWrapInXMLRoot, buildObjectForNonXMLRoot, buildObjectNoReferenceDescriptor, buildXMLRoot, buildXMLRootForText, getDescriptor, getKeepAsElementPolicy, isWriteOnly, preInitialize, setAttributeValueInObject, setIsWriteOnly, setKeepAsElementPolicyaddUnconvertedProperty, 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, 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, writeUpdateFieldsIntoRowequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetKeepAsElementPolicy, setIsWriteOnly, setKeepAsElementPolicyconvertClassNamesToClasses, isWriteOnly, setIsWriteOnlygetAttributeAccessor, getAttributeClassification, getAttributeName, getAttributeValueFromObject, getDescriptor, getReferenceDescriptor, isAbstractCompositeCollectionMapping, isAbstractCompositeDirectCollectionMapping, isAbstractCompositeObjectMapping, isAbstractDirectMapping, isReadOnly, isReferenceMapping, isTransformationMapping, setAttributeAccessor, setAttributeName, setAttributeValueInObject, setGetMethodName, setIsReadOnly, setProperties, setSetMethodNamepublic void buildBackupClone(Object clone, Object backup, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork)
buildBackupClone in class DatabaseMappingpublic void buildClone(Object original, org.eclipse.persistence.internal.identitymaps.CacheKey cacheKey, Object clone, Integer refreshCascade, org.eclipse.persistence.internal.sessions.AbstractSession cloningSession)
buildClone in class DatabaseMappingpublic void buildCloneFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord databaseRow,
org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager,
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)
DatabaseMappingbuildClone 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.
buildCloneFromRow in class DatabaseMappingpublic void cascadePerformRemoveIfRequired(Object object, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow, Map visitedObjects)
cascadePerformRemoveIfRequired in class DatabaseMappingpublic void cascadeRegisterNewIfRequired(Object object, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow, Map visitedObjects)
cascadeRegisterNewIfRequired in class DatabaseMappingpublic Object clone()
DatabaseMappingclone in class DatabaseMappingpublic org.eclipse.persistence.internal.sessions.ChangeRecord compareForChange(Object clone, Object backup, org.eclipse.persistence.internal.sessions.ObjectChangeSet owner, org.eclipse.persistence.internal.sessions.AbstractSession session)
compareForChange in class DatabaseMappingpublic boolean compareObjects(Object firstObject, Object secondObject, org.eclipse.persistence.internal.sessions.AbstractSession session)
compareObjects in class DatabaseMappingpublic void fixObjectReferences(Object object, Map objectDescriptors, Map processedObjects, ObjectLevelReadQuery query, DistributedSession session)
fixObjectReferences in class DatabaseMappingpublic org.eclipse.persistence.internal.queries.ContainerPolicy getContainerPolicy()
getContainerPolicy 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>getContainerPolicy in interface ContainerMappinggetContainerPolicy in class DatabaseMappingpublic org.eclipse.persistence.internal.helper.DatabaseField getField()
DatabaseMappinggetField 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>getField in class DatabaseMappingpublic void initialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
throws DescriptorException
DatabaseMappinginitialize in class DatabaseMappingDescriptorExceptionpublic void iterate(org.eclipse.persistence.internal.descriptors.DescriptorIterator iterator)
iterate in class DatabaseMappingpublic void setXPath(String xpath)
public void mergeChangesIntoObject(Object target, org.eclipse.persistence.internal.sessions.ChangeRecord changeRecord, Object source, org.eclipse.persistence.internal.sessions.MergeManager mergeManager, org.eclipse.persistence.internal.sessions.AbstractSession targetSession)
mergeChangesIntoObject in class DatabaseMappingpublic void mergeIntoObject(Object target, boolean isTargetUninitialized, Object source, org.eclipse.persistence.internal.sessions.MergeManager mergeManager, org.eclipse.persistence.internal.sessions.AbstractSession targetSession)
mergeIntoObject in class DatabaseMappingpublic void setContainerPolicy(org.eclipse.persistence.internal.queries.ContainerPolicy cp)
ContainerMappingsetContainerPolicy in interface ContainerMappingpublic void setField(org.eclipse.persistence.internal.helper.DatabaseField field)
setField in interface org.eclipse.persistence.internal.oxm.mappings.AnyCollectionMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,XMLConverter,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLMarshaller,Session,UnmarshalKeepAsElementPolicy,XMLUnmarshaller,XMLRecord>public 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, Boolean[] wasCacheUsed) throws DatabaseException
DatabaseMappingvalueFromRow in class DatabaseMappingDatabaseExceptionpublic void writeFromObjectIntoRow(Object object, org.eclipse.persistence.internal.sessions.AbstractRecord row, org.eclipse.persistence.internal.sessions.AbstractSession session, DatabaseMapping.WriteType writeType) throws DescriptorException
DatabaseMappingwriteFromObjectIntoRow in class DatabaseMappingDescriptorExceptionpublic void writeSingleValue(Object element, Object parent, XMLRecord row, org.eclipse.persistence.internal.sessions.AbstractSession session)
XMLMappingwriteSingleValue 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 XMLMappingelement - - The value to be marshalledrow - - The Record the value is being marshalled too.protected org.eclipse.persistence.internal.sessions.AbstractRecord buildCompositeRow(Object attributeValue, org.eclipse.persistence.internal.sessions.AbstractSession session, XMLDescriptor referenceDescriptor, org.eclipse.persistence.internal.sessions.AbstractRecord parentRow, org.eclipse.persistence.internal.helper.DatabaseField field, Object originalObject, boolean wasXMLRoot)
public boolean isXMLMapping()
DatabaseMappingisXMLMapping in class DatabaseMappingpublic Vector getFields()
DatabaseMappinggetFields in class DatabaseMappingpublic void useCollectionClass(Class concreteContainerClass)
jdk1.2.x: The container class must implement (directly or indirectly) the Collection interface.
jdk1.1.x: The container class must be a subclass of Vector.
useCollectionClass in interface org.eclipse.persistence.internal.oxm.mappings.AnyCollectionMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,XMLConverter,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLMarshaller,Session,UnmarshalKeepAsElementPolicy,XMLUnmarshaller,XMLRecord>useCollectionClass in interface ContainerMappingpublic void useMapClass(Class concreteContainerClass, String methodName)
ContainerMappingMap is the value returned by a call to the specified
zero-argument method.
The method must be implemented by the class (or a superclass) of any
value to be inserted into the Map.
The container class must implement (directly or indirectly) the
java.util.Map interface.
To facilitate resolving the method, the mapping's referenceClass must set before calling this method.
useMapClass in interface ContainerMappingpublic void useMapClassName(String concreteContainerClass, String methodName)
ContainerMappingMap is the value returned by a call to the specified
zero-argument method.
The method must be implemented by the class (or a superclass) of any
value to be inserted into the Map.
The container class must implement (directly or indirectly) the
java.util.Map interface.
To facilitate resolving the method, the mapping's referenceClass must set before calling this method.
useMapClassName in interface ContainerMappingpublic void useCollectionClassName(String concreteContainerClassName)
ContainerMappingThe container class must implement (directly or indirectly) the
java.util.Collection interface.
useCollectionClassName in interface ContainerMappingpublic void useListClassName(String concreteContainerClassName)
ContainerMappingThe container class must implement (directly or indirectly) the
java.util.List interface.
useListClassName in interface ContainerMappingpublic void setUseXMLRoot(boolean useXMLRoot)
setUseXMLRoot in interface org.eclipse.persistence.internal.oxm.mappings.AnyCollectionMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,XMLConverter,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLMarshaller,Session,UnmarshalKeepAsElementPolicy,XMLUnmarshaller,XMLRecord>public boolean usesXMLRoot()
usesXMLRoot in interface org.eclipse.persistence.internal.oxm.mappings.AnyCollectionMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,XMLConverter,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLMarshaller,Session,UnmarshalKeepAsElementPolicy,XMLUnmarshaller,XMLRecord>public boolean isMixedContent()
isMixedContent in interface org.eclipse.persistence.internal.oxm.mappings.AnyCollectionMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,XMLConverter,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLMarshaller,Session,UnmarshalKeepAsElementPolicy,XMLUnmarshaller,XMLRecord>public void setMixedContent(boolean mixed)
setMixedContent in interface org.eclipse.persistence.internal.oxm.mappings.AnyCollectionMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,XMLConverter,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLMarshaller,Session,UnmarshalKeepAsElementPolicy,XMLUnmarshaller,XMLRecord>public boolean isCollectionMapping()
DatabaseMappingisCollectionMapping 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>isCollectionMapping in class DatabaseMappingpublic void setConverter(XMLConverter conv)
setConverter in interface org.eclipse.persistence.internal.oxm.mappings.AnyCollectionMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,XMLConverter,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLMarshaller,Session,UnmarshalKeepAsElementPolicy,XMLUnmarshaller,XMLRecord>public XMLConverter getConverter()
public boolean isWhitespacePreservedForMixedContent()
isWhitespacePreservedForMixedContent in interface org.eclipse.persistence.internal.oxm.mappings.AnyCollectionMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,XMLConverter,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLMarshaller,Session,UnmarshalKeepAsElementPolicy,XMLUnmarshaller,XMLRecord>public void setPreserveWhitespaceForMixedContent(boolean preserveWhitespace)
setPreserveWhitespaceForMixedContent in interface org.eclipse.persistence.internal.oxm.mappings.AnyCollectionMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,XMLConverter,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLMarshaller,Session,UnmarshalKeepAsElementPolicy,XMLUnmarshaller,XMLRecord>public boolean getReuseContainer()
getReuseContainer in interface org.eclipse.persistence.internal.oxm.mappings.XMLContainerMappingpublic void setReuseContainer(boolean reuseContainer)
setReuseContainer in interface org.eclipse.persistence.internal.oxm.mappings.XMLContainerMappingpublic boolean isDefaultEmptyContainer()
isDefaultEmptyContainer in interface org.eclipse.persistence.internal.oxm.mappings.XMLContainerMappingpublic void setDefaultEmptyContainer(boolean defaultEmptyContainer)
setDefaultEmptyContainer in interface org.eclipse.persistence.internal.oxm.mappings.XMLContainerMappingpublic AbstractNullPolicy getWrapperNullPolicy()
org.eclipse.persistence.internal.oxm.mappings.XMLContainerMappinggetWrapperNullPolicy in interface org.eclipse.persistence.internal.oxm.mappings.XMLContainerMappingpublic void setWrapperNullPolicy(AbstractNullPolicy policy)
org.eclipse.persistence.internal.oxm.mappings.XMLContainerMappingsetWrapperNullPolicy in interface org.eclipse.persistence.internal.oxm.mappings.XMLContainerMappingpublic Object convertObjectValueToDataValue(Object value, Session session, XMLMarshaller marshaller)
convertObjectValueToDataValue in interface org.eclipse.persistence.internal.oxm.mappings.XMLConverterMapping<XMLMarshaller,Session,XMLUnmarshaller>public Object convertDataValueToObjectValue(Object fieldValue, Session session, XMLUnmarshaller unmarshaller)
convertDataValueToObjectValue in interface org.eclipse.persistence.internal.oxm.mappings.XMLConverterMapping<XMLMarshaller,Session,XMLUnmarshaller>Copyright © 2007–2021 Eclipse.org - EclipseLink Project. All rights reserved.