org.hibernate.validator.cfg.context.impl
Class ReturnValueConstraintMappingContextImpl
java.lang.Object
org.hibernate.validator.cfg.context.impl.ConstraintMappingContextImplBase
org.hibernate.validator.cfg.context.impl.ReturnValueConstraintMappingContextImpl
- All Implemented Interfaces:
- Cascadable<ReturnValueConstraintMappingContext>, Constrainable<ReturnValueConstraintMappingContext>, MethodTarget, ParameterTarget, ReturnValueConstraintMappingContext, TypeTarget
public final class ReturnValueConstraintMappingContextImpl
- extends ConstraintMappingContextImplBase
- implements ReturnValueConstraintMappingContext
Constraint mapping creational context which allows to configure the constraints for one method return value.
- Author:
- Hardy Ferentschik, Gunnar Morling, Kevin Pollet - SERLI - (kevin.pollet@serli.com)
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 |
ReturnValueConstraintMappingContextImpl
public ReturnValueConstraintMappingContextImpl(Class<?> beanClass,
Method method,
ConstraintMappingContext mapping)
constraint
public ReturnValueConstraintMappingContext constraint(ConstraintDef<?,?> definition)
- Description copied from interface:
Constrainable
- Adds a new constraint.
- Specified by:
constraint
in interface Constrainable<ReturnValueConstraintMappingContext>
- Parameters:
definition
- The constraint to add.
- Returns:
- The current creational context following the method chaining pattern.
valid
public ReturnValueConstraintMappingContext valid()
- Marks the current property as cascadable.
- Specified by:
valid
in interface Cascadable<ReturnValueConstraintMappingContext>
- Returns:
- Returns itself for method chaining.
parameter
public ParameterConstraintMappingContext parameter(int index)
- Changes the parameter for which added constraints apply.
- Specified by:
parameter
in interface ParameterTarget
- Parameters:
index
- The parameter index.
- Returns:
- Returns a new
ConstraintsForTypeMethodElement
instance allowing method chaining.
Copyright © 2007-2011 Red Hat Middleware, LLC. All Rights Reserved