public class ValidationException extends DatabaseException
JTransaction.validate() (or JTransaction.commit()) fails due to one or more validation errors.JTransaction.validate(),
Serialized Form| Constructor and Description |
|---|
ValidationException(JObject jobj,
Set<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<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, toStringpublic ValidationException(JObject jobj, Set<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()
public Set<ConstraintViolation<JObject>> getViolations()
Copyright © 2017. All rights reserved.