Class MethodBasedAttributeTransformer
java.lang.Object
org.eclipse.persistence.mappings.transformers.MethodBasedAttributeTransformer
- All Implemented Interfaces:
Serializable
,AttributeTransformer
- Version:
- $Header: MethodBasedAttributeTransformer.java 18-sep-2006.14:33:54 gyorke Exp $
- See Also:
- Author:
- mmacivor
-
Field Summary
Modifier and TypeFieldDescriptionprotected Method
protected AbstractTransformationMapping
protected String
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuildAttributeValue
(Record record, Object object, Session session) INTERNAL: Build the attribute value by invoking the user's transformation method.void
initialize
(AbstractTransformationMapping mapping) INTERNAL: Initilizes the transformer.void
setAttributeTransformationMethod
(Method theMethod) void
setMethodName
(String name)
-
Field Details
-
attributeTransformationMethod
-
mapping
-
methodName
-
-
Constructor Details
-
MethodBasedAttributeTransformer
public MethodBasedAttributeTransformer() -
MethodBasedAttributeTransformer
-
-
Method Details
-
getMethodName
-
setMethodName
-
getAttributeTransformationMethod
-
setAttributeTransformationMethod
-
initialize
INTERNAL: Initilizes the transformer. Looks up the transformation method on the domain class using reflection. This method can have either 1 or 2 parameters.- Specified by:
initialize
in interfaceAttributeTransformer
- Parameters:
mapping
- - The mapping associated with this transformer. Only used if some special information is required.
-
buildAttributeValue
INTERNAL: Build the attribute value by invoking the user's transformation method.- Specified by:
buildAttributeValue
in interfaceAttributeTransformer
- Parameters:
record
- - The metadata being used to build the object.object
- - The current object that the attribute is being built for.session
- - the current session- Returns:
- - The attribute value to be built into the object containing this mapping.
-