Interface TransformationMapping<ABSTRACT_SESSION extends CoreAbstractSession,ATTRIBUTE_ACCESSOR extends CoreAttributeAccessor,CONTAINER_POLICY extends CoreContainerPolicy,DESCRIPTOR extends CoreDescriptor,FIELD extends CoreField,TRANSFORMATION_RECORD extends TransformationRecord,XML_RECORD extends XMLRecord>
-
- All Superinterfaces:
Mapping<ABSTRACT_SESSION,ATTRIBUTE_ACCESSOR,CONTAINER_POLICY,DESCRIPTOR,FIELD,XML_RECORD>
- All Known Implementing Classes:
XMLTransformationMapping
public interface TransformationMapping<ABSTRACT_SESSION extends CoreAbstractSession,ATTRIBUTE_ACCESSOR extends CoreAttributeAccessor,CONTAINER_POLICY extends CoreContainerPolicy,DESCRIPTOR extends CoreDescriptor,FIELD extends CoreField,TRANSFORMATION_RECORD extends TransformationRecord,XML_RECORD extends XMLRecord> extends Mapping<ABSTRACT_SESSION,ATTRIBUTE_ACCESSOR,CONTAINER_POLICY,DESCRIPTOR,FIELD,XML_RECORD>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addFieldTransformation(String fieldName, String methodName)
Add the name of field and the name of the method that returns the value to be placed in said field when the object is written to the database.void
addFieldTransformerClassName(String fieldName, String className)
INTERNAL: Add the name of a field and the name of a class which implements the FieldTransformer interface.List<Object[]>
getFieldToTransformers()
INTERNAL:Object
readFromRowIntoObject(XML_RECORD row, Object object, ABSTRACT_SESSION executionSession, boolean isTargetProtected)
INTERNAL: Extract value from the row and set the attribute to the value in the object.void
setAttributeTransformation(String methodName)
To set the attribute method name.void
setAttributeTransformerClassName(String className)
INTERNAL: Set the Attribute Transformer Class Namevoid
setIsOptional(boolean isOptional)
Used to specify whether the value of this mapping may be null.void
writeFromAttributeIntoRow(UnmarshalRecord unmarshalRecord, Field field, Object value, boolean isElement)
INTERNAL: Put value into a record keyed on field.-
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
-
-
-
-
Method Detail
-
addFieldTransformation
void addFieldTransformation(String fieldName, String methodName)
Add the name of field and the name of the method that returns the value to be placed in said field when the object is written to the database. The method may take zero arguments, or it may take a single argument of typeorg.eclipse.persistence.sessions.Session
.
-
addFieldTransformerClassName
void addFieldTransformerClassName(String fieldName, String className)
INTERNAL: Add the name of a field and the name of a class which implements the FieldTransformer interface. When the object is written, the transform method will be called on the FieldTransformer to acquire the value to put in the field.
-
getFieldToTransformers
List<Object[]> getFieldToTransformers()
INTERNAL:- Returns:
- a vector which stores fields and their respective transformers.
-
readFromRowIntoObject
Object readFromRowIntoObject(XML_RECORD row, Object object, ABSTRACT_SESSION executionSession, boolean isTargetProtected)
INTERNAL: Extract value from the row and set the attribute to the value in the object.- Since:
- EclipseLink 2.6.0
-
setAttributeTransformation
void setAttributeTransformation(String methodName)
To set the attribute method name. The method is invoked internally by TopLink to retrieve the value to store in the domain object. The method receives Record as its parameter and optionally Session, and should extract the value from the record to set into the object, but should not set the value on the object, only return it.
-
setAttributeTransformerClassName
void setAttributeTransformerClassName(String className)
INTERNAL: Set the Attribute Transformer Class Name- Parameters:
className
-
-
setIsOptional
void setIsOptional(boolean isOptional)
Used to specify whether the value of this mapping may be null. This is used when generating DDL.
-
writeFromAttributeIntoRow
void writeFromAttributeIntoRow(UnmarshalRecord unmarshalRecord, Field field, Object value, boolean isElement)
INTERNAL: Put value into a record keyed on field.- Since:
- EclipseLink 2.6.0
-
-