Class MethodBasedFieldTransformer
java.lang.Object
org.eclipse.persistence.mappings.transformers.MethodBasedFieldTransformer
- All Implemented Interfaces:
Serializable,CoreFieldTransformer<Session>,FieldTransformer
- Version:
- $Header: MethodBasedFieldTransformer.java 18-sep-2006.16:20:59 gyorke Exp $
- See Also:
- Author:
- mmacivor
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Methodprotected AbstractTransformationMappingprotected StringFields inherited from interface org.eclipse.persistence.core.mappings.transformers.CoreFieldTransformer
BUILD_FIELD_VALUE_METHOD -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuildFieldValue(Object object, String fieldName, Session session) Return the Java class type of the field value.voidinitialize(AbstractTransformationMapping mapping) Initialize this transformer.voidsetMethodName(String name)
-
Field Details
-
fieldTransformationMethod
-
methodName
-
mapping
-
-
Constructor Details
-
MethodBasedFieldTransformer
-
-
Method Details
-
initialize
Description copied from interface:FieldTransformerInitialize this transformer. Only required if the user needs some special information from the mapping in order to do the transformation- Specified by:
initializein interfaceFieldTransformer- Parameters:
mapping- - the mapping this transformer is associated with.
-
getFieldType
Return the Java class type of the field value. This uses the method return type. -
buildFieldValue
- Specified by:
buildFieldValuein interfaceCoreFieldTransformer<Session>- Specified by:
buildFieldValuein 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
-
getMethodName
-
setMethodName
-