Package org.hibernate.dialect
Enum TimeZoneSupport
- java.lang.Object
-
- java.lang.Enum<TimeZoneSupport>
-
- org.hibernate.dialect.TimeZoneSupport
-
- All Implemented Interfaces:
Serializable
,Comparable<TimeZoneSupport>
@Incubating public enum TimeZoneSupport extends Enum<TimeZoneSupport>
Describes the extent to which a given database supports the SQLwith time zone
types.Really we only care about
timestamp with time zone
here, since the typetime with time zone
is deeply conceptually questionable, and so Hibernate eschews its use.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static TimeZoneSupport
valueOf(String name)
Returns the enum constant of this type with the specified name.static TimeZoneSupport[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NATIVE
public static final TimeZoneSupport NATIVE
Thewith 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
Thewith 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 forwith 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 nameNullPointerException
- if the argument is null
-
-