Class 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 Detail

      • BeanValidationHandler

        public BeanValidationHandler​(ExecutionContext ec,
                                     Object validatorFactory)
        Constructor for a validation handler.
        Parameters:
        ec - ExecutionContext that we are persisting in
        validatorFactory - 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 object
        callbackName - Name of the callback
        groups - the validation groups
      • preDelete

        public void preDelete​(Object pc)
      • preStore

        public void preStore​(Object pc)
      • prePersist

        public void prePersist​(Object pc)