onConstraintViolations

public static InvalidEntityStateException onConstraintViolations(EntityState state, Iterable<ConstraintViolation> violations)

Creates an exception instance for an entity state, which has fields that violate validation constraint(s).

Parameters

state

the invalid entity state

violations

the constraint violations for the entity state