public class ContainerElementConstraintMappingContextImpl extends Object implements ContainerElementConstraintMappingContext
| Modifier and Type | Field and Description |
|---|---|
protected Map<Class<?>,Class<?>> |
groupConversions |
protected boolean |
isCascading |
protected DefaultConstraintMapping |
mapping |
protected Map<Integer,ContainerElementConstraintMappingContextImpl> |
nestedContainerElementContexts
Contexts for configuring nested container elements, if any.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addConstraint(org.hibernate.validator.internal.cfg.context.ConfiguredConstraint<?> constraint)
Adds a constraint to the set of constraints managed by this creational context.
|
void |
addGroupConversion(Class<?> from,
Class<?> to)
Adds a group conversion for this element.
|
ContainerElementConstraintMappingContext |
constraint(ConstraintDef<?,?> definition)
Adds a new constraint.
|
<A extends Annotation> |
constraintDefinition(Class<A> annotationClass) |
ConstructorConstraintMappingContext |
constructor(Class<?>... parameterTypes)
Selects a constructor to which the next operations shall apply.
|
ContainerElementConstraintMappingContext |
containerElement(ContainerElementTarget parent,
TypeConstraintMappingContextImpl<?> typeContext,
ConstraintLocation location) |
ContainerElementConstraintMappingContext |
containerElement(ContainerElementTarget parent,
TypeConstraintMappingContextImpl<?> typeContext,
ConstraintLocation location,
int index,
int... nestedIndexes) |
ContainerElementConstraintMappingContext |
containerElementType()
Selects the single type argument of the current element's generic type as the target for the next operations.
|
ContainerElementConstraintMappingContext |
containerElementType(int index,
int... nestedIndexes)
Selects the single type argument of the current element's generic type as the target for the next operations.
|
GroupConversionTargetContext<C> |
convertGroup(Class<?> from)
Adds a group conversion for this cascadable element.
|
protected CascadingMetaDataBuilder |
getCascadingMetaDataBuilder() |
protected DefaultConstraintMapping |
getConstraintMapping() |
protected Set<MetaConstraint<?>> |
getConstraints(ConstraintHelper constraintHelper,
TypeResolutionHelper typeResolutionHelper,
ValueExtractorManager valueExtractorManager) |
protected ConstraintDescriptorImpl.ConstraintType |
getConstraintType()
Returns the type of constraints hosted on the element configured by this creational context.
|
protected ContainerElementConstraintMappingContext |
getThis()
Returns this object, narrowed down to the specific sub-type.
|
protected Set<MetaConstraint<?>> |
getTypeArgumentConstraints(ConstraintHelper constraintHelper,
TypeResolutionHelper typeResolutionHelper,
ValueExtractorManager valueExtractorManager) |
boolean |
isCascading() |
MethodConstraintMappingContext |
method(String name,
Class<?>... parameterTypes)
Selects a method to which the next operations shall apply.
|
ParameterConstraintMappingContext |
parameter(int index)
Changes the parameter for which added constraints apply.
|
PropertyConstraintMappingContext |
property(String property,
ElementType elementType)
Selects a property to which the next operations shall apply.
|
ReturnValueConstraintMappingContext |
returnValue()
Selects the current method's return value as the target for the next operations.
|
String |
toString() |
<C> TypeConstraintMappingContext<C> |
type(Class<C> type) |
C |
valid()
Marks the current element (property, parameter etc.) as cascadable.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waittypeconstraintDefinitionconvertGroup, validprotected final Map<Integer,ContainerElementConstraintMappingContextImpl> nestedContainerElementContexts
protected boolean isCascading
protected final DefaultConstraintMapping mapping
protected ContainerElementConstraintMappingContext getThis()
public PropertyConstraintMappingContext property(String property, ElementType elementType)
PropertyTargetUntil this method is called constraints apply on class level. After calling this method constraints apply on the specified property with the given access type.
A given property may only be configured once.
property in interface PropertyTargetproperty - The property on which to apply the following constraints (Java Bean notation).elementType - The access type (field/property).public ConstructorConstraintMappingContext constructor(Class<?>... parameterTypes)
ConstructorTargetUntil this method is called constraints apply on class level. After calling this method constraints apply to the specified constructor.
A given constructor may only be configured once.
constructor in interface ConstructorTargetparameterTypes - The constructor parameter types.public MethodConstraintMappingContext method(String name, Class<?>... parameterTypes)
MethodTargetUntil this method is called constraints apply on class level. After calling this method constraints apply to the specified method.
A given method may only be configured once.
method in interface MethodTargetname - The method name.parameterTypes - The method parameter types.public ParameterConstraintMappingContext parameter(int index)
ParameterTargetparameter in interface ParameterTargetindex - The parameter index.public ReturnValueConstraintMappingContext returnValue()
ReturnValueTargetreturnValue in interface ReturnValueTargetpublic ContainerElementConstraintMappingContext containerElementType()
ContainerElementTargetcontainerElementType in interface ContainerElementTargetpublic ContainerElementConstraintMappingContext containerElementType(int index, int... nestedIndexes)
ContainerElementTargetcontainerElementType in interface ContainerElementTargetindex - The index of the type argument to configure. Pass 0 when navigating into an array type.nestedIndexes - the nested index(es) in case the container element to configure is a generic type within
another generic type, e.g. List<Map<String, String>>, a multi-dimensional array or a combination of
(nested) parameterized and array types.public ContainerElementConstraintMappingContext constraint(ConstraintDef<?,?> definition)
Constrainableconstraint in interface Constrainable<ContainerElementConstraintMappingContext>definition - The constraint to add.protected ConstraintDescriptorImpl.ConstraintType getConstraintType()
public void addGroupConversion(Class<?> from, Class<?> to)
from - the source group of the conversionto - the target group of the conversionpublic C valid()
Cascadablevalid in interface Cascadable<C extends Cascadable<C>>public GroupConversionTargetContext<C> convertGroup(Class<?> from)
CascadableconvertGroup in interface Cascadable<C extends Cascadable<C>>from - the source group of the conversion to be configuredpublic ContainerElementConstraintMappingContext containerElement(ContainerElementTarget parent, TypeConstraintMappingContextImpl<?> typeContext, ConstraintLocation location)
public ContainerElementConstraintMappingContext containerElement(ContainerElementTarget parent, TypeConstraintMappingContextImpl<?> typeContext, ConstraintLocation location, int index, int... nestedIndexes)
public boolean isCascading()
protected Set<MetaConstraint<?>> getTypeArgumentConstraints(ConstraintHelper constraintHelper, TypeResolutionHelper typeResolutionHelper, ValueExtractorManager valueExtractorManager)
protected CascadingMetaDataBuilder getCascadingMetaDataBuilder()
protected DefaultConstraintMapping getConstraintMapping()
protected void addConstraint(org.hibernate.validator.internal.cfg.context.ConfiguredConstraint<?> constraint)
constraint - the constraint to addprotected Set<MetaConstraint<?>> getConstraints(ConstraintHelper constraintHelper, TypeResolutionHelper typeResolutionHelper, ValueExtractorManager valueExtractorManager)
public <C> TypeConstraintMappingContext<C> type(Class<C> type)
public <A extends Annotation> ConstraintDefinitionContext<A> constraintDefinition(Class<A> annotationClass)
Copyright © 2019 JBoss by Red Hat. All rights reserved.