public interface ConstraintMapping
Modifier and Type | Method and Description |
---|---|
<A extends java.lang.annotation.Annotation> |
constraintDefinition(java.lang.Class<A> annotationClass)
Starts defining
ConstraintValidator s to be executed for the specified constraint (i.e. |
<C> TypeConstraintMappingContext<C> |
type(java.lang.Class<C> beanClass)
Starts defining constraints on the specified bean class.
|
<C> TypeConstraintMappingContext<C> type(java.lang.Class<C> beanClass)
C
- The type to be configured.beanClass
- The bean class on which to define constraints. All constraints defined after calling this method
are added to the bean of the type beanClass
until the next call of type
or annotation
.<A extends java.lang.annotation.Annotation> ConstraintDefinitionContext<A> constraintDefinition(java.lang.Class<A> annotationClass)
ConstraintValidator
s to be executed for the specified constraint (i.e. annotation class).
Each constraint may only be configured once within all constraint mappings used for configuring one validator
factory.A
- The annotation type to be configured.annotationClass
- The annotation class on which to define the validators. This type must be an
@interface
annotated with javax.validation.Constraint
. All validators defined after calling
this method are added to the annotation of the type annotationClass
until the next call
of type
or annotation
.Copyright © 2007-2022 Red Hat, Inc. All Rights Reserved