Package org.hibernate.validator.internal.metadata.raw

Examples of org.hibernate.validator.internal.metadata.raw.ConstrainedField


      this.beanClass = beanClass;
      this.constraintHelper = constraintHelper;

      switch ( constrainedElement.getKind() ) {
        case FIELD:
          ConstrainedField constrainedField = (ConstrainedField) constrainedElement;
          propertyBuilder = new PropertyMetaData.Builder(
              beanClass,
              constrainedField,
              constraintHelper
          );
View Full Code Here


    );

    boolean isCascading = field.isAnnotationPresent( Valid.class );
    boolean requiresUnwrapping = field.isAnnotationPresent( UnwrapValidatedValue.class );

    return new ConstrainedField(
        ConfigurationSource.ANNOTATION,
        ConstraintLocation.forProperty( field ),
        constraints,
        groupConversions,
        isCascading,
View Full Code Here

    return typeContext.method( name, parameterTypes );
  }

  ConstrainedElement build(ConstraintHelper constraintHelper) {
    if ( member instanceof Field ) {
      return new ConstrainedField(
          ConfigurationSource.API,
          ConstraintLocation.forProperty( member ),
          getConstraints( constraintHelper ),
          groupConversions,
          isCascading,
View Full Code Here

      Map<Class<?>, Class<?>> groupConversions = GroupConversionBuilder.buildGroupConversionMap(
          fieldType.getConvertGroup(),
          defaultPackage
      );

      ConstrainedField constrainedField = new ConstrainedField(
          ConfigurationSource.XML,
          constraintLocation,
          metaConstraints,
          groupConversions,
          fieldType.getValid() != null,
View Full Code Here

          fieldType.getConvertGroup(),
          defaultPackage
      );

      // TODO HV-919 Support specification of type parameter constraints via XML and API
      ConstrainedField constrainedField = new ConstrainedField(
          ConfigurationSource.XML,
          constraintLocation,
          metaConstraints,
          Collections.<MetaConstraint<?>>emptySet(),
          groupConversions,
View Full Code Here

  }

  ConstrainedElement build(ConstraintHelper constraintHelper) {
    // TODO HV-919 Support specification of type parameter constraints via XML and API
    if ( member instanceof Field ) {
      return new ConstrainedField(
          ConfigurationSource.API,
          ConstraintLocation.forProperty( member ),
          getConstraints( constraintHelper ),
          Collections.<MetaConstraint<?>>emptySet(),
          groupConversions,
View Full Code Here

    Set<ConstrainedElement> allPropertyMetaData = newHashSet();
    for ( BeanConstraintLocation oneConfiguredProperty : allConfiguredProperties ) {
      if ( oneConfiguredProperty.getElementType() == ElementType.FIELD ) {
        allPropertyMetaData.add(
            new ConstrainedField(
                ConfigurationSource.API,
                oneConfiguredProperty,
                asMetaConstraints( constraintsByLocation.get( oneConfiguredProperty ) ),
                cascades.contains( oneConfiguredProperty )
            )
View Full Code Here

    public BuilderDelegate(ConstrainedElement constrainedElement, ConstraintHelper constraintHelper) {
      this.constraintHelper = constraintHelper;

      switch ( constrainedElement.getKind() ) {
        case FIELD:
          ConstrainedField constrainedField = (ConstrainedField) constrainedElement;
          propertyBuilder = new PropertyMetaData.Builder(
              constrainedField,
              constraintHelper
          );
          break;
View Full Code Here

      this.constraintHelper = constraintHelper;
      this.executableHelper = executableHelper;

      switch ( constrainedElement.getKind() ) {
        case FIELD:
          ConstrainedField constrainedField = (ConstrainedField) constrainedElement;
          propertyBuilder = new PropertyMetaData.Builder(
              beanClass,
              constrainedField,
              constraintHelper
          );
View Full Code Here

  public void testFieldTypeArgument() throws Exception {
    List<BeanConfiguration<? super A>> beanConfigurations = provider.getBeanConfigurationForHierarchy(
        A.class
    );

    ConstrainedField field = findConstrainedField( beanConfigurations, A.class, "names" );
    assertThat( field.getTypeArgumentsConstraints() ).hasSize( 2 );
    assertThat( getAnnotationsTypes( field.getTypeArgumentsConstraints() ) ).contains(
        NotNullTypeUse.class, NotBlankTypeUse.class
    );
  }
View Full Code Here

TOP

Related Classes of org.hibernate.validator.internal.metadata.raw.ConstrainedField

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.