Top Description Constructors Methods
org.hibernate.validator.cfg

public abstract Class ConstraintDef<C extends org.hibernate.validator.cfg.ConstraintDef<C, A>, A extends java.lang.annotation.Annotation>

extends AnnotationDef<C extends ConstraintDef<C, A>, A extends Annotation>
Class Inheritance
Known Direct Subclasses
org.hibernate.validator.cfg.GenericConstraintDef, org.hibernate.validator.cfg.defs.LuhnCheckDef, org.hibernate.validator.cfg.defs.AssertFalseDef, org.hibernate.validator.cfg.defs.AssertTrueDef, org.hibernate.validator.cfg.defs.CodePointLengthDef, org.hibernate.validator.cfg.defs.CreditCardNumberDef, org.hibernate.validator.cfg.defs.CurrencyDef, org.hibernate.validator.cfg.defs.DecimalMaxDef, org.hibernate.validator.cfg.defs.DecimalMinDef, org.hibernate.validator.cfg.defs.DigitsDef, org.hibernate.validator.cfg.defs.DurationMaxDef, org.hibernate.validator.cfg.defs.DurationMinDef, org.hibernate.validator.cfg.defs.EANDef, org.hibernate.validator.cfg.defs.EmailDef, org.hibernate.validator.cfg.defs.FutureDef, org.hibernate.validator.cfg.defs.FutureOrPresentDef, org.hibernate.validator.cfg.defs.ISBNDef, org.hibernate.validator.cfg.defs.LengthDef, org.hibernate.validator.cfg.defs.MaxDef, org.hibernate.validator.cfg.defs.MinDef, org.hibernate.validator.cfg.defs.Mod10CheckDef, org.hibernate.validator.cfg.defs.Mod11CheckDef, org.hibernate.validator.cfg.defs.NegativeDef, org.hibernate.validator.cfg.defs.NegativeOrZeroDef, org.hibernate.validator.cfg.defs.NormalizedDef, org.hibernate.validator.cfg.defs.NotBlankDef, org.hibernate.validator.cfg.defs.NotEmptyDef, org.hibernate.validator.cfg.defs.NotNullDef, org.hibernate.validator.cfg.defs.NullDef, org.hibernate.validator.cfg.defs.ParameterScriptAssertDef, org.hibernate.validator.cfg.defs.PastDef, org.hibernate.validator.cfg.defs.PastOrPresentDef, org.hibernate.validator.cfg.defs.PatternDef, org.hibernate.validator.cfg.defs.PositiveDef, org.hibernate.validator.cfg.defs.PositiveOrZeroDef, org.hibernate.validator.cfg.defs.RangeDef, org.hibernate.validator.cfg.defs.ScriptAssertDef, org.hibernate.validator.cfg.defs.SizeDef, org.hibernate.validator.cfg.defs.UniqueElementsDef, org.hibernate.validator.cfg.defs.URLDef, org.hibernate.validator.cfg.defs.UUIDDef, org.hibernate.validator.cfg.defs.br.CNPJDef, org.hibernate.validator.cfg.defs.br.CPFDef, org.hibernate.validator.cfg.defs.br.TituloEleitoralDef, org.hibernate.validator.cfg.defs.pl.NIPDef, org.hibernate.validator.cfg.defs.pl.PESELDef, org.hibernate.validator.cfg.defs.pl.REGONDef, org.hibernate.validator.cfg.defs.ru.INNDef
Type Parameters
<C>
The type of a concrete sub type. Following to the "self referencing generic type" pattern each sub type has to be parametrized with itself.
<A>
The constraint annotation type represented by a concrete sub type.
Imports
java.lang.annotation.Annotation, jakarta.validation.Payload, org.hibernate.validator.internal.metadata.core.ConstraintHelper

Base class for all constraint definition types. Each sub type represents a single constraint annotation type and allows to add this constraint to a bean class in a programmatic type-safe way with help of the ConstraintMapping API.
Authors
Hardy Ferentschik, Gunnar Morling

Constructor Summary

AccessConstructor and Description
protected
ConstraintDef(Class<A> constraintType)

protected
ConstraintDef(ConstraintDef<?, A> original)

Method Summary

Modifier and TypeMethod and Description
private C
public C
groups(Class<?>... groups)

public C
message(String message)

public C
payload(Class<? extends Payload>... payload)

Inherited from org.hibernate.validator.cfg.AnnotationDef:
addAnnotationAsParameteraddParametertoString

Constructor Detail

ConstraintDefback to summary
protected ConstraintDef(Class<A> constraintType)
ConstraintDefback to summary
protected ConstraintDef(ConstraintDef<?, A> original)

Method Detail

getThisback to summary
private C getThis()

Hides org.hibernate.validator.cfg.AnnotationDef.getThis.

Annotations
@SuppressWarnings:unchecked
groupsback to summary
public C groups(Class<?>... groups)
messageback to summary
public C message(String message)
payloadback to summary
public C payload(Class<? extends Payload>... payload)
Annotations
@SuppressWarnings:unchecked