org.hibernate.validator.cfg.ConstraintMapping 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.cfg;
import org.hibernate.validator.cfg.context.TypeConstraintMappingContext;
/**
* Represents a constraint mapping configured via the programmatic API.
*
* @author Hardy Ferentschik
* @author Gunnar Morling
* @author Kevin Pollet <[email protected]> (C) 2011 SERLI
*/
public interface ConstraintMapping {
/**
* Starts defining constraints on the specified bean class. Each bean class may only be configured once within all
* constraint mappings used for configuring one validator factory.
*
* @param The type to be configured.
* @param beanClass The bean class on which to define constraints. All constraints defined after calling this method
* are added to the bean of the type {@code beanClass} until the next call of {@code type}.
*
* @return Instance allowing for defining constraints on the specified class.
*/
TypeConstraintMappingContext type(Class beanClass);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy