org.hibernate.annotations.CreationTimestamp Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of beangle-hibernate-core Show documentation
Show all versions of beangle-hibernate-core Show documentation
Hibernate Orm Core Shade,Support Scala Collection
/*
* 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 static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.hibernate.tuple.CreationTimestampGeneration;
/**
* Marks a property as the creation timestamp of the containing entity. The property value will be set to the current
* VM date exactly once when saving the owning entity for the first time.
*
* Supported property types:
*
* - {@link java.util.Date}
* - {@link java.util.Calendar}
* - {@link java.sql.Date}
* - {@link java.sql.Time}
* - {@link java.sql.Timestamp}
* - {@link java.time.Instant}
* - {@link java.time.LocalDate}
* - {@link java.time.LocalDateTime}
* - {@link java.time.LocalTime}
* - {@link java.time.MonthDay}
* - {@link java.time.OffsetDateTime}
* - {@link java.time.OffsetTime}
* - {@link java.time.Year}
* - {@link java.time.YearMonth}
* - {@link java.time.ZonedDateTime}
*
*
* @author Gunnar Morling
*/
@ValueGenerationType(generatedBy = CreationTimestampGeneration.class)
@Retention(RetentionPolicy.RUNTIME)
@Target({ FIELD, METHOD })
public @interface CreationTimestamp {
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy