About PreRemove

1-4 of 4Refresh
JPA Doc
157

javax.persistence.PreRemove

javax.persistence Annotation PreRemove Target: Callback methods Is used to specify callback methods for the corresponding lifecycle event. This annotation may be applied to methods of an entity class, a mapped superclass, or a callback listener class. Since: JPA 1.0 Learn how to define and use JPA
Manual
45

JPA Lifecycle Events

onPostUpdate() {} @PreRemove void onPreRemove() {} @PostRemove void onPostRemove ... the database (during commit or flush). @PreRemove - when an entity is marked for removal in ... ) {} @PostUpdate void onPostUpdate(Object o) {} @PreRemove void onPreRemove(Object o
Issue
2

Bean Validation (JPA 2.0)

JPA 2 adds support for integration with the Bean Validation API. Constraints that are defined for entity and embeddable classes by using annotations can be checked automatically on PrePersist, PreUpdate and PreRemove JPA lifecycle events. Integration with the Validation API is not supported yet by
Forum
2

Method Invocation On All Entities

for the quick reply. I've annotated a method with the PreRemove annotation and for testing purposes