public interface CustomDataTypesHandler
| Modifier and Type | Method and Description |
|---|---|
Value |
convert(Value source,
int targetType)
Convert the provided source value into value of given target data type
Shall implement conversions to and from custom data types.
|
int |
getAddProofType(int type)
Get compatible type identifier that would not overflow
after many add operations.
|
DataType |
getDataTypeById(int type)
Get custom data type given its integer id
|
DataType |
getDataTypeByName(java.lang.String name)
Get custom data type given its name
|
java.lang.String |
getDataTypeClassName(int type)
Get custom data type class name given its integer id
|
int |
getDataTypeOrder(int type)
Get order for custom data type given its integer id
|
java.lang.Object |
getObject(Value value,
java.lang.Class<?> cls)
Converts
Value object
to the specified class. |
int |
getTypeIdFromClass(java.lang.Class<?> cls)
Get custom data type identifier given corresponding Java class
|
Value |
getValue(int type,
java.lang.Object data,
DataHandler dataHandler)
Get
Value object
corresponding to given data type identifier and data. |
boolean |
supportsAdd(int type)
Checks if type supports add operation
|
DataType getDataTypeByName(java.lang.String name)
name - data type nameDataType getDataTypeById(int type)
type - identifier of a data typeint getDataTypeOrder(int type)
type - identifier of a data typeValue convert(Value source, int targetType)
source - source valuetargetType - identifier of target data typejava.lang.String getDataTypeClassName(int type)
type - identifier of a data typeint getTypeIdFromClass(java.lang.Class<?> cls)
cls - Java class objectValue getValue(int type, java.lang.Object data, DataHandler dataHandler)
Value object
corresponding to given data type identifier and data.type - custom data type identifierdata - underlying data type valuedataHandler - data handler objectjava.lang.Object getObject(Value value, java.lang.Class<?> cls)
Value object
to the specified class.value - the value to convertcls - the target classboolean supportsAdd(int type)
type - custom data type identifierint getAddProofType(int type)
type - identifier of a type