Package org.hibernate.validation.engine.groups

Examples of org.hibernate.validation.engine.groups.GroupChain


  public <T> Set<ConstraintViolation<T>> validate(T object, Class<?>... groups) {
    if ( object == null ) {
      throw new IllegalArgumentException( "Validation of a null object" );
    }

    GroupChain groupChain = determineGroupExecutionOrder( groups );

    GlobalExecutionContext<T> context = GlobalExecutionContext.getContextForValidate(
        object, messageInterpolator, constraintValidatorFactory, getCachingTraversableResolver()
    );
View Full Code Here


  public <T> Set<ConstraintViolation<T>> validateProperty(T object, String propertyName, Class<?>... groups) {
    if ( object == null ) {
      throw new IllegalArgumentException( "Validated object cannot be null." );
    }
    sanityCheckPropertyPath( propertyName );
    GroupChain groupChain = determineGroupExecutionOrder( groups );

    List<ConstraintViolation<T>> failingConstraintViolations = new ArrayList<ConstraintViolation<T>>();
    validateProperty(
        object, PathImpl.createPathFromString( propertyName ), failingConstraintViolations, groupChain
    );
View Full Code Here

    if ( beanType == null ) {
      throw new IllegalArgumentException( "The bean type cannot be null." );
    }

    sanityCheckPropertyPath( propertyName );
    GroupChain groupChain = determineGroupExecutionOrder( groups );

    List<ConstraintViolation<T>> failingConstraintViolations = new ArrayList<ConstraintViolation<T>>();
    validateValue(
        beanType, value, PathImpl.createPathFromString( propertyName ), failingConstraintViolations, groupChain
    );
View Full Code Here

      else if ( isIndexable ) {
        currentPath.getLeafNode().setIndex( index );
      }

      if ( !context.isAlreadyValidated( value, currentGroup, currentPath ) ) {
        GroupChain groupChain = groupChainGenerator.getGroupChainFor(
            Arrays.asList(
                new Class<?>[] {
                    currentGroup
                }
            )
View Full Code Here

   */
  public <T> Set<ConstraintViolation<T>> validate(T object, Class<?>... groups) {
    if ( object == null ) {
      throw new IllegalArgumentException( "Validation of a null object" );
    }
    GroupChain groupChain = determineGroupExecutionOrder( groups );

    ExecutionContext<T> context = ExecutionContext.getContextForValidate(
        object, messageInterpolator, constraintValidatorFactory, traversableResolver
    );

View Full Code Here

  public <T> Set<ConstraintViolation<T>> validateProperty(T object, String propertyName, Class<?>... groups) {
    if ( object == null ) {
      throw new IllegalArgumentException( "Validated object cannot be null." );
    }
    sanityCheckPropertyPath( propertyName );
    GroupChain groupChain = determineGroupExecutionOrder( groups );

    List<ConstraintViolation<T>> failingConstraintViolations = new ArrayList<ConstraintViolation<T>>();
    validateProperty( object, new PropertyIterator( propertyName ), failingConstraintViolations, groupChain );
    return new HashSet<ConstraintViolation<T>>( failingConstraintViolations );
  }
View Full Code Here

  public <T> Set<ConstraintViolation<T>> validateValue(Class<T> beanType, String propertyName, Object value, Class<?>... groups) {
    if ( beanType == null ) {
      throw new IllegalArgumentException( "The bean type cannot be null." );
    }
    sanityCheckPropertyPath( propertyName );
    GroupChain groupChain = determineGroupExecutionOrder( groups );

    List<ConstraintViolation<T>> failingConstraintViolations = new ArrayList<ConstraintViolation<T>>();
    validateValue( beanType, value, new PropertyIterator( propertyName ), failingConstraintViolations, groupChain );
    return new HashSet<ConstraintViolation<T>>( failingConstraintViolations );
  }
View Full Code Here

      }

      if ( !context.isAlreadyValidated( actualValue ) ) {
        context.setPropertyIndex( propertyIndex );
        context.pushCurrentBean( actualValue );
        GroupChain groupChain = groupChainGenerator.getGroupChainFor( Arrays.asList( new Class<?>[] { context.getCurrentGroup() } ) );
        validateInContext( context, groupChain );
        context.popCurrentBean();
      }
      i++;
    }
View Full Code Here

  public <T> Set<ConstraintViolation<T>> validate(T object, Class<?>... groups) {
    if ( object == null ) {
      throw new IllegalArgumentException( "Validation of a null object" );
    }

    GroupChain groupChain = determineGroupExecutionOrder( groups );

    GlobalExecutionContext<T> context = GlobalExecutionContext.getContextForValidate(
        object, messageInterpolator, constraintValidatorFactory, getCachingTraversableResolver()
    );
View Full Code Here

  public <T> Set<ConstraintViolation<T>> validateProperty(T object, String propertyName, Class<?>... groups) {
    if ( object == null ) {
      throw new IllegalArgumentException( "Validated object cannot be null." );
    }
    sanityCheckPropertyPath( propertyName );
    GroupChain groupChain = determineGroupExecutionOrder( groups );

    List<ConstraintViolation<T>> failingConstraintViolations = new ArrayList<ConstraintViolation<T>>();
    validateProperty(
        object, PathImpl.createPathFromString( propertyName ), failingConstraintViolations, groupChain
    );
View Full Code Here

TOP

Related Classes of org.hibernate.validation.engine.groups.GroupChain

Copyright © 2018 www.massapicom. 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.