org.hibernate.validator.engine.HibernateConstraintViolation Maven / Gradle / Ivy
/*
* Hibernate Validator, declare and validate application constraints
*
* License: Apache License, Version 2.0
* See the license.txt file in the root directory or .
*/
package org.hibernate.validator.engine;
import jakarta.validation.ConstraintViolation;
import org.hibernate.validator.constraintvalidation.HibernateConstraintValidatorContext;
/**
* A custom {@link ConstraintViolation} which allows to get additional information for a constraint violation.
*
* @since 5.3
*/
public interface HibernateConstraintViolation extends ConstraintViolation {
/**
* @param type The type of payload to retrieve
* @return an instance of the specified type set by the user via
* {@link HibernateConstraintValidatorContext#withDynamicPayload(Object)} or {@code null} if no constraint payload
* if the given type has been set.
*/
C getDynamicPayload(Class type);
}