Package org.hibernate.validator.group

Examples of org.hibernate.validator.group.GroupSequenceProvider


   * Checks whether there is a default group sequence defined for this class.
   * 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 );
    }
View Full Code Here


    GroupSequence groupSequenceAnnotation = beanClass.getAnnotation( GroupSequence.class );
    return groupSequenceAnnotation != null ? Arrays.asList( groupSequenceAnnotation.value() ) : null;
  }

  private <T> DefaultGroupSequenceProvider<? super T> getDefaultGroupSequenceProvider(Class<T> beanClass) {
    GroupSequenceProvider groupSequenceProviderAnnotation = beanClass.getAnnotation( GroupSequenceProvider.class );

    if ( groupSequenceProviderAnnotation != null ) {
      return newGroupSequenceProviderClassInstance( beanClass, groupSequenceProviderAnnotation.value() );
    }

    return null;
  }
View Full Code Here

    GroupSequence groupSequenceAnnotation = beanClass.getAnnotation( GroupSequence.class );
    return groupSequenceAnnotation != null ? Arrays.asList( groupSequenceAnnotation.value() ) : null;
  }

  private <T> DefaultGroupSequenceProvider<? super T> getDefaultGroupSequenceProvider(Class<T> beanClass) {
    GroupSequenceProvider groupSequenceProviderAnnotation = beanClass.getAnnotation( GroupSequenceProvider.class );

    if ( groupSequenceProviderAnnotation != null ) {
      return newGroupSequenceProviderClassInstance( beanClass, groupSequenceProviderAnnotation.value() );
    }

    return null;
  }
View Full Code Here

    GroupSequence groupSequenceAnnotation = beanClass.getAnnotation( GroupSequence.class );
    return groupSequenceAnnotation != null ? Arrays.asList( groupSequenceAnnotation.value() ) : null;
  }

  private <T> DefaultGroupSequenceProvider<? super T> getDefaultGroupSequenceProvider(Class<T> beanClass) {
    GroupSequenceProvider groupSequenceProviderAnnotation = beanClass.getAnnotation( GroupSequenceProvider.class );

    if ( groupSequenceProviderAnnotation != null ) {
      return newGroupSequenceProviderClassInstance( beanClass, groupSequenceProviderAnnotation.value() );
    }

    return null;
  }
View Full Code Here

    return groupSequenceAnnotation != null ? Arrays.asList( groupSequenceAnnotation.value() ) : null;
  }

  private Class<? extends DefaultGroupSequenceProvider<?>> getDefaultGroupSequenceProviderClass(Class<?> beanClass) {

    GroupSequenceProvider groupSequenceProviderAnnotation = beanClass.getAnnotation( GroupSequenceProvider.class );
    return groupSequenceProviderAnnotation != null ? groupSequenceProviderAnnotation.value() : null;
  }
View Full Code Here

    GroupSequence groupSequenceAnnotation = beanClass.getAnnotation( GroupSequence.class );
    return groupSequenceAnnotation != null ? Arrays.asList( groupSequenceAnnotation.value() ) : null;
  }

  private <T> DefaultGroupSequenceProvider<? super T> getDefaultGroupSequenceProvider(Class<T> beanClass) {
    GroupSequenceProvider groupSequenceProviderAnnotation = beanClass.getAnnotation( GroupSequenceProvider.class );

    if ( groupSequenceProviderAnnotation != null ) {
      return newGroupSequenceProviderClassInstance( beanClass, groupSequenceProviderAnnotation.value() );
    }

    return null;
  }
View Full Code Here

    GroupSequence groupSequenceAnnotation = beanClass.getAnnotation( GroupSequence.class );
    return groupSequenceAnnotation != null ? Arrays.asList( groupSequenceAnnotation.value() ) : null;
  }

  private <T> DefaultGroupSequenceProvider<? super T> getDefaultGroupSequenceProvider(Class<T> beanClass) {
    GroupSequenceProvider groupSequenceProviderAnnotation = beanClass.getAnnotation( GroupSequenceProvider.class );

    if ( groupSequenceProviderAnnotation != null ) {
      @SuppressWarnings("unchecked")
      Class<? extends DefaultGroupSequenceProvider<? super T>> providerClass = (Class<? extends DefaultGroupSequenceProvider<? super T>>) groupSequenceProviderAnnotation
          .value();
      return newGroupSequenceProviderClassInstance( beanClass, providerClass );
    }

    return null;
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<?>>();
    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 );
    }
View Full Code Here

    GroupSequence groupSequenceAnnotation = beanClass.getAnnotation( GroupSequence.class );
    return groupSequenceAnnotation != null ? Arrays.asList( groupSequenceAnnotation.value() ) : null;
  }

  private <T> DefaultGroupSequenceProvider<? super T> getDefaultGroupSequenceProvider(Class<T> beanClass) {
    GroupSequenceProvider groupSequenceProviderAnnotation = beanClass.getAnnotation( GroupSequenceProvider.class );

    if ( groupSequenceProviderAnnotation != null ) {
      @SuppressWarnings("unchecked")
      Class<? extends DefaultGroupSequenceProvider<? super T>> providerClass =
          (Class<? extends DefaultGroupSequenceProvider<? super T>>) groupSequenceProviderAnnotation.value();
      return newGroupSequenceProviderClassInstance( beanClass, providerClass );
    }

    return null;
  }
View Full Code Here

    GroupSequence groupSequenceAnnotation = beanClass.getAnnotation( GroupSequence.class );
    return groupSequenceAnnotation != null ? Arrays.asList( groupSequenceAnnotation.value() ) : null;
  }

  private <T> DefaultGroupSequenceProvider<? super T> getDefaultGroupSequenceProvider(Class<T> beanClass) {
    GroupSequenceProvider groupSequenceProviderAnnotation = beanClass.getAnnotation( GroupSequenceProvider.class );

    if ( groupSequenceProviderAnnotation != null ) {
      @SuppressWarnings("unchecked")
      Class<? extends DefaultGroupSequenceProvider<? super T>> providerClass =
          (Class<? extends DefaultGroupSequenceProvider<? super T>>) groupSequenceProviderAnnotation.value();
      return newGroupSequenceProviderClassInstance( beanClass, providerClass );
    }

    return null;
  }
View Full Code Here

TOP

Related Classes of org.hibernate.validator.group.GroupSequenceProvider

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.