public class BeanValidationEventListener extends Object implements PreInsertEventListener, PreUpdateEventListener, PreDeleteEventListener
Constructor and Description |
---|
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).
|
Modifier and Type | Method and Description |
---|---|
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
|
public BeanValidationEventListener()
public BeanValidationEventListener(ValidatorFactory factory, Properties properties)
factory
- The ValidatorFactory
to use to create Validator
instance(s)properties
- Configued propertiespublic void initialize(Configuration cfg)
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
Copyright © 2001-2015 Red Hat, Inc. All Rights Reserved.