All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.hibernate.TimeZoneStorageStrategy Maven / Gradle / Ivy

There is a newer version: 6.6.2.Final
Show newest version
/*
 * Hibernate, Relational Persistence for Idiomatic Java
 *
 * License: GNU Lesser General Public License (LGPL), version 2.1 or later.
 * See the lgpl.txt file in the root directory or .
 */
package org.hibernate;

/**
 * Enumerates the possible storage strategies for offset or zoned datetimes.
 *
 * @author Christian Beikov
 * @author Steve Ebersole
 * @author Andrea Boriero
 *
 * @see org.hibernate.annotations.TimeZoneStorageType
 * @see org.hibernate.dialect.TimeZoneSupport
 */
@Incubating
public enum TimeZoneStorageStrategy {
	/**
	 * Stores the time zone via the {@code with time zone} SQL types which retain
	 * the information.
	 */
	NATIVE,
	/**
	 * Stores the time zone in a separate column.
	 */
	COLUMN,
	/**
	 * Does not store the time zone, and instead:
	 * 
    *
  • when persisting to the database, normalizes JDBC timestamps to the * {@linkplain org.hibernate.cfg.AvailableSettings#JDBC_TIME_ZONE} * or to the JVM default time zone otherwise. *
  • when reading back from the database, sets the offset or zone * of {@code OffsetDateTime}/{@code ZonedDateTime} properties * to the JVM default time zone. *
*

* Provided partly for backward compatibility with older * versions of Hibernate. */ NORMALIZE, /** * Doesn't store the time zone, but instead normalizes to UTC. */ NORMALIZE_UTC }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy