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)
PreInsertEventListeneronPreInsert in interface PreInsertEventListenerpublic boolean onPreUpdate(PreUpdateEvent event)
PreUpdateEventListeneronPreUpdate in interface PreUpdateEventListenerpublic boolean onPreDelete(PreDeleteEvent event)
PreDeleteEventListeneronPreDelete in interface PreDeleteEventListenerCopyright © 2001-2015 Red Hat, Inc. All Rights Reserved.