org.apache.commons.betwixt.expression
Class DynaBeanUpdater

java.lang.Object
  extended byorg.apache.commons.betwixt.expression.TypedUpdater
      extended byorg.apache.commons.betwixt.expression.DynaBeanUpdater
All Implemented Interfaces:
Updater

public class DynaBeanUpdater
extends TypedUpdater

Updates DynaBean's.

Since:
0.7
Author:
Jakarta Commons Team, Apache Software Foundation

Field Summary
private  java.lang.String propertyName
          The name of the dyna property to be updated
 
Fields inherited from class org.apache.commons.betwixt.expression.TypedUpdater
 
Constructor Summary
DynaBeanUpdater(org.apache.commons.beanutils.DynaProperty dynaProperty)
          Constructs a DynaBeanUpdater for given DynaProperty.
DynaBeanUpdater(java.lang.String propertyName, java.lang.Class type)
          Constructs a DynaBeanUpdater for the given type and property name.
 
Method Summary
protected  void executeUpdate(Context context, java.lang.Object bean, java.lang.Object value)
          Executes the update on the given code>DynaBean
 java.lang.String toString()
          Outputs something suitable for logging.
 
Methods inherited from class org.apache.commons.betwixt.expression.TypedUpdater
getValueType, handleException, setValueType, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

propertyName

private final java.lang.String propertyName
The name of the dyna property to be updated

Constructor Detail

DynaBeanUpdater

public DynaBeanUpdater(org.apache.commons.beanutils.DynaProperty dynaProperty)
Constructs a DynaBeanUpdater for given DynaProperty.

Parameters:
dynaProperty - DyanProperty, not null

DynaBeanUpdater

public DynaBeanUpdater(java.lang.String propertyName,
                       java.lang.Class type)
Constructs a DynaBeanUpdater for the given type and property name.

Parameters:
propertyName - name of the dyan property
type - type of the dyna property
Method Detail

executeUpdate

protected void executeUpdate(Context context,
                             java.lang.Object bean,
                             java.lang.Object value)
                      throws java.lang.Exception
Executes the update on the given code>DynaBean

Specified by:
executeUpdate in class TypedUpdater
Parameters:
bean -
value - value after type conversion
Throws:
java.lang.Exception
See Also:
TypedUpdater.executeUpdate(Context, java.lang.Object, java.lang.Object)

toString

public java.lang.String toString()
Outputs something suitable for logging.