public class MethodBasedFieldTransformer extends Object implements FieldTransformer
| 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) |
public MethodBasedFieldTransformer(String methodName)
public void initialize(AbstractTransformationMapping mapping)
FieldTransformerinitialize in interface FieldTransformermapping - - the mapping this transformer is associated with.public Class getFieldType()
public Object buildFieldValue(Object object, String fieldName, Session session)
buildFieldValue in interface FieldTransformerobject - - 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)