Enum TimeZoneSupport

  • All Implemented Interfaces:
    Serializable, Comparable<TimeZoneSupport>

    @Incubating
    public enum TimeZoneSupport
    extends Enum<TimeZoneSupport>
    Describes the extent to which a given database supports the SQL with time zone types.

    Really we only care about timestamp with time zone here, since the type time with time zone is deeply conceptually questionable, and so Hibernate eschews its use.

    • Enum Constant Detail

      • NATIVE

        public static final TimeZoneSupport NATIVE
        The with time zone types retain the time zone information. That is, a round trip writing and reading a zoned datetime results in the exact same zoned datetime with the same timezone.
      • NORMALIZE

        public static final TimeZoneSupport NORMALIZE
        The with time zone types normalize to UTC. That is, a round trip writing and reading a zoned datetime results in a datetime representing the same instant, but in the timezone UTC.
      • NONE

        public static final TimeZoneSupport NONE
        No support for with time zone types.
    • Method Detail

      • values

        public static TimeZoneSupport[] 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 (TimeZoneSupport c : TimeZoneSupport.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static TimeZoneSupport 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