validation « Interceptor « JPA Q&A





1. Collection exploration in validator interceptor    stackoverflow.com

A question about Java-Hibernate-Validator. I need to access to a collection attribute when my validation system intercepts an entity insert/update. I mean, my model defines A class with a set of B elements. When ...

3. saveOrUpdateEventListener of interceptor for validation?    forum.hibernate.org

Hi, I want to call an isValid() method on every object hibernate is going to save into the database. Now i have two options: - Extend the DefaultSaveOrUpdateEventListener and implement the onSaveOrUpdate() method (and thus calling object.isValid() ). - Create an interceptor and implement onFlushDirty() and onSave() ( and call the isValid() in these two methods). Which of the two options ...