Class ValidationUtils
java.lang.Object
org.apache.openjpa.persistence.validation.ValidationUtils
Validation helper routines and wrappers to remove runtime dependencies
on the Bean Valdiation APIs or a implementation.
Note: This class should have no direct dependency on the jakarta.validation
packages, which should only occur in the ValidatorImpl class.
- Version:
- $Rev$ $Date$
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
Determines whether an exception is a constraint violation exception via class name.static boolean
Setup Validation support by determining if the jakarta.validation APIs are available and then create a Validator if required by the provided configuration.
-
Constructor Details
-
ValidationUtils
public ValidationUtils()
-
-
Method Details
-
setupValidation
Setup Validation support by determining if the jakarta.validation APIs are available and then create a Validator if required by the provided configuration.- Parameters:
conf
-- Returns:
- true if a Validator was created, false otherwise.
- Throws:
If
- a Validator was required but could not be created.
-
isConstraintViolationException
Determines whether an exception is a constraint violation exception via class name. Does not require JSR-303 API to be in classpath.- Parameters:
e
- exception to check- Returns:
- true of the exception is a constraint violation exception
-