Top Description Methods
org.hibernate.validator.spi.group

public Interface DefaultGroupSequenceProvider<T>

Type Parameters
<T>
The type for which an implementation is defined.
Imports
java.util.List

This class defines the dynamic group sequence provider contract.

In order to redefine dynamically the default group sequence for a type T, the org.hibernate.validator.group.GroupSequenceProvider annotation must be placed on T, specifying as its value a concrete implementation of DefaultGroupSequenceProvider, which must be parametrized with the type T.

If during the validation process the Default group is validated for T, the actual validated instance is passed to the DefaultGroupSequenceProvider to determine the default group sequence.

Note:

Authors
Kevin Pollet <[email protected]> (C) 2011 SERLI, Hardy Ferentschik

Method Summary

Modifier and TypeMethod and Description
public List<Class<?>>

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.
getValidationGroups
(T
the instance being validated. This value can be null in case this method was called as part of Validator#validateValue.
object
)

This method returns the default group sequence for the given instance.

Method Detail

getValidationGroupsback to summary
public List<Class<?>> getValidationGroups(T object)

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.

Parameters
object:T

the instance being validated. This value can be null in case this method was called as part of Validator#validateValue.

Returns:List<Class<?>>

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.