Skip to content

Commit

Permalink
HHH-12811 Add @target annotations to @CreationTimestamp and @UpdateTi…
Browse files Browse the repository at this point in the history
…mestamp
  • Loading branch information
gsmet committed Jul 17, 2018
1 parent 208e789 commit fa02d1c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Expand Up @@ -6,10 +6,14 @@
*/
package org.hibernate.annotations;

import org.hibernate.tuple.CreationTimestampGeneration;
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
Expand Down Expand Up @@ -38,5 +42,6 @@
*/
@ValueGenerationType(generatedBy = CreationTimestampGeneration.class)
@Retention(RetentionPolicy.RUNTIME)
@Target({ FIELD, METHOD })
public @interface CreationTimestamp {
}
Expand Up @@ -6,10 +6,14 @@
*/
package org.hibernate.annotations;

import org.hibernate.tuple.UpdateTimestampGeneration;
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
Expand Down Expand Up @@ -38,5 +42,6 @@
*/
@ValueGenerationType(generatedBy = UpdateTimestampGeneration.class)
@Retention(RetentionPolicy.RUNTIME)
@Target({ FIELD, METHOD })
public @interface UpdateTimestamp {
}

0 comments on commit fa02d1c

Please sign in to comment.