public class MethodBasedAttributeTransformer extends java.lang.Object implements AttributeTransformer
Modifier and Type | Field and Description |
---|---|
protected java.lang.reflect.Method |
attributeTransformationMethod |
protected AbstractTransformationMapping |
mapping |
protected java.lang.String |
methodName |
Constructor and Description |
---|
MethodBasedAttributeTransformer() |
MethodBasedAttributeTransformer(java.lang.String methodName) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
buildAttributeValue(Record record,
java.lang.Object object,
Session session)
INTERNAL:
Build the attribute value by invoking the user's transformation method.
|
java.lang.reflect.Method |
getAttributeTransformationMethod() |
java.lang.String |
getMethodName() |
void |
initialize(AbstractTransformationMapping mapping)
INTERNAL:
Initilizes the transformer.
|
void |
setAttributeTransformationMethod(java.lang.reflect.Method theMethod) |
void |
setMethodName(java.lang.String name) |
protected transient java.lang.reflect.Method attributeTransformationMethod
protected AbstractTransformationMapping mapping
protected java.lang.String methodName
public MethodBasedAttributeTransformer()
public MethodBasedAttributeTransformer(java.lang.String methodName)
public java.lang.String getMethodName()
public void setMethodName(java.lang.String name)
public java.lang.reflect.Method getAttributeTransformationMethod()
public void setAttributeTransformationMethod(java.lang.reflect.Method theMethod)
public void initialize(AbstractTransformationMapping mapping)
initialize
in interface AttributeTransformer
mapping
- - The mapping associated with this transformer. Only used if some special information is required.public java.lang.Object buildAttributeValue(Record record, java.lang.Object object, Session session)
buildAttributeValue
in interface AttributeTransformer
record
- - The metadata being used to build the object.object
- - The current object that the attribute is being built for.session
- - the current session