|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mentawai.converter.BasicConverter
public abstract class BasicConverter
The simplest form of a converter that takes an object and convert it to another one. You should override this class to implement your own converters.
| Constructor Summary | |
|---|---|
BasicConverter()
|
|
| Method Summary | |
|---|---|
protected boolean |
allowNull()
Override this method if you want to convert null (not-present) values. |
abstract Object |
convert(Object value)
Converts an object to another one. |
Object |
convert(String field,
Action action)
Converts a input field from this action. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BasicConverter()
| Method Detail |
|---|
public abstract Object convert(Object value)
throws ConversionException
value - The object to convert.
ConversionException - if the conversion fail for any reason.protected boolean allowNull()
public Object convert(String field,
Action action)
throws ConversionException
Converter
convert in interface Converterfield - The field to convert.action - The action from where to get the field.
ConversionException - if the field value cannot be converted.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||