Examples of GroupSequence


Examples of javax.validation.GroupSequence

            }
        }

        Groups chain = new Groups();
        for (Class<?> clazz : groups) {
            GroupSequence anno = clazz.getAnnotation(GroupSequence.class);
            if (anno == null) {
                Group group = new Group(clazz);
                chain.insertGroup(group);
                insertInheritedGroups(clazz, chain);
            } else {
View Full Code Here

Examples of javax.validation.GroupSequence

            processedSequences.add(group);
        }
        List<Group> resolvedGroupSequence = new LinkedList<Group>();
        Class<?>[] sequenceArray = sequenceAnnotation.value();
        for (Class<?> clazz : sequenceArray) {
            GroupSequence anno = clazz.getAnnotation(GroupSequence.class);
            if (anno == null) {
                resolvedGroupSequence.add(new Group(clazz)); // group part of sequence
            } else {
                List<Group> tmpSequence =
                      resolveSequence(clazz, anno, processedSequences)// recursion!
View Full Code Here

Examples of javax.validation.GroupSequence

        getDefaultGroupSequenceProvider( beanClass )
    );
  }

  private List<Class<?>> getDefaultGroupSequence(Class<?> beanClass) {
    GroupSequence groupSequenceAnnotation = beanClass.getAnnotation( GroupSequence.class );
    return groupSequenceAnnotation != null ? Arrays.asList( groupSequenceAnnotation.value() ) : null;
  }
View Full Code Here

Examples of javax.validation.GroupSequence

   * Checks whether there is a default group sequence defined for this class.
   * See HV-113.
   */
  private void initDefaultGroupSequence() {
    List<Class<?>> groupSequence = new ArrayList<Class<?>>();
    GroupSequence groupSequenceAnnotation = beanClass.getAnnotation( GroupSequence.class );
    if ( groupSequenceAnnotation == null ) {
      groupSequence.add( beanClass );
    }
    else {
      groupSequence.addAll( Arrays.asList( groupSequenceAnnotation.value() ) );
    }

    setDefaultGroupSequence( groupSequence );
  }
View Full Code Here

Examples of javax.validation.GroupSequence

      //add properties
      this.properties.add(prop);
    }
   
    //set group sequence from metadata
    GroupSequence sequence = targetClass.getAnnotation(GroupSequence.class);
    if(sequence != null) {
      this.groupSequence = sequence.value();
      if(this.groupSequence == null) {
        this.groupSequence = new Class<?>[0];
      }
    }
  }
View Full Code Here

Examples of javax.validation.GroupSequence

    sw.indent();

    // <<bean class>>, <<default group seq class 1>>, <<default group seq class 2>>, ...
    Class<?> beanClazz = beanHelper.getClazz();
    sw.print(asLiteral(beanClazz));
    GroupSequence groupSeqAnnotation = beanClazz.getAnnotation(GroupSequence.class);
    List<Class<?>> groupSequence = new ArrayList<Class<?>>();
    if (groupSeqAnnotation == null) {
      groupSequence.add(beanClazz);
    } else {
      groupSequence.addAll(Arrays.asList(groupSeqAnnotation.value()));
    }
    boolean groupSequenceContainsDefault = false;
    for (Class<?> group : groupSequence) {
      sw.println(",");
      if (group.getName().equals(beanClazz.getName())) {
View Full Code Here

Examples of javax.validation.GroupSequence

        getDefaultGroupSequenceProvider( beanClass )
    );
  }

  private List<Class<?>> getDefaultGroupSequence(Class<?> beanClass) {
    GroupSequence groupSequenceAnnotation = beanClass.getAnnotation( GroupSequence.class );
    return groupSequenceAnnotation != null ? Arrays.asList( groupSequenceAnnotation.value() ) : null;
  }
View Full Code Here

Examples of javax.validation.GroupSequence

    }
    else {
      processedSequences.add( sequenceClass );
    }
    List<Group> resolvedSequenceGroups = new ArrayList<Group>();
    GroupSequence sequenceAnnotation = sequenceClass.getAnnotation( GroupSequence.class );
    Class<?>[] sequenceArray = sequenceAnnotation.value();
    for ( Class<?> clazz : sequenceArray ) {
      if ( isGroupSequence( clazz ) ) {
        Sequence tmpSequence = resolveSequence( clazz, processedSequences );
        addGroups( resolvedSequenceGroups, tmpSequence.getComposingGroups() );
      }
View Full Code Here

Examples of javax.validation.GroupSequence

    }
    else {
      processedSequences.add( sequenceClass );
    }
    List<Group> resolvedSequenceGroups = new ArrayList<Group>();
    GroupSequence sequenceAnnotation = sequenceClass.getAnnotation( GroupSequence.class );
    Class<?>[] sequenceArray = sequenceAnnotation.value();
    for ( Class<?> clazz : sequenceArray ) {
      if ( isGroupSequence( clazz ) ) {
        Sequence tmpSequence = resolveSequence( clazz, processedSequences );
        addGroups( resolvedSequenceGroups, tmpSequence.getComposingGroups() );
      }
View Full Code Here

Examples of javax.validation.GroupSequence

        getDefaultGroupSequenceProvider( beanClass )
    );
  }

  private List<Class<?>> getDefaultGroupSequence(Class<?> beanClass) {
    GroupSequence groupSequenceAnnotation = beanClass.getAnnotation( GroupSequence.class );
    return groupSequenceAnnotation != null ? Arrays.asList( groupSequenceAnnotation.value() ) : null;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.