-
- 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 java.lang.StringCONVERTIBLE_TYPEType name for the wrapper type implementingorg.tentackle.misc.Convertible.static java.lang.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(java.lang.Class<T> clazz)Gets the datatype singleton.default <T> DataType<T>get(java.lang.Class<T> clazz, java.lang.String variant)Gets the datatype singleton.default DataType<?>get(java.lang.String javaType)Gets the datatype singleton.DataType<?>get(java.lang.String name, java.lang.String variant)Gets the datatype singleton.ConvertibleTypegetConvertibleType()Gets the special convertible type singleton.static DataTypeFactorygetInstance()The singleton.
-
-
-
Field Detail
-
LARGE_VARIANT
static final java.lang.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 java.lang.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(java.lang.String name, java.lang.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(java.lang.Class<T> clazz, java.lang.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(java.lang.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(java.lang.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
-
-