Examples of disableDefaultConstraintViolation()


Examples of org.hibernate.validator.constraintvalidation.HibernateConstraintValidatorContext.disableDefaultConstraintViolation()

    if ( value.before( now ) ) {
      HibernateConstraintValidatorContext hibernateContext =
          context.unwrap( HibernateConstraintValidatorContext.class );

      hibernateContext.disableDefaultConstraintViolation();
      hibernateContext.addExpressionVariable( "now", now )
          .buildConstraintViolationWithTemplate( "Must be after ${now}" )
          .addConstraintViolation();

      return false;
View Full Code Here

Examples of org.hibernate.validator.internal.engine.constraintvalidation.ConstraintValidatorContextImpl.disableDefaultConstraintViolation()

    path.addBeanNode();

    ConstraintValidatorContextImpl context = new ConstraintValidatorContextImpl(
        null, path, null
    );
    context.disableDefaultConstraintViolation();
    return context;
  }

  private void assertMessageAndPath(ConstraintViolationCreationContext constraintViolationCreationContext, String expectedMessage, String expectedPath) {
    assertTrue(
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.