Interface DataTypeFactory

  • All Known Implementing Classes:
    DefaultDataTypeFactory

    public interface DataTypeFactory
    Loads all datatypes and creates singletons of each type.
    • 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 implementing org.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 name
        variant - 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 class
        variant - 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