|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.commons.betwixt.expression.TypedUpdater
Abstracts common features for strongly typed Updater's.
Strongly type Updater's perform conversions based on this
the expected type before the bean update is invoked.
| Constructor Summary | |
TypedUpdater()
|
|
| Method Summary | |
protected abstract void |
executeUpdate(Context context,
java.lang.Object bean,
java.lang.Object value)
Updates the bean with the given value. |
java.lang.Class |
getValueType()
Gets the type expected. |
protected void |
handleException(Context context,
java.lang.Exception e)
Strategy method to allow derivations to handle exceptions differently. |
void |
setValueType(java.lang.Class valueType)
Sets the type expected. |
void |
update(Context context,
java.lang.Object newValue)
Updates the current bean context with the given String value |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public TypedUpdater()
| Method Detail |
public void update(Context context,
java.lang.Object newValue)
update in interface Updatercontext - the Context to be updatednewValue - the update to this new valuepublic java.lang.Class getValueType()
update(org.apache.commons.betwixt.expression.Context, java.lang.Object)
will be converted on the basis of this type
before being passed to executeUpdate(org.apache.commons.betwixt.expression.Context, java.lang.Object, java.lang.Object).
Class giving expected type, not nullpublic void setValueType(java.lang.Class valueType)
update(org.apache.commons.betwixt.expression.Context, java.lang.Object)
will be converted on the basis of this type
before being passed to executeUpdate(org.apache.commons.betwixt.expression.Context, java.lang.Object, java.lang.Object).
valueType - Class giving expected type, not null
protected abstract void executeUpdate(Context context,
java.lang.Object bean,
java.lang.Object value)
throws java.lang.Exception
bean - value - value after type conversion
java.lang.Exception
protected void handleException(Context context,
java.lang.Exception e)
context - the Context being updated when this exception occurede - the Exception that occured during the update
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||