-
- All Known Implementing Classes:
DefaultDataTypeFactory
public interface DataTypeFactoryLoads all datatypes and creates singletons of each type.
-
-
Field Summary
Fields Modifier and Type Field Description static StringCONVERTIBLE_TYPEType name for the wrapper type implementingorg.tentackle.misc.Convertible.static StringLARGE_VARIANTLarge variant of a type.
For example, to distinguish standard VARCHAR Strings from CLOBs.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default <T> DataType<T>get(Class<T> clazz)Gets the datatype singleton.default <T> DataType<T>get(Class<T> clazz, String variant)Gets the datatype singleton.default DataType<?>get(String javaType)Gets the datatype singleton.DataType<?>get(String name, String variant)Gets the datatype singleton.ConvertibleTypegetConvertibleType()Gets the special convertible type singleton.static DataTypeFactorygetInstance()The singleton.
-
-
-
Field Detail
-
LARGE_VARIANT
static final String LARGE_VARIANT
Large variant of a type.
For example, to distinguish standard VARCHAR Strings from CLOBs.- See Also:
- Constant Field Values
-
CONVERTIBLE_TYPE
static final String CONVERTIBLE_TYPE
Type name for the wrapper type implementingorg.tentackle.misc.Convertible.- See Also:
- Constant Field Values
-
-
Method Detail
-
getInstance
static DataTypeFactory getInstance()
The singleton.- Returns:
- the singleton
-
get
DataType<?> get(String name, String variant)
Gets the datatype singleton.- Parameters:
name- the type namevariant- the type variant, empty string if none- Returns:
- the datatype, null if no such type
-
get
default <T> DataType<T> get(Class<T> clazz, String variant)
Gets the datatype singleton.- Type Parameters:
T- the java type- Parameters:
clazz- the java classvariant- the variant, empty string if none- Returns:
- the datatype, null if no such type
-
get
default DataType<?> get(String javaType)
Gets the datatype singleton.- Parameters:
javaType- the java type- Returns:
- the datatype, null if no such type
-
get
default <T> DataType<T> get(Class<T> clazz)
Gets the datatype singleton.- Type Parameters:
T- the java type- Parameters:
clazz- the java class- Returns:
- the datatype, null if no such type
-
getConvertibleType
ConvertibleType getConvertibleType()
Gets the special convertible type singleton.- Returns:
- the application specific wrapper type
-
-