Class TypeWrapper<T extends Type>


  • public class TypeWrapper<T extends Type>
    extends Object
    Wrapper class for Hibernate types that will try to "hide" issues with the redesign of the type system in Hibernate that is going on in Hibernate 3.5.2 --> Hibernate 3.6.
    Since:
    2.16
    Author:
    Nicklas
    Last modified
    $Date: 2017-05-22 14:35:27 +0200 (må, 22 maj 2017) $
    • Constructor Detail

      • TypeWrapper

        protected TypeWrapper​(T hibernateType,
                              int size)
    • Method Detail

      • getHibernateType

        public T getHibernateType()
        Get the underlying Hibernate type.
      • getSQLType

        public int getSQLType()
        Get the SQL code for database columns that can store this type.
        Returns:
        A code, or 0 if not applicable to the given type
        See Also:
        Types
      • getApproximateSize

        public int getApproximateSize()
        Get the number of bytes a single value for this type occupies in a database (approximately). If the type represents a variable-length property, 0 is returned.
        Returns:
        The number of bytes required in the database or 0 if not known
        Since:
        3.1