public class BeanValidationEventListener extends Object implements PreInsertEventListener, PreUpdateEventListener, PreDeleteEventListener
Event listener used to enable Bean Validation for insert/update/delete events.
| Constructor and Description |
|---|
BeanValidationEventListener(ValidatorFactory factory,
Map settings,
ClassLoaderService classLoaderService)
Constructor used in an environment where validator factory is injected (JPA2).
|
| Modifier and Type | Method and Description |
|---|---|
void |
initialize(Map settings,
ClassLoaderService classLoaderService) |
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(ValidatorFactory factory, Map settings, ClassLoaderService classLoaderService)
Constructor used in an environment where validator factory is injected (JPA2).
factory - The ValidatorFactory to use to create Validator instance(s)settings - Configued propertiespublic void initialize(Map settings, ClassLoaderService classLoaderService)
public boolean onPreInsert(PreInsertEvent event)
PreInsertEventListenerReturn true if the operation should be vetoed
onPreInsert in interface PreInsertEventListenerpublic boolean onPreUpdate(PreUpdateEvent event)
PreUpdateEventListenerReturn true if the operation should be vetoed
onPreUpdate in interface PreUpdateEventListenerpublic boolean onPreDelete(PreDeleteEvent event)
PreDeleteEventListenerReturn true if the operation should be vetoed
onPreDelete in interface PreDeleteEventListenerCopyright © 2001-2018 Red Hat, Inc. All Rights Reserved.