Package org.hibernate

Class Length


  • public final class Length
    extends Object
    Defines a list of useful constant values that may be used to specify long column lengths in the JPA Column annotation.

    For example, @Column(length=LONG16) would specify that Hibernate should generate DDL with a column type capable of holding strings with 16-bit lengths.

    Since:
    6.0
    See Also:
    Column.length()
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int DEFAULT
      The default length for a column in JPA.
      static int LOB_DEFAULT
      The default length for a LOB column, on databases where LOB columns have a length.
      static int LONG
      Used to select a variable-length SQL type large enough to contain values of maximum length 32600.
      static int LONG16
      The maximum length that fits in 16 bits.
      static int LONG32
      The maximum length of a Java string or array, that is, the maximum length that fits in 32 bits.