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

org.hibernate.annotations.TimeZoneColumn 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.annotations;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import org.hibernate.Incubating;

import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;

/**
 * Specifies the mapped column for storing the time zone information,
 * for use in conjunction with {@link TimeZoneStorageType#COLUMN} or
 * {@link TimeZoneStorageType#AUTO}. The column is simply ignored if
 * {@code AUTO} is used and the database supports native time zone
 * storage.
 *
 * @author Christian Beikov
 * @author Steve Ebersole
 * @author Andrea Boriero
 * @see TimeZoneStorage
 * @see TimeZoneStorageType#COLUMN
 * @see TimeZoneStorageType#AUTO
 *
 * @since 6.0
 */
@Incubating
@Retention(RetentionPolicy.RUNTIME)
@Target({ FIELD, METHOD })
public @interface TimeZoneColumn {

	/**
	 * (Optional) The name of the column. Defaults to
	 * the property or field name, suffixed by _tz.
	 */
	String name() default "";

	/**
	 * (Optional) Whether the column is included in SQL INSERT
	 * statements generated by the persistence provider.
	 */
	boolean insertable() default true;

	/**
	 * (Optional) Whether the column is included in SQL UPDATE
	 * statements generated by the persistence provider.
	 */
	boolean updatable() default true;

	/**
	 * (Optional) The SQL fragment that is used when
	 * generating the DDL for the column.
	 * 

Defaults to the generated SQL to create a * column of the inferred type. */ String columnDefinition() default ""; /** * (Optional) The name of the table that contains the column. * If absent the column is assumed to be in the primary table. */ String table() default ""; }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy