|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.hibernate.cfg.beanvalidation.BeanValidationEventListener
public class BeanValidationEventListener
Event listener used to enable Bean Validation for insert/update/delete events.
| Constructor Summary | |
|---|---|
BeanValidationEventListener()
No-arg constructor used when listener is configured via configuration file |
|
BeanValidationEventListener(ValidatorFactory factory,
Properties properties)
Constructor used in an environment where validator factory is injected (JPA2). |
|
| Method Summary | |
|---|---|
void |
initialize(Configuration cfg)
|
boolean |
onPreDelete(PreDeleteEvent event)
Return true if the operation should be vetoed |
boolean |
onPreInsert(PreInsertEvent event)
Return true if the operation should be vetoed |
boolean |
onPreUpdate(PreUpdateEvent event)
Return true if the operation should be vetoed |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BeanValidationEventListener()
public BeanValidationEventListener(ValidatorFactory factory,
Properties properties)
factory - The ValidatorFactory to use to create Validator instance(s)properties - Configued properties| Method Detail |
|---|
public void initialize(Configuration cfg)
public boolean onPreInsert(PreInsertEvent event)
PreInsertEventListener
onPreInsert in interface PreInsertEventListenerpublic boolean onPreUpdate(PreUpdateEvent event)
PreUpdateEventListener
onPreUpdate in interface PreUpdateEventListenerpublic boolean onPreDelete(PreDeleteEvent event)
PreDeleteEventListener
onPreDelete in interface PreDeleteEventListener
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||