Class FieldTransformerAdapter
- java.lang.Object
-
- org.eclipse.persistence.mappings.transformers.FieldTransformerAdapter
-
- All Implemented Interfaces:
java.io.Serializable
,CoreFieldTransformer<Session>
,FieldTransformer
- Direct Known Subclasses:
ConstantTransformer
public class FieldTransformerAdapter extends java.lang.Object implements FieldTransformer
Purpose: Provides an empty implementation of FieldTransformer. Users who do not require the full FieldTransformer API can subclass this class and implement only the methods required.
- Version:
- $Header: FieldTransformerAdapter.java 11-jul-2006.10:33:44 gyorke Exp $
- See Also:
FieldTransformer
, Serialized Form- Author:
- mmacivor
- Since:
- 10
-
-
Field Summary
-
Fields inherited from interface org.eclipse.persistence.core.mappings.transformers.CoreFieldTransformer
BUILD_FIELD_VALUE_METHOD
-
-
Constructor Summary
Constructors Constructor Description FieldTransformerAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
buildFieldValue(java.lang.Object object, java.lang.String fieldName, Session session)
void
initialize(AbstractTransformationMapping mapping)
Initialize this transformer.
-
-
-
Method Detail
-
initialize
public void initialize(AbstractTransformationMapping mapping)
Description copied from interface:FieldTransformer
Initialize this transformer. Only required if the user needs some special information from the mapping in order to do the transformation- Specified by:
initialize
in interfaceFieldTransformer
- Parameters:
mapping
- - the mapping this transformer is associated with.
-
buildFieldValue
public java.lang.Object buildFieldValue(java.lang.Object object, java.lang.String fieldName, Session session)
- Specified by:
buildFieldValue
in interfaceCoreFieldTransformer<Session>
- Specified by:
buildFieldValue
in interfaceFieldTransformer
- Parameters:
object
- - an instance of the domain class which contains the attributefieldName
- - the name of the field being transformed. Used if the user wants to use this transformer for multiple fields.session
- - the current session- Returns:
- - The value to be written for the field associated with this transformer
-
-