Module org.eclipse.persistence.core
Interface DirectMapping<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> XMLConverterMapping<MARSHALLER,
SESSION, UNMARSHALLER>
- All Known Implementing Classes:
XMLBinaryDataMapping
,XMLDirectMapping
,XMLFragmentMapping
public interface DirectMapping<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>, XMLConverterMapping<MARSHALLER,SESSION,UNMARSHALLER>
-
Method Summary
Modifier and TypeMethodDescriptiongetAttributeValue
(Object object, ABSTRACT_SESSION session, AbstractUnmarshalRecord record) Return the converter on the mapping.getFieldValue
(Object object, CoreAbstractSession session, AbstractMarshalRecord record) getObjectValue
(Object object, SESSION session) getXPath()
Get the XPath Stringboolean
boolean
isCDATA()
void
setAttributeClassification
(Class<?> attributeClassification) Some databases do not properly support all of the base data types.void
setAttributeClassificationName
(String attributeClassificationName) INTERNAL: Set the name of the class for MW usage.void
setCollapsingStringValues
(boolean collapse) Indicates that this mapping should collapse all string values before setting them in the object on unmarshal.void
setConverter
(CONVERTER converter) Set the converter on the mapping.void
ADVANCED: Set the field in the mapping.void
setIsCDATA
(boolean CDATA) void
setIsWriteOnly
(boolean b) void
setNormalizingStringValues
(boolean normalize) Indicates that this mapping should normalize all string values before setting them in the object on unmarshal.void
setNullPolicy
(AbstractNullPolicy aNullPolicy) Set the AbstractNullPolicy on the mapping
The default policy is NullPolicy.void
setNullValue
(Object nullValue) Allow for the value used for null to be specified.void
setNullValueMarshalled
(boolean value) Set whether this mapping's value should be marshalled, in the case that it is equal to the default null value.void
Set the Mapping field name attribute to the given XPath StringvalueFromObject
(Object object, FIELD field, ABSTRACT_SESSION abstractSession) 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.XMLConverterMapping
convertDataValueToObjectValue, convertObjectValueToDataValue
-
Method Details
-
getAttributeValue
-
getConverter
CONVERTER getConverter()Return the converter on the mapping. A converter can be used to convert between the object's value and database value of the attribute. -
getFieldValue
-
getNullPolicy
AbstractNullPolicy getNullPolicy() -
getNullValue
Object getNullValue() -
getObjectValue
-
getXPath
String getXPath()Get the XPath String- Returns:
- String the XPath String associated with this Mapping
-
hasConverter
boolean hasConverter() -
isCDATA
boolean isCDATA() -
setAttributeClassification
Some databases do not properly support all of the base data types. For these databases, the base data type must be explicitly specified in the mapping to tell EclipseLink to force the instance variable value to that data type -
setAttributeClassificationName
INTERNAL: Set the name of the class for MW usage. -
setCollapsingStringValues
void setCollapsingStringValues(boolean collapse) Indicates that this mapping should collapse all string values before setting them in the object on unmarshal. Collapse removes leading and trailing whitespaces, and replaces any sequence of whitepsace characters with a single space. -
setConverter
Set the converter on the mapping. A converter can be used to convert between the object's value and database value of the attribute. -
setField
ADVANCED: Set the field in the mapping. This can be used for advanced field types, such as XML nodes, or to set the field type. -
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 setting them in the object on unmarshal. Normalize replaces any CR, LF or Tab characters with a single space character. -
setNullPolicy
Set the AbstractNullPolicy on the mapping
The default policy is NullPolicy. -
setNullValue
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 -
setNullValueMarshalled
void setNullValueMarshalled(boolean value) Set whether this mapping's value should be marshalled, in the case that it is equal to the default null value. -
setXPath
Set the Mapping field name attribute to the given XPath String- Parameters:
xpathString
- String
-
valueFromObject
-