Package javax.validation

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


            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

            return Arrays.asList(beanValidation.useGroups());
        }

        List<Class> groupClassList = new ArrayList<Class>();

        GroupSequence groupSequence;
        for (Class<?> groupClass : beanValidation.useGroups())
        {
            groupSequence = groupClass.getAnnotation(GroupSequence.class);

            if (groupSequence != null)
            {
                groupClassList.addAll(Arrays.asList(groupSequence.value()));
            }
            else
            {
                groupClassList.add(groupClass);
            }
View Full Code Here

    }
    else {
      processedSequences.add( group );
    }
    List<Group> resolvedGroupSequence = new ArrayList<Group>();
    GroupSequence sequenceAnnotation = group.getAnnotation( GroupSequence.class );
    Class<?>[] sequenceArray = sequenceAnnotation.value();
    for ( Class<?> clazz : sequenceArray ) {
      if ( clazz.getAnnotation( GroupSequence.class ) == null ) {
        resolvedGroupSequence.add( new Group( clazz, group ) );
      }
      else {
View Full Code Here

   * 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

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

   * See HV-113.
   */
  private void initDefaultGroupSequence() {
    List<Class<?>> groupSequence = new ArrayList<Class<?>>();
    GroupSequenceProvider groupSequenceProviderAnnotation = beanClass.getAnnotation( GroupSequenceProvider.class );
    GroupSequence groupSequenceAnnotation = beanClass.getAnnotation( GroupSequence.class );

    if ( groupSequenceAnnotation != null && groupSequenceProviderAnnotation != null ) {
      throw new GroupDefinitionException(
          "GroupSequence and GroupSequenceProvider annotations cannot be used at the same time"
      );
    }

    if ( groupSequenceProviderAnnotation != null ) {
      defaultGroupSequenceProvider = newGroupSequenceProviderInstance( groupSequenceProviderAnnotation.value() );
    }
    else if ( groupSequenceAnnotation != null ) {
      groupSequence.addAll( Arrays.asList( groupSequenceAnnotation.value() ) );
      setDefaultGroupSequence( groupSequence );
    }
    else {
      groupSequence.add( beanClass );
      setDefaultGroupSequence( groupSequence );
View Full Code Here

   * 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

        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

        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

Related Classes of javax.validation.GroupSequence

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.