public class MethodBasedAttributeTransformer extends Object implements AttributeTransformer
Modifier and Type | Field and Description |
---|---|
protected Method |
attributeTransformationMethod |
protected AbstractTransformationMapping |
mapping |
protected String |
methodName |
Constructor and Description |
---|
MethodBasedAttributeTransformer() |
MethodBasedAttributeTransformer(String methodName) |
Modifier and Type | Method and Description |
---|---|
Object |
buildAttributeValue(Record record,
Object object,
Session session)
INTERNAL:
Build the attribute value by invoking the user's transformation method.
|
Method |
getAttributeTransformationMethod() |
String |
getMethodName() |
void |
initialize(AbstractTransformationMapping mapping)
INTERNAL:
Initilizes the transformer.
|
void |
setAttributeTransformationMethod(Method theMethod) |
void |
setMethodName(String name) |
protected transient Method attributeTransformationMethod
protected AbstractTransformationMapping mapping
protected String methodName
public MethodBasedAttributeTransformer()
public MethodBasedAttributeTransformer(String methodName)
public String getMethodName()
public void setMethodName(String name)
public Method getAttributeTransformationMethod()
public void setAttributeTransformationMethod(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 Object buildAttributeValue(Record record, 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 sessionCopyright © 2007–2020 Eclipse.org - EclipseLink Project. All rights reserved.