public class ValidationException extends DatabaseException
JTransaction.validate()
(or JTransaction.commit()
) fails due to one or more validation errors.JTransaction.validate()
,
Serialized FormConstructor and Description |
---|
ValidationException(JObject jobj,
Set<javax.validation.ConstraintViolation<JObject>> violations,
String message)
Constructor.
|
ValidationException(JObject jobj,
String message)
Convenience constructor for use when JSR 303 validation is not involved.
|
ValidationException(JObject jobj,
String message,
Throwable cause)
Convenience constructor for use when JSR 303 validation is not involved.
|
Modifier and Type | Method and Description |
---|---|
JObject |
getObject()
Get the object that failed to validate.
|
Set<javax.validation.ConstraintViolation<JObject>> |
getViolations()
Get the validation errors in case validation failed due to a failed JSR 303 validation check.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public ValidationException(JObject jobj, Set<javax.validation.ConstraintViolation<JObject>> violations, String message)
jobj
- the object that failed validationviolations
- JSR 303 validation errors, if any, otherwise nullmessage
- exception messagepublic ValidationException(JObject jobj, String message)
jobj
- the object that failed validationmessage
- exception messagepublic JObject getObject()
Copyright © 2022. All rights reserved.