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(String name)
Get custom data type given its name
|
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
|
Object |
getObject(Value value,
Class<?> cls)
Converts
Value object
to the specified class. |
int |
getTypeIdFromClass(Class<?> cls)
Get custom data type identifier given corresponding Java class
|
Value |
getValue(int type,
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(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 typeString getDataTypeClassName(int type)
type
- identifier of a data typeint getTypeIdFromClass(Class<?> cls)
cls
- Java class objectValue getValue(int type, 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 objectObject getObject(Value value, 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 typeCopyright © 2020 JBoss by Red Hat. All rights reserved.