org.hibernate.validator.cfg.context.impl
Class TypeConstraintMappingContextImpl<C>

java.lang.Object
  extended by org.hibernate.validator.cfg.context.impl.ConstraintMappingContextImplBase
      extended by org.hibernate.validator.cfg.context.impl.TypeConstraintMappingContextImpl<C>
Type Parameters:
C - The type represented by this creational context.
All Implemented Interfaces:
Constrainable<TypeConstraintMappingContext<C>>, MethodTarget, PropertyTarget, TypeConstraintMappingContext<C>, TypeTarget

public final class TypeConstraintMappingContextImpl<C>
extends ConstraintMappingContextImplBase
implements TypeConstraintMappingContext<C>

Constraint mapping creational context which allows to configure the class-level constraints for one bean.

Author:
Hardy Ferentschik, Gunnar Morling, Kevin Pollet - SERLI - (kevin.pollet@serli.com)

Field Summary
 
Fields inherited from class org.hibernate.validator.cfg.context.impl.ConstraintMappingContextImplBase
beanClass, mapping
 
Constructor Summary
TypeConstraintMappingContextImpl(Class<?> beanClass, ConstraintMappingContext mapping)
           
 
Method Summary
 TypeConstraintMappingContext<C> constraint(ConstraintDef<?,?> definition)
          Adds a new constraint.
 TypeConstraintMappingContext<C> defaultGroupSequence(Class<?>... defaultGroupSequence)
          Defines the default groups sequence for the bean class of this instance.
<T extends DefaultGroupSequenceProvider<? super C>>
TypeConstraintMappingContext<C>
defaultGroupSequenceProvider(Class<T> defaultGroupSequenceProviderClass)
          Defines the default group sequence provider for the bean class of this instance.
 
Methods inherited from class org.hibernate.validator.cfg.context.impl.ConstraintMappingContextImplBase
method, property, type
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.hibernate.validator.cfg.context.TypeTarget
type
 
Methods inherited from interface org.hibernate.validator.cfg.context.PropertyTarget
property
 
Methods inherited from interface org.hibernate.validator.cfg.context.MethodTarget
method
 

Constructor Detail

TypeConstraintMappingContextImpl

public TypeConstraintMappingContextImpl(Class<?> beanClass,
                                        ConstraintMappingContext mapping)
Method Detail

constraint

public TypeConstraintMappingContext<C> constraint(ConstraintDef<?,?> definition)
Description copied from interface: Constrainable
Adds a new constraint.

Specified by:
constraint in interface Constrainable<TypeConstraintMappingContext<C>>
Parameters:
definition - The constraint to add.
Returns:
The current creational context following the method chaining pattern.

defaultGroupSequence

public TypeConstraintMappingContext<C> defaultGroupSequence(Class<?>... defaultGroupSequence)
Defines the default groups sequence for the bean class of this instance.

Specified by:
defaultGroupSequence in interface TypeConstraintMappingContext<C>
Parameters:
defaultGroupSequence - the default group sequence.
Returns:
Returns itself for method chaining.

defaultGroupSequenceProvider

public <T extends DefaultGroupSequenceProvider<? super C>> TypeConstraintMappingContext<C> defaultGroupSequenceProvider(Class<T> defaultGroupSequenceProviderClass)
Defines the default group sequence provider for the bean class of this instance.

Specified by:
defaultGroupSequenceProvider in interface TypeConstraintMappingContext<C>
Parameters:
defaultGroupSequenceProviderClass - The default group sequence provider class.
Returns:
Returns itself for method chaining.


Copyright © 2007-2011 Red Hat Middleware, LLC. All Rights Reserved