Enum CastType

  • All Implemented Interfaces:
    Serializable, Comparable<CastType>

    public enum CastType
    extends Enum<CastType>
    Defines the set of basic types which should be accepted by the cast() function on every platform.

    Note that while almost every database supports the ANSI cast() function, the actual type conversions supported vary widely. Therefore, it is sometimes necessary to emulate certain type conversions that we consider "basic". In particular, some databases (looking at you, MySQL and friends) don't have a proper Types.BOOLEAN type, and so type conversions to and from Boolean must be emulated. see org.hibernate.dialect.Dialect#castPattern(CastType, CastType)

    • Enum Constant Detail

      • STRING

        public static final CastType STRING
      • BOOLEAN

        public static final CastType BOOLEAN
      • INTEGER_BOOLEAN

        public static final CastType INTEGER_BOOLEAN
      • YN_BOOLEAN

        public static final CastType YN_BOOLEAN
      • TF_BOOLEAN

        public static final CastType TF_BOOLEAN
      • INTEGER

        public static final CastType INTEGER
      • LONG

        public static final CastType LONG
      • FLOAT

        public static final CastType FLOAT
      • DOUBLE

        public static final CastType DOUBLE
      • FIXED

        public static final CastType FIXED
      • DATE

        public static final CastType DATE
      • TIME

        public static final CastType TIME
      • TIMESTAMP

        public static final CastType TIMESTAMP
      • OFFSET_TIMESTAMP

        public static final CastType OFFSET_TIMESTAMP
      • ZONE_TIMESTAMP

        public static final CastType ZONE_TIMESTAMP
      • NULL

        public static final CastType NULL
      • OTHER

        public static final CastType OTHER
    • Method Detail

      • values

        public static CastType[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (CastType c : CastType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static CastType valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • isNumeric

        public boolean isNumeric()