Class XMLCompositeDirectCollectionMapping
- 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.mappings.foundation.AbstractCompositeDirectCollectionMapping
- 
- org.eclipse.persistence.oxm.mappings.XMLCompositeDirectCollectionMapping
 
 
 
 
- 
- All Implemented Interfaces:
- java.io.Serializable,- java.lang.Cloneable,- org.eclipse.persistence.internal.oxm.mappings.DirectCollectionMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,Converter,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLMarshaller,Session,XMLUnmarshaller,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,- org.eclipse.persistence.internal.oxm.mappings.XMLConverterMapping<XMLMarshaller,Session,XMLUnmarshaller>,- ContainerMapping,- ArrayCollectionMapping,- XMLMapping,- XMLNillableMapping
 - Direct Known Subclasses:
- XMLBinaryDataCollectionMapping
 
 public class XMLCompositeDirectCollectionMapping extends AbstractCompositeDirectCollectionMapping implements org.eclipse.persistence.internal.oxm.mappings.DirectCollectionMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,Converter,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLMarshaller,Session,XMLUnmarshaller,XMLRecord>, XMLMapping, XMLNillableMapping Composite direct collection XML mappings map a collection of simple types (String, Number, Date, etc.) to and from a sequence of composite XML nodes. Composite direct collection XML mappings can be used in the following scenarios: - Mapping to Multiple Text Nodes
- Mapping to Multiple Attributes
- Mapping to a Single Text Node
- Mapping to a Single Attribute
- Mapping to a List of Unions
- Mapping a Union of Lists
- Specifying the Content Type of a Collection
 Setting the XPath: TopLink XML mappings make use of an XPath statement 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 setXPathmethod.The following XPath statements may be used to specify the location of XML data relating to an object's name attribute: XPath Description @tasks The "@" character indicates that the node is an attribute. This XPath applies only to the single attribute node case; each member of the collection is mapped to a single node. tasks/@task The "@" character indicates that the node is an attribute. The information is stored in the attribute node of the tasks element. text() "text()" indicates that the node is a text node. In this case the task value in the text node belongs to the context node. tasks/text() The task information is stored in the text node of the tasks element. tasks/task/text() The XPath statement may be used to specify any valid path. task[2]/text() The XPath statement may contain positional information. In this case the task information is stored in the text node of the second occurrence of the task element. Mapping to a Single Text Node: By default, TopLink maps each member of a collection to it's own node. It is possible, however, to mapping a collection to a single node; here the contents of the node is treated as a space-separated list. This behavior is set on the mapping using the setUsesSingleNodemethod, with 'true' as the parameter.XML Schema 
 <?xml version="1.0" encoding="UTF-8"?>
 <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
 <xsd:element name="employee" type="employee-type"/>
 <xsd:complexType name="employee-type">
 <xsd:sequence>
 <xsd:element name="tasks" type="tasks-type"/>
 </xsd:sequence>
 </xsd:complexType>
 <xsd:simpleType name="tasks-type">
 <xsd:list itemType="xsd:string"/>
 </xsd:simpleType>
 </xsd:schema>
 Code Sample 
 XMLCompositeDirectCollectionMapping tasksMapping = new XMLCompositeDirectCollectionMapping();
 tasksMapping.setAttributeName("tasks");
 tasksMapping.setXPath("tasks/text()");
 tasksMapping.setUsesSingleNode(true);
 Specifying the Content Type of a Collection: By default, TopLink will treat the node values read in by a composite direct collection XML mapping as objects of type String. You can override this behavior by specifying the type of the collection's contents. XML Schema 
 <?xml version="1.0" encoding="UTF-8"?>
 <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
 <xsd:element name="employee" type="employee-type"/>
 <xsd:complexType name="employee-type">
 <xsd:sequence>
 <xsd:element name="vacation" type="xsd:string" maxOccurs="unbounded"/>
 </xsd:sequence>
 </xsd:complexType>
 </xsd:schema>
 Code Sample 
 XMLCompositeDirectCollectionMapping tasksMapping = new XMLCompositeDirectCollectionMapping();
 tasksMapping.setAttributeName("vacationDays");
 tasksMapping.setXPath("vacation/text()");
 tasksMapping.setAttributeElementClass(Calendar.class);
 Mapping to a List of Unions: XML Schema 
 <?xml version="1.0" encoding="UTF-8"?>
 <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
 <xsd:element name="vacation" type="listOfUnions"/>
 <xsd:simpleType name="listOfUnions">
 <xsd:list>
 <xsd:simpleType>
 <xsd:union memberTypes="xsd:date xsd:integer"/>
 </xsd:simpleType>
 </xsd:list>
 </xsd:simpleType>
 </xsd:schema>
 Code Sample 
 XMLCompositeDirectCollectionMapping mapping = new XMLCompositeDirectCollectionMapping();
 mapping.setAttributeName("myattribute");
 XMLUnionField field = new XMLUnionField("listOfUnions/text()");
 mapping.addSchemaType(new QName(url,XMLConstants.INT));
 mapping.addSchemaType(new QName(url,XMLConstants.DATE));
 mapping.setField(field);
 mapping.useSingleElement(false);
 More Information: For more information about using the XML Composite Direct Collection Mapping, see the "Understanding XML Mappings" chapter of the Oracle TopLink Developer's Guide. - See Also:
- Serialized Form
- Since:
- Oracle TopLink 10g Release 2 (10.1.3)
 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from class org.eclipse.persistence.mappings.DatabaseMappingDatabaseMapping.WriteType
 
- 
 - 
Field SummaryFields Modifier and Type Field Description protected java.lang.ObjectnullValueSupport specification of the value to use for null.protected booleanreuseContainer- 
Fields inherited from class org.eclipse.persistence.mappings.foundation.AbstractCompositeDirectCollectionMappingelementDataTypeName, field, valueConverter
 - 
Fields inherited from class org.eclipse.persistence.mappings.DatabaseMappingattributeAccessor, 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 SummaryConstructors Constructor Description XMLCompositeDirectCollectionMapping()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectconvertDataValueToObjectValue(java.lang.Object value, Session session, XMLUnmarshaller unmarshaller)INTERNALjava.lang.ObjectconvertObjectValueToDataValue(java.lang.Object value, Session session, XMLMarshaller marshaller)INTERNALAbstractNullPolicygetNullPolicy()Get the AbstractNullPolicy from the Mapping.
 The default policy is NullPolicy.java.lang.ObjectgetNullValue()PUBLIC: Allow for the value used for null to be specified.booleangetReuseContainer()Return true if the original container on the object should be used if present.AbstractNullPolicygetWrapperNullPolicy()java.lang.StringgetXPath()Get the XPath Stringvoidinitialize(org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: Initialize the mapping.booleanisCDATA()booleanisCollapsingStringValues()PUBLIC: Returns true if this mapping should collapse all string values before adding them to the collection.booleanisDefaultEmptyContainer()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.booleanisNormalizingStringValues()PUBLIC: Returns true if this mapping is normalizing string values on unmarshal before adding them to the collection.booleanisWriteOnly()INTERNAL: Some mappings support no attribute (transformation and multitenant primary key).booleanisXMLMapping()INTERNAL:voidpreInitialize(org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: Allow for initialization of properties and validation.voidsetAttributeValueInObject(java.lang.Object object, java.lang.Object value)INTERNAL: Set the value of the attribute mapped by this mapping.voidsetCollapsingStringValues(boolean collapse)PUBLIC: Indicates that this mapping should collapse all string values before adding them to the collection on unmarshal.voidsetDefaultEmptyContainer(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.voidsetIsCDATA(boolean CDATA)voidsetIsWriteOnly(boolean b)voidsetNormalizingStringValues(boolean normalize)PUBLIC: Indicates that this mapping should normalize all string values before adding them to the collection on unmarshal.voidsetNullPolicy(AbstractNullPolicy value)Set the AbstractNullPolicy on the mapping
 The default policy is NullPolicy.voidsetNullValue(java.lang.Object nullValue)PUBLIC: Allow for the value used for null to be specified.voidsetReuseContainer(boolean reuseContainer)Specify whether the original container on the object should be used if present.voidsetWrapperNullPolicy(AbstractNullPolicy policy)voidsetXPath(java.lang.String xpathString)Set the Mapping field name attribute to the given XPath StringvoiduseCollectionClassName(java.lang.String concreteContainerClassName)INTERNAL: Used to set the collection class by name.java.lang.ObjectvalueFromRow(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 the nested collection from the database row.voidwriteFromObjectIntoRow(java.lang.Object object, org.eclipse.persistence.internal.sessions.AbstractRecord row, org.eclipse.persistence.internal.sessions.AbstractSession session, DatabaseMapping.WriteType writeType)INTERNAL:voidwriteSingleValue(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.- 
Methods inherited from class org.eclipse.persistence.mappings.foundation.AbstractCompositeDirectCollectionMappingbuildAddedElementFromChangeSet, buildBackupClone, buildChangeSet, buildClone, buildCloneFromRow, buildClonePart, buildCopy, buildElementFromChangeSet, buildElementFromElement, buildRemovedElementFromChangeSet, cascadePerformRemoveIfRequired, cascadeRegisterNewIfRequired, collectFields, compareElements, compareElementsForChange, compareForChange, compareObjects, convertClassNamesToClasses, convertToChangeRecord, createMapComponentFromRow, fixObjectReferences, getAttributeElementClass, getContainerPolicy, getField, getFieldClassification, getFieldElementClass, getFieldName, getRealCollectionAttributeValueFromObject, getValueConverter, hasValueConverter, isAbstractCompositeDirectCollectionMapping, isCollectionMapping, iterate, mapKeyHasChanged, mergeChangesIntoObject, mergeIntoObject, setAttributeElementClass, setAttributeElementClassName, setContainerPolicy, setField, setFieldElementClass, setUsesSingleNode, setValueConverter, simpleAddToCollectionChangeRecord, simpleRemoveFromCollectionChangeRecord, useCollectionClass, useListClassName, useMapClass, useMapClassName, usesSingleNode, writeFromObjectIntoRowForUpdate, writeFromObjectIntoRowWithChangeRecord, writeInsertFieldsIntoRow
 - 
Methods inherited from class org.eclipse.persistence.mappings.DatabaseMappingaddUnconvertedProperty, buildBackupCloneForPartObject, buildChangeRecord, buildCloneForPartObject, buildContainerClone, buildExpression, buildObjectJoinExpression, buildObjectJoinExpression, buildShallowOriginalFromRow, calculateDeferredChanges, cascadeDiscoverAndPersistUnregisteredNewObjects, cascadePerformRemovePrivateOwnedObjectFromChangeSetIfRequired, clone, cloneFields, collectQueryParameters, convertConverterClassNamesToClasses, createCloneValueHolder, derivesId, earlyPreDelete, extractNestedExpressions, extractNestedNonAggregateExpressions, fixRealObjectReferences, getAttributeAccessor, getAttributeClassification, getAttributeName, getAttributeValueFromObject, getDerivedIdMapping, getDescriptor, getFields, getGetMethodName, getMapsIdValue, getObjectCorrespondingTo, getOrderByNormalizedExpressions, getProperties, getProperty, getRealAttributeValueFromAttribute, getRealAttributeValueFromObject, getReferenceDescriptor, getRelationshipPartner, getSelectFields, getSelectTables, getSetMethodName, getUnconvertedProperties, getValueFromRemoteValueHolder, getWeight, hasConstraintDependency, hasDependency, hasInverseConstraintDependency, hasMapsIdValue, hasNestedIdentityReference, hasRootExpressionThatShouldUseOuterJoin, hasUnconvertedProperties, instantiateAttribute, isAbstractColumnMapping, isAbstractCompositeCollectionMapping, 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, toString, updateChangeRecord, updateCollectionChangeRecord, validateAfterInitialization, validateBeforeInitialization, valueFromObject, valueFromResultSet, valueFromRow, verifyDelete, writeFromAttributeIntoRow, writeFromObjectIntoRowForShallowInsert, writeFromObjectIntoRowForShallowInsertWithChangeRecord, writeFromObjectIntoRowForUpdateAfterShallowInsert, writeFromObjectIntoRowForUpdateBeforeShallowDelete, writeFromObjectIntoRowForWhereClause, writeUpdateFieldsIntoRow
 - 
Methods inherited from class java.lang.Objectequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface org.eclipse.persistence.mappings.structures.ArrayCollectionMappinggetAttributeName, setRealAttributeValueInObject
 - 
Methods inherited from interface org.eclipse.persistence.internal.oxm.mappings.DirectCollectionMappinggetAttributeElementClass, getValueConverter, setAttributeElementClass, setField, setFieldElementClass, setUsesSingleNode, setValueConverter, usesSingleNode
 - 
Methods inherited from interface org.eclipse.persistence.internal.oxm.mappings.MappinggetAttributeAccessor, getAttributeClassification, getAttributeName, getAttributeValueFromObject, getContainerPolicy, getDescriptor, getField, getReferenceDescriptor, isAbstractCompositeCollectionMapping, isAbstractCompositeDirectCollectionMapping, isAbstractCompositeObjectMapping, isAbstractDirectMapping, isCollectionMapping, isReadOnly, isReferenceMapping, isTransformationMapping, setAttributeAccessor, setAttributeName, setGetMethodName, setIsReadOnly, setProperties, setSetMethodName
 - 
Methods inherited from interface org.eclipse.persistence.oxm.mappings.XMLMappingconvertClassNamesToClasses
 
- 
 
- 
- 
- 
Method Detail- 
isXMLMappingpublic boolean isXMLMapping() INTERNAL:- Overrides:
- isXMLMappingin class- DatabaseMapping
 
 - 
initializepublic void initialize(org.eclipse.persistence.internal.sessions.AbstractSession session) throws DescriptorExceptionINTERNAL: Initialize the mapping.- Overrides:
- initializein class- AbstractCompositeDirectCollectionMapping
- Throws:
- DescriptorException
 
 - 
setXPathpublic void setXPath(java.lang.String xpathString) Set the Mapping field name attribute to the given XPath String- Specified by:
- setXPathin interface- org.eclipse.persistence.internal.oxm.mappings.DirectCollectionMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,Converter,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLMarshaller,Session,XMLUnmarshaller,XMLRecord>
- Parameters:
- xpathString- String
 
 - 
getXPathpublic java.lang.String getXPath() Get the XPath String- Returns:
- String the XPath String associated with this Mapping
 
 - 
useCollectionClassNamepublic void useCollectionClassName(java.lang.String concreteContainerClassName) Description copied from class:AbstractCompositeDirectCollectionMappingINTERNAL: Used to set the collection class by name. This is required when building from metadata to allow the correct class loader to be used.- Specified by:
- useCollectionClassNamein interface- ContainerMapping
- Specified by:
- useCollectionClassNamein interface- org.eclipse.persistence.internal.oxm.mappings.DirectCollectionMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,Converter,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLMarshaller,Session,XMLUnmarshaller,XMLRecord>
- Overrides:
- useCollectionClassNamein class- AbstractCompositeDirectCollectionMapping
 
 - 
valueFromRowpublic 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 DatabaseExceptionINTERNAL: Build the nested collection from the database row.- Overrides:
- valueFromRowin class- AbstractCompositeDirectCollectionMapping
- Throws:
- DatabaseException
 
 - 
writeFromObjectIntoRowpublic void writeFromObjectIntoRow(java.lang.Object object, org.eclipse.persistence.internal.sessions.AbstractRecord row, org.eclipse.persistence.internal.sessions.AbstractSession session, DatabaseMapping.WriteType writeType)INTERNAL:- Overrides:
- writeFromObjectIntoRowin class- AbstractCompositeDirectCollectionMapping
 
 - 
writeSingleValuepublic void writeSingleValue(java.lang.Object value, java.lang.Object parent, XMLRecord record, org.eclipse.persistence.internal.sessions.AbstractSession session)Description copied from interface:XMLMappingINTERNAL: A method that marshals a single value to the provided Record based on this mapping's XPath. Used for Sequenced marshalling.- Specified by:
- writeSingleValuein 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>
- Specified by:
- writeSingleValuein interface- XMLMapping
- Parameters:
- value- - The value to be marshalled
- record- - The Record the value is being marshalled too.
 
 - 
setIsCDATApublic void setIsCDATA(boolean CDATA) - Specified by:
- setIsCDATAin interface- org.eclipse.persistence.internal.oxm.mappings.DirectCollectionMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,Converter,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLMarshaller,Session,XMLUnmarshaller,XMLRecord>
 
 - 
isCDATApublic boolean isCDATA() - Specified by:
- isCDATAin interface- org.eclipse.persistence.internal.oxm.mappings.DirectCollectionMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,Converter,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLMarshaller,Session,XMLUnmarshaller,XMLRecord>
 
 - 
setIsWriteOnlypublic void setIsWriteOnly(boolean b) - Specified by:
- setIsWriteOnlyin interface- org.eclipse.persistence.internal.oxm.mappings.DirectCollectionMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,Converter,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLMarshaller,Session,XMLUnmarshaller,XMLRecord>
- Specified by:
- setIsWriteOnlyin interface- XMLMapping
 
 - 
isWriteOnlypublic boolean isWriteOnly() Description copied from class:DatabaseMappingINTERNAL: Some mappings support no attribute (transformation and multitenant primary key).- Specified by:
- isWriteOnlyin interface- XMLMapping
- Overrides:
- isWriteOnlyin class- DatabaseMapping
 
 - 
setAttributeValueInObjectpublic void setAttributeValueInObject(java.lang.Object object, java.lang.Object value) throws DescriptorExceptionDescription copied from class:DatabaseMappingINTERNAL: Set the value of the attribute mapped by this mapping.- Specified by:
- setAttributeValueInObjectin 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>
- Overrides:
- setAttributeValueInObjectin class- DatabaseMapping
- Throws:
- DescriptorException
 
 - 
preInitializepublic void preInitialize(org.eclipse.persistence.internal.sessions.AbstractSession session) throws DescriptorExceptionDescription copied from class:DatabaseMappingINTERNAL: Allow for initialization of properties and validation.- Overrides:
- preInitializein class- DatabaseMapping
- Throws:
- DescriptorException
 
 - 
getNullPolicypublic AbstractNullPolicy getNullPolicy() Description copied from interface:XMLNillableMappingGet the AbstractNullPolicy from the Mapping.
 The default policy is NullPolicy.- Specified by:
- getNullPolicyin interface- org.eclipse.persistence.internal.oxm.mappings.DirectCollectionMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,Converter,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLMarshaller,Session,XMLUnmarshaller,XMLRecord>
- Specified by:
- getNullPolicyin interface- XMLNillableMapping
- Returns:
 
 - 
setNullPolicypublic void setNullPolicy(AbstractNullPolicy value) Description copied from interface:XMLNillableMappingSet the AbstractNullPolicy on the mapping
 The default policy is NullPolicy.- Specified by:
- setNullPolicyin interface- org.eclipse.persistence.internal.oxm.mappings.DirectCollectionMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,Converter,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLMarshaller,Session,XMLUnmarshaller,XMLRecord>
- Specified by:
- setNullPolicyin interface- XMLNillableMapping
 
 - 
getReuseContainerpublic 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:
- getReuseContainerin interface- org.eclipse.persistence.internal.oxm.mappings.XMLContainerMapping
 
 - 
setReuseContainerpublic 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:
- setReuseContainerin interface- org.eclipse.persistence.internal.oxm.mappings.XMLContainerMapping
 
 - 
isNormalizingStringValuespublic boolean isNormalizingStringValues() PUBLIC: Returns true if this mapping is normalizing string values on unmarshal before adding them to the collection. Normalize replaces any CR, LF or Tab characters with a single space character.- Specified by:
- isNormalizingStringValuesin interface- org.eclipse.persistence.internal.oxm.mappings.DirectCollectionMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,Converter,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLMarshaller,Session,XMLUnmarshaller,XMLRecord>
 
 - 
setNormalizingStringValuespublic void setNormalizingStringValues(boolean normalize) PUBLIC: Indicates that this mapping should normalize all string values before adding them to the collection on unmarshal. Normalize replaces any CR, LF or Tab characters with a single space character.- Specified by:
- setNormalizingStringValuesin interface- org.eclipse.persistence.internal.oxm.mappings.DirectCollectionMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,Converter,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLMarshaller,Session,XMLUnmarshaller,XMLRecord>
- Parameters:
- normalize-
 
 - 
setCollapsingStringValuespublic void setCollapsingStringValues(boolean collapse) PUBLIC: Indicates that this mapping should collapse all string values before adding them to the collection on unmarshal. Collapse removes leading and trailing whitespaces, and replaces any sequence of whitespace characters with a single space.- Specified by:
- setCollapsingStringValuesin interface- org.eclipse.persistence.internal.oxm.mappings.DirectCollectionMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,Converter,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLMarshaller,Session,XMLUnmarshaller,XMLRecord>
- Parameters:
- collapse-
 
 - 
isCollapsingStringValuespublic boolean isCollapsingStringValues() PUBLIC: Returns true if this mapping should collapse all string values before adding them to the collection. Collapse removes leading and trailing whitespaces, and replaces any sequence of whitespace characters with a single space.- Specified by:
- isCollapsingStringValuesin interface- org.eclipse.persistence.internal.oxm.mappings.DirectCollectionMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,Converter,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLMarshaller,Session,XMLUnmarshaller,XMLRecord>
 
 - 
isDefaultEmptyContainerpublic 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:
- isDefaultEmptyContainerin interface- org.eclipse.persistence.internal.oxm.mappings.XMLContainerMapping
- Since:
- EclipseLink 2.3.3
 
 - 
setDefaultEmptyContainerpublic 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:
- setDefaultEmptyContainerin interface- org.eclipse.persistence.internal.oxm.mappings.XMLContainerMapping
- Since:
- EclipseLink 2.3.3
 
 - 
getWrapperNullPolicypublic AbstractNullPolicy getWrapperNullPolicy() - Specified by:
- getWrapperNullPolicyin interface- org.eclipse.persistence.internal.oxm.mappings.XMLContainerMapping
 
 - 
setWrapperNullPolicypublic void setWrapperNullPolicy(AbstractNullPolicy policy) - Specified by:
- setWrapperNullPolicyin interface- org.eclipse.persistence.internal.oxm.mappings.XMLContainerMapping
 
 - 
convertObjectValueToDataValuepublic java.lang.Object convertObjectValueToDataValue(java.lang.Object value, Session session, XMLMarshaller marshaller)INTERNAL- Specified by:
- convertObjectValueToDataValuein interface- org.eclipse.persistence.internal.oxm.mappings.XMLConverterMapping<XMLMarshaller,Session,XMLUnmarshaller>
- Since:
- EclipseLink 2.5.0
 
 - 
convertDataValueToObjectValuepublic java.lang.Object convertDataValueToObjectValue(java.lang.Object value, Session session, XMLUnmarshaller unmarshaller)INTERNAL- Specified by:
- convertDataValueToObjectValuein interface- org.eclipse.persistence.internal.oxm.mappings.XMLConverterMapping<XMLMarshaller,Session,XMLUnmarshaller>
- Since:
- EclipseLink 2.5.0
 
 - 
getNullValuepublic java.lang.Object getNullValue() PUBLIC: Allow for the value used for null to be specified. This can be used to convert database null values to application specific values, when null values are not allowed by the application (such as in primitives). Note: the default value for NULL is used on reads, writes, and query SQL generation- Specified by:
- getNullValuein interface- org.eclipse.persistence.internal.oxm.mappings.DirectCollectionMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,Converter,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLMarshaller,Session,XMLUnmarshaller,XMLRecord>
 
 - 
setNullValuepublic void setNullValue(java.lang.Object nullValue) PUBLIC: Allow for the value used for null to be specified. This can be used to convert database null values to application specific values, when null values are not allowed by the application (such as in primitives). Note: the default value for NULL is used on reads- Specified by:
- setNullValuein interface- org.eclipse.persistence.internal.oxm.mappings.DirectCollectionMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,Converter,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLMarshaller,Session,XMLUnmarshaller,XMLRecord>
 
 
- 
 
-