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

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


    java.lang.Object asObject = context.unwrap( java.lang.Object.class );
    assertSame( asObject, context );
  }

  private ConstraintValidatorContextImpl createEmptyConstraintValidatorContextImpl() {
    PathImpl path = PathImpl.createRootPath();
    path.addBeanNode();

    ConstraintValidatorContextImpl context = new ConstraintValidatorContextImpl(
        null, path, null
    );
    context.disableDefaultConstraintViolation();
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

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

    for ( Cascadable cascadable : validatable.getCascadables() ) {
      valueContext.appendNode( cascadable );
      Class<?> group = 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();

        ParameterMetaData parameterMetaData = executableMetaData.getParameterMetaData( i );
        Object value = parameterValues[i];

        if ( value != null ) {
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, false, metaConstraint );
      if ( shouldFailFast( validationContext ) ) {
        return;
      }
View Full Code Here

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

    for ( Cascadable cascadable : validatable.getCascadables() ) {
      valueContext.appendNode( cascadable );
      Class<?> group = 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();

        ParameterMetaData parameterMetaData = executableMetaData.getParameterMetaData( i );
        Object value = parameterValues[i];

        if ( value != null ) {
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

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.