Module org.eclipse.persistence.core
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
Modifier and TypeMethodDescriptionClass<?> Return the class each element in the object's collection should be converted to, before the collection is inserted into the object.Return the converter on the mapping.booleanisCDATA()booleanbooleanvoidsetAttributeElementClass(Class<?> attributeElementClass) Set the class each element in the object's collection should be converted to, before the collection is inserted into the object.voidsetCollapsingStringValues(boolean collapse) Indicates that this mapping should collapse all string values before adding them to the collection on unmarshal.voidSet the field that holds the nested collection.voidsetFieldElementClass(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.voidsetIsCDATA(boolean CDATA) voidsetIsWriteOnly(boolean b) voidsetNormalizingStringValues(boolean normalize) Indicates that this mapping should normalize all string values before adding them to the collection on unmarshal.voidsetNullPolicy(AbstractNullPolicy nullPolicyFromProperty) voidsetNullValue(Object nullValue) voidsetUsesSingleNode(boolean usesSingleNode) Sets whether the mapping uses a single node.voidsetValueConverter(CONVERTER valueConverter) Set the converter on the mapping.voidSet the Mapping field name attribute to the given XPath StringvoiduseCollectionClassName(String concreteContainerClassName) booleanChecks 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, writeSingleValueMethods inherited from interface org.eclipse.persistence.internal.oxm.mappings.XMLContainerMapping
getReuseContainer, getWrapperNullPolicy, isDefaultEmptyContainer, setDefaultEmptyContainer, setReuseContainer, setWrapperNullPolicyMethods inherited from interface org.eclipse.persistence.internal.oxm.mappings.XMLConverterMapping
convertDataValueToObjectValue, convertObjectValueToDataValue
-
Method Details
-
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
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. -
setField
Set the field that holds the nested collection. -
setFieldElementClass
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. -
setNullPolicy
-
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
Set the converter on the mapping. A converter can be used to convert between the direct collection's object value and database value. -
setXPath
Set the Mapping field name attribute to the given XPath String- Parameters:
xpathString- String
-
useCollectionClassName
-
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
-
getNullValue
Object getNullValue()
-