com.bea.tuxedo.control
Class TuxFieldViewSerialize

java.lang.Object
  extended by com.bea.tuxedo.control.TuxFieldViewSerialize
All Implemented Interfaces:
ITuxField

public class TuxFieldViewSerialize
extends Object
implements ITuxField

Provide access to a single field in a View or View32 buffer. Used by serialization code.


Constructor Summary
TuxFieldViewSerialize(String nm, int type, boolean array)
           
 
Method Summary
 String getName()
          Return the name of the field.
 int getSize(Object obj)
          Return the max size of an array field, else 1.
 int getType()
          Return the Tuxedo type code for the field.
 Object getValue(Object object)
          Get the value of the next indexed field in the given object.
 void setConventions(boolean useBeanConv)
          Set the bean conventions for the field
 void setCount(int max)
          Set the max size of an array for an array field.
 void setGetter(Method method)
          Set the getter method for this field.
 void setSetter(Method method, boolean useBeanConv)
          Set the setter method for the field.
 void setValue(Object object, Object value)
          Set the value of the next indexed member of the field in the given object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TuxFieldViewSerialize

public TuxFieldViewSerialize(String nm,
                             int type,
                             boolean array)
Method Detail

setGetter

public void setGetter(Method method)
Set the getter method for this field.

Parameters:
method - The getter method
cnt - The max array size for the field or 1 if not an array.

setCount

public void setCount(int max)
Set the max size of an array for an array field.

Parameters:
max - The max size of the array.

setSetter

public void setSetter(Method method,
                      boolean useBeanConv)
Set the setter method for the field.

Parameters:
method - The setter method
useBeanConv - true if the setter uses the JavaBean conventions for setting array fields: index, value; if false, the setter uses value, index

setConventions

public void setConventions(boolean useBeanConv)
Set the bean conventions for the field

Parameters:
useBeanConv - true if the setter uses the JavaBean conventions for setting array fields: index, value; if false, the setter uses value, index

getType

public int getType()
Return the Tuxedo type code for the field.

Specified by:
getType in interface ITuxField
Returns:
The type code.

getName

public String getName()
Return the name of the field.

Specified by:
getName in interface ITuxField
Returns:
The name of the field, stripped of the set or get prefix.

getSize

public int getSize(Object obj)
Return the max size of an array field, else 1.

Specified by:
getSize in interface ITuxField
Parameters:
obj - The buffer object
Returns:
The max size of an array field, else 1.

setValue

public void setValue(Object object,
                     Object value)
              throws ControlException
Set the value of the next indexed member of the field in the given object.

Specified by:
setValue in interface ITuxField
Parameters:
object - The View or View32 buffer.
value - The desired value.
Throws:
ControlException

getValue

public Object getValue(Object object)
                throws ControlException
Get the value of the next indexed field in the given object.

Specified by:
getValue in interface ITuxField
Parameters:
object - The view or view32 buffer.
Returns:
The value of the next indexed member of the field.
Throws:
ControlException