org.hibernate.annotations.UpdateTimestamp Maven / Gradle / Ivy
/*
* 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.UpdateTimestampGeneration;
/**
* Marks a property as the update timestamp of the containing entity. The property value will be set to the current VM
* date whenever the owning entity is updated.
*
* 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 = UpdateTimestampGeneration.class)
@Retention(RetentionPolicy.RUNTIME)
@Target({ FIELD, METHOD })
public @interface UpdateTimestamp {
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy