Top Description Methods
org.hibernate.validator.engine

public Interface HibernateConstraintViolation<T>

extends ConstraintViolation<T>
Known Direct Implementers
org.hibernate.validator.internal.engine.ConstraintViolationImpl
Imports
jakarta.validation.ConstraintViolation, org.hibernate.validator.constraintvalidation.HibernateConstraintValidatorContext

A custom ConstraintViolation which allows to get additional information for a constraint violation.
Since
5.3

Method Summary

Modifier and TypeMethod and Description
public <C> C

Returns:

an instance of the specified type set by the user via HibernateConstraintValidatorContext#withDynamicPayload(Object) or null if no constraint payload if the given type has been set.
getDynamicPayload
(Class<C>
The type of payload to retrieve
type
)

Inherited from jakarta.validation.ConstraintViolation:
getConstraintDescriptorgetExecutableParametersgetExecutableReturnValuegetInvalidValuegetLeafBeangetMessagegetMessageTemplategetPropertyPathgetRootBeangetRootBeanClassunwrap

Method Detail

getDynamicPayloadback to summary
public <C> C getDynamicPayload(Class<C> type)
Parameters
type:Class<C>

The type of payload to retrieve

Returns:C

an instance of the specified type set by the user via HibernateConstraintValidatorContext#withDynamicPayload(Object) or null if no constraint payload if the given type has been set.