Package org.hibernate.validator.valuehandling

Examples of org.hibernate.validator.valuehandling.UnwrapValidatedValue


        field.getAnnotation( ConvertGroup.class ),
        field.getAnnotation( ConvertGroup.List.class )
    );

    boolean isCascading = field.isAnnotationPresent( Valid.class );
    UnwrapValidatedValue unwrapValidatedValue = field.getAnnotation( UnwrapValidatedValue.class );
    UnwrapMode unwrapMode = UnwrapMode.AUTOMATIC;
    if ( unwrapValidatedValue != null ) {
      unwrapMode = unwrapValidatedValue.value() ? UnwrapMode.UNWRAP : UnwrapMode.SKIP_UNWRAP;
    }

    Set<MetaConstraint<?>> typeArgumentsConstraints = findTypeAnnotationConstraintsForMember( field );
    if ( !typeArgumentsConstraints.isEmpty() && !ReflectionHelper.isIterable( ReflectionHelper.typeOf( field ) ) ) {
      unwrapMode = UnwrapMode.UNWRAP;
View Full Code Here


      typeArgumentsConstraints = Collections.<MetaConstraint<?>>emptySet();
      groupConversions = Collections.emptyMap();
      isCascading = false;
    }
    else {
      UnwrapValidatedValue unwrapValidatedValue = executable.getAccessibleObject().getAnnotation(
          UnwrapValidatedValue.class
      );
      if ( unwrapValidatedValue != null ) {
        unwrapMode = unwrapValidatedValue.value() ? UnwrapMode.UNWRAP : UnwrapMode.SKIP_UNWRAP;
      }

      typeArgumentsConstraints = findTypeAnnotationConstraintsForMember( executable.getMember() );
      if ( !typeArgumentsConstraints.isEmpty() && !ReflectionHelper.isIterable(
          ReflectionHelper.typeOf(
View Full Code Here

          groupConversionList = (ConvertGroup.List) parameterAnnotation;
        }

        //3. unwrapping required?
        else if ( parameterAnnotation.annotationType().equals( UnwrapValidatedValue.class ) ) {
          UnwrapValidatedValue unwrapValidatedValue = (UnwrapValidatedValue) parameterAnnotation;
          unwrapMode = unwrapValidatedValue.value() ? UnwrapMode.UNWRAP : UnwrapMode.SKIP_UNWRAP;
        }

        //4. collect constraints if this annotation is a constraint annotation
        List<ConstraintDescriptorImpl<?>> constraints = findConstraintAnnotations(
            executable.getMember(), parameterAnnotation, ElementType.PARAMETER
View Full Code Here

TOP

Related Classes of org.hibernate.validator.valuehandling.UnwrapValidatedValue

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.