Package org.hibernate.validator.internal.engine.path

Examples of org.hibernate.validator.internal.engine.path.PathImpl


      // if the current class redefined the default group sequence, this sequence has to be applied to all the class hierarchy.
      if ( defaultGroupSequenceIsRedefined ) {
        metaConstraints = hostingBeanMetaData.getMetaConstraints();
      }

      PathImpl currentPath = valueContext.getPropertyPath();
      for ( Class<?> defaultSequenceMember : defaultGroupSequence ) {
        valueContext.setCurrentGroup( defaultSequenceMember );
        boolean validationSuccessful = true;
        for ( MetaConstraint<?> metaConstraint : metaConstraints ) {
          // HV-466, an interface implemented more than one time in the hierarchy has to be validated only one
View Full Code Here


    }
  }

  private <T, U, V> void validateConstraintsForNonDefaultGroup(ValidationContext<T> validationContext, ValueContext<U, V> valueContext) {
    BeanMetaData<U> beanMetaData = beanMetaDataManager.getBeanMetaData( valueContext.getCurrentBeanType() );
    PathImpl currentPath = valueContext.getPropertyPath();
    for ( MetaConstraint<?> metaConstraint : beanMetaData.getMetaConstraints() ) {
      validateConstraint( validationContext, valueContext, metaConstraint );
      if ( shouldFailFast( validationContext ) ) {
        return;
      }
View Full Code Here

   * @param validationContext The execution context
   * @param valueContext Collected information for single validation
   */
  private <T, U, V> void validateCascadedConstraints(ValidationContext<T> validationContext, ValueContext<U, V> valueContext) {
    Validatable validatable = valueContext.getCurrentValidatable();
    PathImpl originalPath = valueContext.getPropertyPath();
    Class<?> originalGroup = valueContext.getCurrentGroup();

    for ( Cascadable cascadable : validatable.getCascadables() ) {
      valueContext.appendNode( cascadable );
      valueContext.setCurrentGroup( cascadable.convertGroup( originalGroup ) );
View Full Code Here

      );
      valueContext.setCurrentValidatedValue( parameterValues );

      // 2. validate parameter constraints
      for ( int i = 0; i < parameterValues.length; i++ ) {
        PathImpl originalPath = valueContext.getPropertyPath();
        Object value = parameterValues[i];

        valueContext.appendNode( executableMetaData.getParameterMetaData( i ) );
        valueContext.setCurrentValidatedValue( value );
View Full Code Here

      // if the current class redefined the default group sequence, this sequence has to be applied to all the class hierarchy.
      if ( defaultGroupSequenceIsRedefined ) {
        metaConstraints = hostingBeanMetaData.getMetaConstraints();
      }

      PathImpl currentPath = valueContext.getPropertyPath();
      for ( Class<?> defaultSequenceMember : defaultGroupSequence ) {
        valueContext.setCurrentGroup( defaultSequenceMember );
        boolean validationSuccessful = true;
        for ( MetaConstraint<?> metaConstraint : metaConstraints ) {
          // HV-466, an interface implemented more than one time in the hierarchy has to be validated only one
View Full Code Here

    }
  }

  private <T, U, V> void validateConstraintsForNonDefaultGroup(ValidationContext<T, ?> validationContext, ValueContext<U, V> valueContext) {
    BeanMetaData<U> beanMetaData = beanMetaDataManager.getBeanMetaData( valueContext.getCurrentBeanType() );
    PathImpl currentPath = valueContext.getPropertyPath();
    for ( MetaConstraint<?> metaConstraint : beanMetaData.getMetaConstraints() ) {
      validateConstraint( validationContext, valueContext, metaConstraint );
      if ( shouldFailFast( validationContext ) ) {
        return;
      }
View Full Code Here

   * @param validationContext The execution context
   * @param valueContext Collected information for single validation
   */
  private <T, U, V> void validateCascadedConstraints(ValidationContext<T, ?> validationContext, ValueContext<U, V> valueContext) {
    Validatable validatable = valueContext.getCurrentValidatable();
    PathImpl originalPath = valueContext.getPropertyPath();
    Class<?> originalGroup = valueContext.getCurrentGroup();

    for ( Cascadable cascadable : validatable.getCascadables() ) {
      valueContext.appendNode( cascadable );
      valueContext.setCurrentGroup( cascadable.convertGroup( originalGroup ) );
View Full Code Here

        return validationContext.getFailingConstraints().size() - numberOfViolationsBefore;
      }

      // 2. validate parameter constraints
      for ( int i = 0; i < parameterValues.length; i++ ) {
        PathImpl originalPath = valueContext.getPropertyPath();
        Object value = parameterValues[i];

        valueContext.appendNode( executableMetaData.getParameterMetaData( i ) );
        valueContext.setCurrentValidatedValue( value );
View Full Code Here

      // if the current class redefined the default group sequence, this sequence has to be applied to all the class hierarchy.
      if ( defaultGroupSequenceIsRedefined ) {
        metaConstraints = hostingBeanMetaData.getMetaConstraints();
      }

      PathImpl currentPath = valueContext.getPropertyPath();
      for ( Class<?> defaultSequenceMember : defaultGroupSequence ) {
        valueContext.setCurrentGroup( defaultSequenceMember );
        boolean validationSuccessful = true;
        for ( MetaConstraint<?> metaConstraint : metaConstraints ) {
          // HV-466, an interface implemented more than one time in the hierarchy has to be validated only one
View Full Code Here

    }
  }

  private void validateConstraintsForNonDefaultGroup(ValidationContext<?> validationContext, ValueContext<?, Object> valueContext) {
    BeanMetaData<?> beanMetaData = beanMetaDataManager.getBeanMetaData( valueContext.getCurrentBeanType() );
    PathImpl currentPath = valueContext.getPropertyPath();
    for ( MetaConstraint<?> metaConstraint : beanMetaData.getMetaConstraints() ) {
      validateConstraint( validationContext, valueContext, metaConstraint );
      if ( shouldFailFast( validationContext ) ) {
        return;
      }
View Full Code Here

TOP

Related Classes of org.hibernate.validator.internal.engine.path.PathImpl

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.