Interface DataTypeFactory

All Known Implementing Classes:
DefaultDataTypeFactory

public interface DataTypeFactory
Loads all data types and creates singletons of each type.
  • Field Details

    • LARGE_VARIANT

      static final String LARGE_VARIANT
      Large variant of a type.
      For example, to distinguish standard VARCHAR Strings from CLOBs.
      See Also:
    • CONVERTIBLE_TYPE

      static final String CONVERTIBLE_TYPE
      Type name for the wrapper type implementing org.tentackle.misc.Convertible.
      See Also:
  • Method Details

    • getInstance

      static DataTypeFactory getInstance()
      The singleton.
      Returns:
      the singleton
    • get

      DataType<?> get(String name, String variant)
      Gets the datatype singleton.
      Parameters:
      name - the type name
      variant - 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 class
      variant - 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