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

io.quarkus.hibernate.validator.runtime.ValidatorHolder Maven / Gradle / Ivy

Go to download

Validate object properties (field, getter) and method parameters for your beans (REST, CDI, Jakarta Persistence)

There is a newer version: 3.17.5
Show newest version
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