public interface IDataTransformer
IDataTransformer
implementation is used to transform one
object from one type into another. This is especially used for data bindings.
Bindings can be enabled in the application model for all controls that do
support binding. All binding types do also support transformation to do the
type conversion before the value is set to for the control.
Implement transform(Object, int)
} to do the type conversion. Make
sure to implement efficiently, this method can be called frequently!
Modifier and Type | Field and Description |
---|---|
static int |
TYPE_BOOLEAN
Use if the transformed object should be a Boolean.
|
static int |
TYPE_DATE
Use if the transformed object should be a Date.
|
static int |
TYPE_ENTITY
Use if the transformed object should be an an
IEntity . |
static int |
TYPE_IMAGE
Use if the transformed object should be an Image.
|
static int |
TYPE_JSON_OBJECT
Use if the input object is a JSON Object
|
static int |
TYPE_LONG
Use if the transformed object should be a Long.
|
static int |
TYPE_NONE
Use for no specific type.
|
static int |
TYPE_STRING
Use if the transformed object should be a String.
|
static int |
TYPE_XML_STRING
Use if the input object is a XML String
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
transform(java.lang.Object object,
int intoType)
Transforms the given object into the type identified by
intoType . |
static final int TYPE_NONE
static final int TYPE_STRING
static final int TYPE_IMAGE
static final int TYPE_BOOLEAN
static final int TYPE_DATE
static final int TYPE_LONG
static final int TYPE_ENTITY
IEntity
.static final int TYPE_JSON_OBJECT
static final int TYPE_XML_STRING
java.lang.Object transform(java.lang.Object object, int intoType)
intoType
. Supported types are defined in
IDataTransformer
.object
- the object to be convertedintoType
- the type the object should be converted into