Package org.datanucleus
Class BeanValidationHandler
java.lang.Object
org.datanucleus.BeanValidationHandler
Handles the integration of "javax.validation" Bean Validation API (JSR 303).
Note that this is the only class referring to BeanValidation classes so that it is usable in environments without BeanValidation present.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static class
Resolver for traversal of validation. -
Field Summary
FieldsModifier and TypeFieldDescription(package private) ClassLoaderResolver
(package private) Configuration
(package private) javax.validation.Validator
-
Constructor Summary
ConstructorsConstructorDescriptionBeanValidationHandler
(ExecutionContext ec, Object validatorFactory) Constructor for a validation handler. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
private Class<?>[]
Parse comma separated string of class names and return a corresponding array of classesvoid
void
prePersist
(Object pc) void
void
Validate the constraints of an object
-
Field Details
-
validator
javax.validation.Validator validator -
clr
-
conf
Configuration conf
-
-
Constructor Details
-
BeanValidationHandler
Constructor for a validation handler.- Parameters:
ec
- ExecutionContext that we are persisting invalidatorFactory
- Validation factory
-
-
Method Details
-
close
public void close() -
validate
Validate the constraints of an object- Parameters:
pc
- the objectcallbackName
- Name of the callbackgroups
- the validation groups
-
preDelete
-
preStore
-
prePersist
-
getGroups
Parse comma separated string of class names and return a corresponding array of classes- Parameters:
property
- the string with comma separated class names- Returns:
- The groups
-