Package org.hibernate
Enum Class TimeZoneStorageStrategy
- All Implemented Interfaces:
Serializable
,Comparable<TimeZoneStorageStrategy>
,java.lang.constant.Constable
Enumerates the possible storage strategies for offset or zoned datetimes.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionStores the time zone in a separate column.Stores the time zone via thewith time zone
SQL types which retain the information.Does not store the time zone, and instead: when persisting to the database, normalizes JDBC timestamps to the JdbcSettings.JDBC_TIME_ZONE or to the JVM default time zone otherwise.Doesn't store the time zone, but instead normalizes to UTC. -
Method Summary
Modifier and TypeMethodDescriptionstatic TimeZoneStorageStrategy
Returns the enum constant of this class with the specified name.static TimeZoneStorageStrategy[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NATIVE
Stores the time zone via thewith time zone
SQL types which retain the information. -
COLUMN
Stores the time zone in a separate column. -
NORMALIZE
Does not store the time zone, and instead:- when persisting to the database, normalizes JDBC timestamps to the JdbcSettings.JDBC_TIME_ZONE or to the JVM default time zone otherwise.
- when reading back from the database, sets the offset or zone
of
OffsetDateTime
/ZonedDateTime
properties to the JVM default time zone.
Provided partly for backward compatibility with older versions of Hibernate.
-
NORMALIZE_UTC
Doesn't store the time zone, but instead normalizes to UTC.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-