Interface DirectCollectionMapping<ABSTRACT_SESSION extends CoreAbstractSession,ATTRIBUTE_ACCESSOR extends CoreAttributeAccessor,CONTAINER_POLICY extends CoreContainerPolicy,CONVERTER extends CoreConverter,DESCRIPTOR extends CoreDescriptor,FIELD extends CoreField,MARSHALLER extends Marshaller,SESSION extends CoreSession,UNMARSHALLER extends Unmarshaller,XML_RECORD extends XMLRecord>
-
- All Superinterfaces:
Mapping<ABSTRACT_SESSION,ATTRIBUTE_ACCESSOR,CONTAINER_POLICY,DESCRIPTOR,FIELD,XML_RECORD>
,XMLContainerMapping
,XMLConverterMapping<MARSHALLER,SESSION,UNMARSHALLER>
- All Known Implementing Classes:
XMLBinaryDataCollectionMapping
,XMLCompositeDirectCollectionMapping
public interface DirectCollectionMapping<ABSTRACT_SESSION extends CoreAbstractSession,ATTRIBUTE_ACCESSOR extends CoreAttributeAccessor,CONTAINER_POLICY extends CoreContainerPolicy,CONVERTER extends CoreConverter,DESCRIPTOR extends CoreDescriptor,FIELD extends CoreField,MARSHALLER extends Marshaller,SESSION extends CoreSession,UNMARSHALLER extends Unmarshaller,XML_RECORD extends XMLRecord> extends Mapping<ABSTRACT_SESSION,ATTRIBUTE_ACCESSOR,CONTAINER_POLICY,DESCRIPTOR,FIELD,XML_RECORD>, XMLContainerMapping, XMLConverterMapping<MARSHALLER,SESSION,UNMARSHALLER>
-
-
Field Summary
-
Fields inherited from interface org.eclipse.persistence.internal.oxm.mappings.XMLContainerMapping
EMPTY_CONTAINER_DEFAULT
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Class
getAttributeElementClass()
Return the class each element in the object's collection should be converted to, before the collection is inserted into the object.AbstractNullPolicy
getNullPolicy()
Object
getNullValue()
CONVERTER
getValueConverter()
Return the converter on the mapping.boolean
isCDATA()
boolean
isCollapsingStringValues()
boolean
isNormalizingStringValues()
void
setAttributeElementClass(Class attributeElementClass)
Set the class each element in the object's collection should be converted to, before the collection is inserted into the object.void
setCollapsingStringValues(boolean collapse)
Indicates that this mapping should collapse all string values before adding them to the collection on unmarshal.void
setField(FIELD field)
Set the field that holds the nested collection.void
setFieldElementClass(Class fieldElementClass)
PUBLIC: Set the class each element in the database row's collection should be converted to, before the collection is inserted into the database.void
setIsCDATA(boolean CDATA)
void
setIsWriteOnly(boolean b)
void
setNormalizingStringValues(boolean normalize)
Indicates that this mapping should normalize all string values before adding them to the collection on unmarshal.void
setNullPolicy(AbstractNullPolicy nullPolicyFromProperty)
void
setNullValue(Object nullValue)
void
setUsesSingleNode(boolean usesSingleNode)
Sets whether the mapping uses a single node.void
setValueConverter(CONVERTER valueConverter)
Set the converter on the mapping.void
setXPath(String xpathString)
Set the Mapping field name attribute to the given XPath Stringvoid
useCollectionClassName(String concreteContainerClassName)
boolean
usesSingleNode()
Checks whether the mapping uses a single node.-
Methods inherited from interface org.eclipse.persistence.internal.oxm.mappings.Mapping
convertClassNamesToClasses, getAttributeAccessor, getAttributeClassification, getAttributeName, getAttributeValueFromObject, getContainerPolicy, getDescriptor, getField, getReferenceDescriptor, isAbstractCompositeCollectionMapping, isAbstractCompositeDirectCollectionMapping, isAbstractCompositeObjectMapping, isAbstractDirectMapping, isCollectionMapping, isReadOnly, isReferenceMapping, isTransformationMapping, setAttributeAccessor, setAttributeName, setAttributeValueInObject, setGetMethodName, setIsReadOnly, setProperties, setSetMethodName, writeSingleValue
-
Methods inherited from interface org.eclipse.persistence.internal.oxm.mappings.XMLContainerMapping
getReuseContainer, getWrapperNullPolicy, isDefaultEmptyContainer, setDefaultEmptyContainer, setReuseContainer, setWrapperNullPolicy
-
Methods inherited from interface org.eclipse.persistence.internal.oxm.mappings.XMLConverterMapping
convertDataValueToObjectValue, convertObjectValueToDataValue
-
-
-
-
Method Detail
-
getAttributeElementClass
Class getAttributeElementClass()
Return the class each element in the object's collection should be converted to, before the collection is inserted into the object. This is optional - if left null, the elements will be added to the object's collection unconverted.
-
getNullPolicy
AbstractNullPolicy getNullPolicy()
-
getValueConverter
CONVERTER getValueConverter()
Return the converter on the mapping. A converter can be used to convert between the direct collection's object value and database value.
-
isCDATA
boolean isCDATA()
-
isCollapsingStringValues
boolean isCollapsingStringValues()
-
isNormalizingStringValues
boolean isNormalizingStringValues()
-
setAttributeElementClass
void setAttributeElementClass(Class attributeElementClass)
Set the class each element in the object's collection should be converted to, before the collection is inserted into the object. This is optional - if left null, the elements will be added to the object's collection unconverted.
-
setCollapsingStringValues
void setCollapsingStringValues(boolean collapse)
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.- Parameters:
collapse
-
-
setField
void setField(FIELD field)
Set the field that holds the nested collection.
-
setFieldElementClass
void setFieldElementClass(Class fieldElementClass)
PUBLIC: Set the class each element in the database row's collection should be converted to, before the collection is inserted into the database. This is optional - if left null, the elements will be added to the database row's collection unconverted.
-
setIsCDATA
void setIsCDATA(boolean CDATA)
-
setIsWriteOnly
void setIsWriteOnly(boolean b)
-
setNormalizingStringValues
void setNormalizingStringValues(boolean normalize)
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.- Parameters:
normalize
-
-
setNullPolicy
void setNullPolicy(AbstractNullPolicy nullPolicyFromProperty)
-
setUsesSingleNode
void setUsesSingleNode(boolean usesSingleNode)
Sets whether the mapping uses a single node.- Parameters:
usesSingleNode
- True if the items in the collection are in a single node or false if each of the items in the collection is in its own node
-
setValueConverter
void setValueConverter(CONVERTER valueConverter)
Set the converter on the mapping. A converter can be used to convert between the direct collection's object value and database value.
-
setXPath
void setXPath(String xpathString)
Set the Mapping field name attribute to the given XPath String- Parameters:
xpathString
- String
-
useCollectionClassName
void useCollectionClassName(String concreteContainerClassName)
-
usesSingleNode
boolean usesSingleNode()
Checks whether the mapping uses a single node.- Returns:
- True if the items in the collection are in a single node or false if each of the items in the collection is in its own node.
-
setNullValue
void setNullValue(Object nullValue)
-
getNullValue
Object getNullValue()
-
-