IBM Branch Transformation Toolkit Javadoc

com.ibm.btt.server.flow.mapper
Class JavaBeanReqObjMapper

java.lang.Object
  extended bycom.ibm.btt.server.flow.mapper.JavaBeanReqObjMapper
All Implemented Interfaces:
RequestObjectMapper

public class JavaBeanReqObjMapper
extends java.lang.Object
implements RequestObjectMapper

This class maps a java bean to a keyed collection.

The java bean object need to meet the JavaBean specification and corresponding fields are required to be defined in the keyed collection.


Field Summary
static java.lang.String GetterHead
          GetterHead
 
Constructor Summary
JavaBeanReqObjMapper()
           
 
Method Summary
static boolean isGetter(java.lang.reflect.Method aMethod)
          Returns whether a method is a getter.
 DataElement mapRequestObject(java.lang.Object reqObj, DataElement dataElement)
          Maps the request object to the data element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GetterHead

public static final java.lang.String GetterHead
GetterHead

See Also:
Constant Field Values
Constructor Detail

JavaBeanReqObjMapper

public JavaBeanReqObjMapper()
Method Detail

mapRequestObject

public DataElement mapRequestObject(java.lang.Object reqObj,
                                    DataElement dataElement)
                             throws java.lang.Exception
Maps the request object to the data element.

Exception will be thrown out if the data element is not a keyed collection.

Specified by:
mapRequestObject in interface RequestObjectMapper
Parameters:
reqObj - The request object.
dataElement - The data element.
Returns:
com.ibm.btt.base.DataElement The data element.
Throws:
java.lang.Exception

isGetter

public static boolean isGetter(java.lang.reflect.Method aMethod)
                        throws java.lang.Exception
Returns whether a method is a getter.

A getter method has following characters: a getter is a public method; the method name of a getter starts with "get"; the length of a getter's method name is more than 3; a getter has no parameter.

Parameters:
aMethod - The method.
Returns:
boolean Whether a method is a getter.
Throws:
java.lang.Exception

IBM Branch Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2005