org.hibernate.validator.internal.engine.groups
Class DefaultGroupSequenceProviderAdapter<T>

java.lang.Object
  extended by org.hibernate.validator.internal.engine.groups.DefaultGroupSequenceProviderAdapter<T>
All Implemented Interfaces:
DefaultGroupSequenceProvider<T>

public class DefaultGroupSequenceProviderAdapter<T>
extends Object
implements DefaultGroupSequenceProvider<T>

Adapts a DefaultGroupSequenceProvider to a DefaultGroupSequenceProvider.

Author:
Gunnar Morling

Method Summary
static
<T> DefaultGroupSequenceProviderAdapter<T>
getInstance(DefaultGroupSequenceProvider<T> adaptee)
           
 List<Class<?>> getValidationGroups(T object)
          This method returns the default group sequence for the given instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static <T> DefaultGroupSequenceProviderAdapter<T> getInstance(DefaultGroupSequenceProvider<T> adaptee)

getValidationGroups

public List<Class<?>> getValidationGroups(T object)
Description copied from interface: DefaultGroupSequenceProvider
This method returns the default group sequence for the given instance.

The object parameter allows to dynamically compose the default group sequence in function of the validated value state.

Specified by:
getValidationGroups in interface DefaultGroupSequenceProvider<T>
Parameters:
object - the instance being validated. This value can be null in case this method was called as part of Validator#validateValue.
Returns:
a list of classes specifying the default group sequence. The same constraints to the redefined group list apply as for lists defined via GroupSequence. In particular the list has to contain the type T.


Copyright © 2012 Oracle Corporation. All Rights Reserved.