Package org.hibernate.annotations
Enum TimeZoneStorageType
- java.lang.Object
-
- java.lang.Enum<TimeZoneStorageType>
-
- org.hibernate.annotations.TimeZoneStorageType
-
- All Implemented Interfaces:
Serializable
,Comparable<TimeZoneStorageType>
public enum TimeZoneStorageType extends Enum<TimeZoneStorageType>
Describes the storage of timezone information for zoned datetime types.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description AUTO
Stores the time zone either withNATIVE
ifDialect.getTimeZoneSupport()
isTimeZoneSupport.NATIVE
, otherwise uses theCOLUMN
strategy.COLUMN
Stores the time zone in a separate column; works in conjunction withTimeZoneColumn
.NATIVE
Stores the timezone by using thewith time zone
SQL column type.NORMALIZE
Does not store the time zone, and instead normalizes timestamps to the JDBC timezone.NORMALIZE_UTC
Does not store the time zone, and instead normalizes timestamps to UTC.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static TimeZoneStorageType
valueOf(String name)
Returns the enum constant of this type with the specified name.static TimeZoneStorageType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NATIVE
public static final TimeZoneStorageType NATIVE
Stores the timezone by using thewith time zone
SQL column type. Error ifDialect.getTimeZoneSupport()
is notTimeZoneSupport.NATIVE
.
-
NORMALIZE
public static final TimeZoneStorageType NORMALIZE
Does not store the time zone, and instead normalizes timestamps to the JDBC timezone.
-
NORMALIZE_UTC
public static final TimeZoneStorageType NORMALIZE_UTC
Does not store the time zone, and instead normalizes timestamps to UTC.
-
COLUMN
public static final TimeZoneStorageType COLUMN
Stores the time zone in a separate column; works in conjunction withTimeZoneColumn
.
-
AUTO
public static final TimeZoneStorageType AUTO
Stores the time zone either withNATIVE
ifDialect.getTimeZoneSupport()
isTimeZoneSupport.NATIVE
, otherwise uses theCOLUMN
strategy.
-
-
Method Detail
-
values
public static TimeZoneStorageType[] 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 (TimeZoneStorageType c : TimeZoneStorageType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TimeZoneStorageType 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
-
-