Package org.hibernate.validator.internal.engine.groups

Examples of org.hibernate.validator.internal.engine.groups.Group


    // process first single groups. For these we can optimise object traversal by first running all validations on the current bean
    // before traversing the object.
    Iterator<Group> groupIterator = validationOrder.getGroupIterator();
    while ( groupIterator.hasNext() ) {
      Group group = groupIterator.next();
      valueContext.setCurrentGroup( group.getDefiningClass() );
      validateConstraintsForCurrentGroup( context, valueContext );
      if ( shouldFailFast( context ) ) {
        return context.getFailingConstraints();
      }
    }
    groupIterator = validationOrder.getGroupIterator();
    while ( groupIterator.hasNext() ) {
      Group group = groupIterator.next();
      valueContext.setCurrentGroup( group.getDefiningClass() );
      validateCascadedConstraints( context, valueContext );
      if ( shouldFailFast( context ) ) {
        return context.getFailingConstraints();
      }
    }

    // now we process sequences. For sequences I have to traverse the object graph since I have to stop processing when an error occurs.
    Iterator<Sequence> sequenceIterator = validationOrder.getSequenceIterator();
    while ( sequenceIterator.hasNext() ) {
      Sequence sequence = sequenceIterator.next();
      for ( Group group : sequence.getComposingGroups() ) {
        int numberOfViolations = context.getFailingConstraints().size();
        valueContext.setCurrentGroup( group.getDefiningClass() );

        validateConstraintsForCurrentGroup( context, valueContext );
        if ( shouldFailFast( context ) ) {
          return context.getFailingConstraints();
        }
View Full Code Here


    }

    // process first single groups
    Iterator<Group> groupIterator = validationOrder.getGroupIterator();
    while ( groupIterator.hasNext() ) {
      Group group = groupIterator.next();
      valueContext.setCurrentGroup( group.getDefiningClass() );
      validatePropertyForCurrentGroup( valueContext, context, metaConstraints );
      if ( shouldFailFast( context ) ) {
        return context.getFailingConstraints();
      }
    }

    // now process sequences, stop after the first erroneous group
    Iterator<Sequence> sequenceIterator = validationOrder.getSequenceIterator();
    while ( sequenceIterator.hasNext() ) {
      Sequence sequence = sequenceIterator.next();
      for ( Group group : sequence.getComposingGroups() ) {
        valueContext.setCurrentGroup( group.getDefiningClass() );
        int numberOfConstraintViolations = validatePropertyForCurrentGroup(
            valueContext, context, metaConstraints
        );
        if ( shouldFailFast( context ) ) {
          return context.getFailingConstraints();
View Full Code Here

    }

    // process first single groups
    Iterator<Group> groupIterator = validationOrder.getGroupIterator();
    while ( groupIterator.hasNext() ) {
      Group group = groupIterator.next();
      valueContext.setCurrentGroup( group.getDefiningClass() );
      validatePropertyForCurrentGroup( valueContext, context, metaConstraints );
      if ( shouldFailFast( context ) ) {
        return context.getFailingConstraints();
      }
    }

    // now process sequences, stop after the first erroneous group
    Iterator<Sequence> sequenceIterator = validationOrder.getSequenceIterator();
    while ( sequenceIterator.hasNext() ) {
      Sequence sequence = sequenceIterator.next();
      for ( Group group : sequence.getComposingGroups() ) {
        valueContext.setCurrentGroup( group.getDefiningClass() );
        int numberOfConstraintViolations = validatePropertyForCurrentGroup(
            valueContext, context, metaConstraints
        );
        if ( shouldFailFast( context ) ) {
          return context.getFailingConstraints();
View Full Code Here

        PathImpl.createPathForExecutable( executableMetaData )
    );

    groupIterator = validationOrder.getGroupIterator();
    while ( groupIterator.hasNext() ) {
      Group group = groupIterator.next();
      cascadingValueContext.setCurrentGroup( group.getDefiningClass() );
      validateCascadedConstraints( validationContext, cascadingValueContext );
      if ( shouldFailFast( validationContext ) ) {
        return;
      }
    }

    // now process sequences, stop after the first erroneous group
    Iterator<Sequence> sequenceIterator = validationOrder.getSequenceIterator();
    while ( sequenceIterator.hasNext() ) {
      Sequence sequence = sequenceIterator.next();
      for ( Group group : sequence.getComposingGroups() ) {
        int numberOfFailingConstraint = validateParametersForGroup(
            validationContext, object, parameterValues, group
        );
        if ( shouldFailFast( validationContext ) ) {
          return;
        }

        cascadingValueContext.setCurrentGroup( group.getDefiningClass() );
        validateCascadedConstraints( validationContext, cascadingValueContext );

        if ( shouldFailFast( validationContext ) ) {
          return;
        }
View Full Code Here

          PathImpl.createPathForExecutable( executableMetaData )
      );

      groupIterator = validationOrder.getGroupIterator();
      while ( groupIterator.hasNext() ) {
        Group group = groupIterator.next();
        cascadingValueContext.setCurrentGroup( group.getDefiningClass() );
        validateCascadedConstraints( context, cascadingValueContext );
        if ( shouldFailFast( context ) ) {
          return;
        }
      }
    }

    // now process sequences, stop after the first erroneous group
    Iterator<Sequence> sequenceIterator = validationOrder.getSequenceIterator();
    while ( sequenceIterator.hasNext() ) {
      Sequence sequence = sequenceIterator.next();
      for ( Group group : sequence.getComposingGroups() ) {
        int numberOfFailingConstraint = validateReturnValueForGroup(
            context, bean, value, group
        );
        if ( shouldFailFast( context ) ) {
          return;
        }

        if ( value != null ) {
          cascadingValueContext.setCurrentGroup( group.getDefiningClass() );
          validateCascadedConstraints( context, cascadingValueContext );

          if ( shouldFailFast( context ) ) {
            return;
          }
View Full Code Here

    // process first single groups. For these we can optimise object traversal by first running all validations on the current bean
    // before traversing the object.
    Iterator<Group> groupIterator = validationOrder.getGroupIterator();
    while ( groupIterator.hasNext() ) {
      Group group = groupIterator.next();
      valueContext.setCurrentGroup( group.getDefiningClass() );
      validateConstraintsForCurrentGroup( context, valueContext );
      if ( shouldFailFast( context ) ) {
        return context.getFailingConstraints();
      }
    }
    groupIterator = validationOrder.getGroupIterator();
    while ( groupIterator.hasNext() ) {
      Group group = groupIterator.next();
      valueContext.setCurrentGroup( group.getDefiningClass() );
      validateCascadedConstraints( context, valueContext );
      if ( shouldFailFast( context ) ) {
        return context.getFailingConstraints();
      }
    }

    // now we process sequences. For sequences I have to traverse the object graph since I have to stop processing when an error occurs.
    Iterator<Sequence> sequenceIterator = validationOrder.getSequenceIterator();
    while ( sequenceIterator.hasNext() ) {
      Sequence sequence = sequenceIterator.next();
      for ( Group group : sequence.getComposingGroups() ) {
        int numberOfViolations = context.getFailingConstraints().size();
        valueContext.setCurrentGroup( group.getDefiningClass() );

        validateConstraintsForCurrentGroup( context, valueContext );
        if ( shouldFailFast( context ) ) {
          return context.getFailingConstraints();
        }
View Full Code Here

    }

    // process first single groups
    Iterator<Group> groupIterator = validationOrder.getGroupIterator();
    while ( groupIterator.hasNext() ) {
      Group group = groupIterator.next();
      valueContext.setCurrentGroup( group.getDefiningClass() );
      validatePropertyForCurrentGroup( valueContext, context, metaConstraints );
      if ( shouldFailFast( context ) ) {
        return context.getFailingConstraints();
      }
    }

    // now process sequences, stop after the first erroneous group
    Iterator<Sequence> sequenceIterator = validationOrder.getSequenceIterator();
    while ( sequenceIterator.hasNext() ) {
      Sequence sequence = sequenceIterator.next();
      for ( Group group : sequence.getComposingGroups() ) {
        valueContext.setCurrentGroup( group.getDefiningClass() );
        int numberOfConstraintViolations = validatePropertyForCurrentGroup(
            valueContext, context, metaConstraints
        );
        if ( shouldFailFast( context ) ) {
          return context.getFailingConstraints();
View Full Code Here

    }

    // process first single groups
    Iterator<Group> groupIterator = validationOrder.getGroupIterator();
    while ( groupIterator.hasNext() ) {
      Group group = groupIterator.next();
      valueContext.setCurrentGroup( group.getDefiningClass() );
      validatePropertyForCurrentGroup( valueContext, context, metaConstraints );
      if ( shouldFailFast( context ) ) {
        return context.getFailingConstraints();
      }
    }

    // now process sequences, stop after the first erroneous group
    Iterator<Sequence> sequenceIterator = validationOrder.getSequenceIterator();
    while ( sequenceIterator.hasNext() ) {
      Sequence sequence = sequenceIterator.next();
      for ( Group group : sequence.getComposingGroups() ) {
        valueContext.setCurrentGroup( group.getDefiningClass() );
        int numberOfConstraintViolations = validatePropertyForCurrentGroup(
            valueContext, context, metaConstraints
        );
        if ( shouldFailFast( context ) ) {
          return context.getFailingConstraints();
View Full Code Here

    // process first single groups. For these we can optimise object traversal by first running all validations on the current bean
    // before traversing the object.
    Iterator<Group> groupIterator = groupChain.getGroupIterator();
    while ( groupIterator.hasNext() ) {
      Group group = groupIterator.next();
      valueContext.setCurrentGroup( group.getGroup() );
      validateConstraintsForCurrentGroup( context, valueContext );
      if ( shouldFailFast( context ) ) {
        return context.getFailingConstraints();
      }
    }
    groupIterator = groupChain.getGroupIterator();
    while ( groupIterator.hasNext() ) {
      Group group = groupIterator.next();
      valueContext.setCurrentGroup( group.getGroup() );
      validateCascadedConstraints( context, valueContext );
      if ( shouldFailFast( context ) ) {
        return context.getFailingConstraints();
      }
    }

    // now we process sequences. For sequences I have to traverse the object graph since I have to stop processing when an error occurs.
    Iterator<List<Group>> sequenceIterator = groupChain.getSequenceIterator();
    while ( sequenceIterator.hasNext() ) {
      List<Group> sequence = sequenceIterator.next();
      for ( Group group : sequence ) {
        int numberOfViolations = context.getFailingConstraints().size();
        valueContext.setCurrentGroup( group.getGroup() );

        validateConstraintsForCurrentGroup( context, valueContext );
        if ( shouldFailFast( context ) ) {
          return context.getFailingConstraints();
        }
View Full Code Here

    }

    // process first single groups
    Iterator<Group> groupIterator = groupChain.getGroupIterator();
    while ( groupIterator.hasNext() ) {
      Group group = groupIterator.next();
      valueContext.setCurrentGroup( group.getGroup() );
      validatePropertyForCurrentGroup( valueContext, context, metaConstraints );
      if ( shouldFailFast( context ) ) {
        return context.getFailingConstraints();
      }
    }

    // now process sequences, stop after the first erroneous group
    Iterator<List<Group>> sequenceIterator = groupChain.getSequenceIterator();
    while ( sequenceIterator.hasNext() ) {
      List<Group> sequence = sequenceIterator.next();
      for ( Group group : sequence ) {
        valueContext.setCurrentGroup( group.getGroup() );
        int numberOfConstraintViolations = validatePropertyForCurrentGroup(
            valueContext, context, metaConstraints
        );
        if ( shouldFailFast( context ) ) {
          return context.getFailingConstraints();
View Full Code Here

TOP

Related Classes of org.hibernate.validator.internal.engine.groups.Group

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.