|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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(javax.validation.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(javax.validation.ValidatorFactory factory, Properties properties)
factory
- The ValidatorFactory
to use to create Validator
instance(s)properties
- Configued propertiesMethod Detail |
---|
public void initialize(Configuration cfg)
initialize
in interface Initializable
public boolean onPreInsert(PreInsertEvent event)
PreInsertEventListener
onPreInsert
in interface PreInsertEventListener
public boolean onPreUpdate(PreUpdateEvent event)
PreUpdateEventListener
onPreUpdate
in interface PreUpdateEventListener
public 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 |