All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.hibernate.validator.engine.HibernateConstraintViolation Maven / Gradle / Ivy

There is a newer version: 4.0.0
Show newest version
/*
 * 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);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy