io.quarkus.hibernate.validator.runtime.ValidatorHolder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of quarkus-hibernate-validator Show documentation
Show all versions of quarkus-hibernate-validator Show documentation
Validate object properties (field, getter) and method parameters for your beans (REST, CDI, Jakarta Persistence)
package io.quarkus.hibernate.validator.runtime;
import jakarta.validation.Validator;
import org.hibernate.validator.HibernateValidatorFactory;
public class ValidatorHolder {
private static HibernateValidatorFactory validatorFactory;
private static Validator validator;
static void initialize(HibernateValidatorFactory validatorFactory) {
ValidatorHolder.validatorFactory = validatorFactory;
ValidatorHolder.validator = validatorFactory.getValidator();
}
static HibernateValidatorFactory getValidatorFactory() {
return validatorFactory;
}
static Validator getValidator() {
return validator;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy