Class HibernateValidatorBuildTimeConfig.HibernateValidatorMethodBuildTimeConfig
- java.lang.Object
-
- io.quarkus.hibernate.validator.runtime.HibernateValidatorBuildTimeConfig.HibernateValidatorMethodBuildTimeConfig
-
- Enclosing class:
- HibernateValidatorBuildTimeConfig
public static class HibernateValidatorBuildTimeConfig.HibernateValidatorMethodBuildTimeConfig extends Object
-
-
Field Summary
Fields Modifier and Type Field Description booleanallowMultipleCascadedValidationOnReturnValuesDefine whether more than one constraint on a return value may be marked for cascading validation are allowed.booleanallowOverridingParameterConstraintsDefine whether overriding methods that override constraints should throw aConstraintDefinitionException.booleanallowParameterConstraintsOnParallelMethodsDefine whether parallel methods that define constraints should throw aConstraintDefinitionException.
-
Constructor Summary
Constructors Constructor Description HibernateValidatorMethodBuildTimeConfig()
-
-
-
Field Detail
-
allowOverridingParameterConstraints
@ConfigItem(defaultValue="false") public boolean allowOverridingParameterConstraints
Define whether overriding methods that override constraints should throw aConstraintDefinitionException. The default value isfalse, i.e. do not allow.See Section 4.5.5 of the JSR 380 specification, specifically
"In sub types (be it sub classes/interfaces or interface implementations), no parameter constraints may be declared on overridden or implemented methods, nor may parameters be marked for cascaded validation. This would pose a strengthening of preconditions to be fulfilled by the caller."
-
allowParameterConstraintsOnParallelMethods
@ConfigItem(defaultValue="false") public boolean allowParameterConstraintsOnParallelMethods
Define whether parallel methods that define constraints should throw aConstraintDefinitionException. The default value isfalse, i.e. do not allow.See Section 4.5.5 of the JSR 380 specification, specifically
"If a sub type overrides/implements a method originally defined in several parallel types of the hierarchy (e.g. two interfaces not extending each other, or a class and an interface not implemented by said class), no parameter constraints may be declared for that method at all nor parameters be marked for cascaded validation. This again is to avoid an unexpected strengthening of preconditions to be fulfilled by the caller."
-
allowMultipleCascadedValidationOnReturnValues
@ConfigItem(defaultValue="false") public boolean allowMultipleCascadedValidationOnReturnValues
Define whether more than one constraint on a return value may be marked for cascading validation are allowed. The default value isfalse, i.e. do not allow.See Section 4.5.5 of the JSR 380 specification, specifically
"One must not mark a method return value for cascaded validation more than once in a line of a class hierarchy. In other words, overriding methods on sub types (be it sub classes/interfaces or interface implementations) cannot mark the return value for cascaded validation if the return value has already been marked on the overridden method of the super type or interface."
-
-