Module utility.validator
Class DomainInvariantViolationException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
uk.co.jasonmarston.kiunzi.utility.validator.DomainInvariantViolationException
- All Implemented Interfaces:
Serializable
Exception thrown when one or more Bean Validation constraints are violated on a domain
object during invariant checking.
Each violated constraint is captured as a DomainInvariantViolationException.Violation record and made
available via the violations field. The exception message is a comma-separated
summary of all violations in the form "property message".
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordAn immutable summary of a single Bean Validation constraint violation. -
Constructor Summary
ConstructorsConstructorDescriptionDomainInvariantViolationException(Set<? extends jakarta.validation.ConstraintViolation<?>> violations) Constructs aDomainInvariantViolationExceptionfrom the given set of constraint violations. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
DomainInvariantViolationException
public DomainInvariantViolationException(Set<? extends jakarta.validation.ConstraintViolation<?>> violations) Constructs aDomainInvariantViolationExceptionfrom the given set of constraint violations.- Parameters:
violations- the non-empty set of constraint violations; must not benull
-