@Retention(CLASS) @Target({METHOD})

public @interface PrePersist

Invokes a public no-argument callback before inserting a new entity during flush.