Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle TopLink
11g Release 1 (11.1.1)

B32476-02


oracle.toplink.mappings.transformers
Class MethodBasedFieldTransformer

java.lang.Object
  extended by oracle.toplink.mappings.transformers.MethodBasedFieldTransformer

All Implemented Interfaces:
java.io.Serializable, FieldTransformer

public class MethodBasedFieldTransformer
extends java.lang.Object
implements FieldTransformer
Since:
10 This class is used to preserve the old method of doing Field Transformations on a transformation mapping. It is used internally when the older API is used on a TransformationMapping, and handles doing invocations on the user's domain class
See Also:
Serialized Form

Constructor Summary
MethodBasedFieldTransformer(java.lang.String methodName)
           

 

Method Summary
 java.lang.Object buildFieldValue(java.lang.Object object, java.lang.String fieldName, Session session)
           
 java.lang.String getMethodName()
           
 void initialize(AbstractTransformationMapping mapping)
          Initialize this transformer.
 void setMethodName(java.lang.String name)
           

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

MethodBasedFieldTransformer

public MethodBasedFieldTransformer(java.lang.String methodName)

Method Detail

initialize

public void initialize(AbstractTransformationMapping mapping)
Description copied from interface: oracle.toplink.mappings.transformers.FieldTransformer
Initialize this transformer. Only required if the user needs some special information from the mapping in order to do the transformation
Specified by:
initialize in interface FieldTransformer
Parameters:
mapping - - the mapping this transformer is associated with.

buildFieldValue

public java.lang.Object buildFieldValue(java.lang.Object object,
                                        java.lang.String fieldName,
                                        Session session)
Specified by:
buildFieldValue in interface FieldTransformer
Parameters:
object - - an instance of the domain class which contains the attribute
fieldName - - the name of the field being transformed. Used if the user wants to use this transformer for multiple fields.
session - - the current session
Returns:
- The value to be written for the field associated with this transformer

getMethodName

public java.lang.String getMethodName()

setMethodName

public void setMethodName(java.lang.String name)

Skip navigation links

Copyright © 1998, 2009, Oracle. All Rights Reserved.