Class DatabaseKeyViolationException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
gov.niem.tools.api.db.exceptions.DatabaseKeyViolationException
All Implemented Interfaces:
Serializable

@ResponseStatus(UNPROCESSABLE_ENTITY) public class DatabaseKeyViolationException extends RuntimeException
Customized exception handler for database key violations.
See Also:
  • Constructor Details

    • DatabaseKeyViolationException

      public DatabaseKeyViolationException(String model, String value)
      Throws an exception after an attempt to add an object that is not unique to the database.
    • DatabaseKeyViolationException

      public DatabaseKeyViolationException(String model, String value, String additionalErrors)
      Throws an exception after an attempt to add an object that is not unique to the database.