Top Description Fields Methods
org.eclipse.persistence.mappings.transformers

public Interface FieldTransformer

extends CoreFieldTransformer<Session>
Known Direct Implementers
org.eclipse.persistence.mappings.transformers.FieldTransformerAdapter, org.eclipse.persistence.mappings.transformers.MethodBasedFieldTransformer
Imports
org.eclipse.persistence.sessions.Session, org.eclipse.persistence.core.mappings.transformers.CoreFieldTransformer, org.eclipse.persistence.mappings.foundation.AbstractTransformationMapping

PUBLIC: This interface is used by the Transformation Mapping to build the value for a specific field. The user must provide implementations of this interface to the Transformation Mapping.
Author
mmacivor
Since
10.1.3

Field Summary

Inherited from org.eclipse.persistence.core.mappings.transformers.CoreFieldTransformer:
BUILD_FIELD_VALUE_METHOD

Method Summary

Modifier and TypeMethod and Description
public Object

Returns:

- The value to be written for the field associated with this transformer
buildFieldValue
(Object
- an instance of the domain class which contains the attribute
instance
,
String
- the name of the field being transformed. Used if the user wants to use this transformer for multiple fields.
fieldName
,
Session
- the current session
session
)

Redeclares org.eclipse.persistence.core.mappings.transformers.CoreFieldTransformer.buildFieldValue.

public void
initialize(AbstractTransformationMapping
- the mapping this transformer is associated with.
mapping
)

Initialize this transformer.

Method Detail

buildFieldValueback to summary
public Object buildFieldValue(Object instance, String fieldName, Session session)

Redeclares org.eclipse.persistence.core.mappings.transformers.CoreFieldTransformer.buildFieldValue.

Parameters
instance:Object

- an instance of the domain class which contains the attribute

fieldName:String

- the name of the field being transformed. Used if the user wants to use this transformer for multiple fields.

session:Session

- the current session

Returns:Object

- The value to be written for the field associated with this transformer

Annotations
@Override
initializeback to summary
public void initialize(AbstractTransformationMapping mapping)

Initialize this transformer. Only required if the user needs some special information from the mapping in order to do the transformation

Parameters
mapping:AbstractTransformationMapping

- the mapping this transformer is associated with.