- java.lang.Object
-
- org.datanucleus.BeanValidationHandler
-
public class BeanValidationHandler extends Object
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.
-
-
Constructor Summary
Constructors Constructor Description BeanValidationHandler(ExecutionContext ec, Object validatorFactory)
Constructor for a validation handler.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
preDelete(Object pc)
void
prePersist(Object pc)
void
preStore(Object pc)
void
validate(Object pc, String callbackName, Class<?>[] groups)
Validate the constraints of an object
-
-
-
Constructor Detail
-
BeanValidationHandler
public BeanValidationHandler(ExecutionContext ec, Object validatorFactory)
Constructor for a validation handler.- Parameters:
ec
- ExecutionContext that we are persisting invalidatorFactory
- Validation factory
-
-
Method Detail
-
close
public void close()
-
validate
public void validate(Object pc, String callbackName, Class<?>[] groups)
Validate the constraints of an object- Parameters:
pc
- the objectcallbackName
- Name of the callbackgroups
- the validation groups
-
preDelete
public void preDelete(Object pc)
-
preStore
public void preStore(Object pc)
-
prePersist
public void prePersist(Object pc)
-
-