Examples of addExpressionVariable()


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

      }
      else if ( question.equals( QUESTION_2 ) ) {
        createMultipleConstraintViolationsUpdatingVariableValues( hibernateContext );
      }
      else if ( question.equals( QUESTION_3 ) ) {
        hibernateContext.addExpressionVariable( "answer", "${foo}" );
      }
      else {
        tryingToIllegallyUseNullAttributeName( hibernateContext );
      }
View Full Code Here

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

    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
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.