C
- The type represented by this creational context.public final class TypeConstraintMappingContextImpl<C> extends Object implements TypeConstraintMappingContext<C>
Modifier and Type | Field and Description |
---|---|
protected DefaultConstraintMapping |
mapping |
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.
|
TypeConstraintMappingContext<C> |
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.
|
TypeConstraintMappingContext<C> |
defaultGroupSequence(Class<?>... defaultGroupSequence)
Defines the default group sequence for current type.
|
TypeConstraintMappingContext<C> |
defaultGroupSequenceProviderClass(Class<? extends DefaultGroupSequenceProvider<? super C>> defaultGroupSequenceProviderClass)
Defines the default group sequence provider for the current type.
|
protected DefaultConstraintMapping |
getConstraintMapping() |
protected Set<MetaConstraint<?>> |
getConstraints(ConstraintHelper constraintHelper)
Converts all constraints managed by this creational context into
MetaConstraint s. |
protected ConstraintDescriptorImpl.ConstraintType |
getConstraintType()
Returns the type of constraints hosted on the element configured by this creational context.
|
TypeConstraintMappingContext<C> |
ignoreAllAnnotations()
Defines that all annotations for this type should be ignored.
|
TypeConstraintMappingContext<C> |
ignoreAnnotations()
Specifies that annotations specified on the configured type or property should be ignored.
|
TypeConstraintMappingContext<C> |
ignoreAnnotations(boolean ignoreAnnotations)
Specifies whether annotations at the given element should be ignored or not, overriding any setting given for
parent elements.
|
MethodConstraintMappingContext |
method(String name,
Class<?>... parameterTypes)
Selects a method to which the next operations shall apply.
|
PropertyConstraintMappingContext |
property(String property,
ElementType elementType)
Selects a property to which the next operations shall apply.
|
<C> TypeConstraintMappingContext<C> |
type(Class<C> type) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
type
constraintDefinition
protected final DefaultConstraintMapping mapping
public TypeConstraintMappingContext<C> constraint(ConstraintDef<?,?> definition)
Constrainable
constraint
in interface Constrainable<TypeConstraintMappingContext<C>>
definition
- The constraint to add.public TypeConstraintMappingContext<C> ignoreAnnotations()
AnnotationProcessingOptions
ignoreAnnotations
in interface AnnotationProcessingOptions<TypeConstraintMappingContext<C>>
public TypeConstraintMappingContext<C> ignoreAnnotations(boolean ignoreAnnotations)
AnnotationIgnoreOptions
ignoreAnnotations
in interface AnnotationIgnoreOptions<TypeConstraintMappingContext<C>>
ignoreAnnotations
- Whether to ignore annotation-based constraints or not.public TypeConstraintMappingContext<C> ignoreAllAnnotations()
TypeConstraintMappingContext
ignoreAllAnnotations
in interface TypeConstraintMappingContext<C>
public TypeConstraintMappingContext<C> defaultGroupSequence(Class<?>... defaultGroupSequence)
TypeConstraintMappingContext
defaultGroupSequence
in interface TypeConstraintMappingContext<C>
defaultGroupSequence
- the default group sequence.public TypeConstraintMappingContext<C> defaultGroupSequenceProviderClass(Class<? extends DefaultGroupSequenceProvider<? super C>> defaultGroupSequenceProviderClass)
TypeConstraintMappingContext
defaultGroupSequenceProviderClass
in interface TypeConstraintMappingContext<C>
defaultGroupSequenceProviderClass
- The default group sequence provider class.public PropertyConstraintMappingContext property(String property, ElementType elementType)
PropertyTarget
Until 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 PropertyTarget
property
- The property on which to apply the following constraints (Java Bean notation).elementType
- The access type (field/property).public MethodConstraintMappingContext method(String name, Class<?>... parameterTypes)
MethodTarget
Until 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 MethodTarget
name
- The method name.parameterTypes
- The method parameter types.public ConstructorConstraintMappingContext constructor(Class<?>... parameterTypes)
ConstructorTarget
Until 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 ConstructorTarget
parameterTypes
- The constructor parameter types.protected ConstraintDescriptorImpl.ConstraintType getConstraintType()
protected DefaultConstraintMapping getConstraintMapping()
protected void addConstraint(org.hibernate.validator.internal.cfg.context.ConfiguredConstraint<?> constraint)
constraint
- the constraint to addprotected Set<MetaConstraint<?>> getConstraints(ConstraintHelper constraintHelper)
MetaConstraint
s.constraintHelper
- constraint helper required for creation of meta constraints.public <C> TypeConstraintMappingContext<C> type(Class<C> type)
public <A extends Annotation> ConstraintDefinitionContext<A> constraintDefinition(Class<A> annotationClass)
Copyright © 2007-2017 Red Hat, Inc. All Rights Reserved