public class MethodBasedFieldTransformer extends Object implements FieldTransformer
Modifier and Type | Field and Description |
---|---|
protected Method |
fieldTransformationMethod |
protected AbstractTransformationMapping |
mapping |
protected String |
methodName |
BUILD_FIELD_VALUE_METHOD
Constructor and Description |
---|
MethodBasedFieldTransformer(String methodName) |
Modifier and Type | Method and Description |
---|---|
Object |
buildFieldValue(Object object,
String fieldName,
Session session) |
Class |
getFieldType()
Return the Java class type of the field value.
|
String |
getMethodName() |
void |
initialize(AbstractTransformationMapping mapping)
Initialize this transformer.
|
void |
setMethodName(String name) |
protected transient Method fieldTransformationMethod
protected String methodName
protected AbstractTransformationMapping mapping
public MethodBasedFieldTransformer(String methodName)
public void initialize(AbstractTransformationMapping mapping)
FieldTransformer
initialize
in interface FieldTransformer
mapping
- - the mapping this transformer is associated with.public Class getFieldType()
public Object buildFieldValue(Object object, String fieldName, Session session)
buildFieldValue
in interface CoreFieldTransformer<Session>
buildFieldValue
in interface FieldTransformer
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 sessionpublic String getMethodName()
public void setMethodName(String name)
Copyright © 2007–2021 Eclipse.org - EclipseLink Project. All rights reserved.