Package com.blazebit.persistence.view
Annotation Type PrePersist
@Target(METHOD) @Retention(RUNTIME) public @interface PrePersist
Annotation to mark a method to be executed before a call to
EntityManager.persist(Object)
when flushing
the creatable entity view containing this method via EntityViewManager.save(EntityManager, Object)
.
A method annotated with @PrePersist
may optionally have the following parameters
- An
EntityViewManager
- An
EntityManager
- The entity object. The entity type of the entity view and all super types are allowed.
@PrePersist
and it must return void
.
Super type methods annotated with @PrePersist
are ignored if an entity view defines a @PrePersist
method.- Since:
- 1.4.0
- Author:
- Christian Beikov