org.hibernate.validator.cfg.context.impl
Class PropertyConstraintMappingContextImpl

java.lang.Object
  extended by org.hibernate.validator.cfg.context.impl.ConstraintMappingContextImplBase
      extended by org.hibernate.validator.cfg.context.impl.PropertyConstraintMappingContextImpl
All Implemented Interfaces:
Cascadable<PropertyConstraintMappingContext>, Constrainable<PropertyConstraintMappingContext>, MethodTarget, PropertyConstraintMappingContext, PropertyTarget, TypeTarget

public final class PropertyConstraintMappingContextImpl
extends ConstraintMappingContextImplBase
implements PropertyConstraintMappingContext

Constraint mapping creational context which allows to configure the constraints for one bean property.

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
PropertyConstraintMappingContextImpl(Class<?> beanClass, Member member, ConstraintMappingContext mapping)
           
 
Method Summary
 PropertyConstraintMappingContext constraint(ConstraintDef<?,?> definition)
          Adds a new constraint.
 PropertyConstraintMappingContext valid()
          Marks the current element (property, parameter etc.) as cascadable.
 
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

PropertyConstraintMappingContextImpl

public PropertyConstraintMappingContextImpl(Class<?> beanClass,
                                            Member member,
                                            ConstraintMappingContext mapping)
Method Detail

constraint

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

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

valid

public PropertyConstraintMappingContext valid()
Description copied from interface: Cascadable
Marks the current element (property, parameter etc.) as cascadable.

Specified by:
valid in interface Cascadable<PropertyConstraintMappingContext>
Returns:
The current creational context following the method chaining pattern.


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