Class ConstraintViolationException

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
CheckViolationException, ColorAlphaViolationException, CopyViolationException, DataLengthViolationException, DatePrecisionViolationException, DateRangeViolationException, DayRangeViolationException, DoubleNaNException, FinalViolationException, Hash.InvalidPlainTextException, IllegalContentTypeException, IllegalCurrencyException, IntegrityViolationException, ListSizeViolationException, MandatoryViolationException, RangeViolationException, StringCharSetViolationException, StringLengthViolationException, UniqueViolationException

public abstract class ConstraintViolationException extends RuntimeException
Is thrown, when a persistent modification violates a constraint.
Author:
Ralf Wiebicke
See Also:
  • Constructor Details

    • ConstraintViolationException

      protected ConstraintViolationException(Item item, Throwable cause)
  • Method Details

    • getFeature

      public abstract Feature getFeature()
    • getItem

      public final Item getItem()
      Returns the item that was attempted to be modified. Returns null, if the constraint violation occured on the creation of an item.
    • getItemPhrase

      protected final String getItemPhrase()
    • getMessage

      public final String getMessage()
      Overrides:
      getMessage in class Throwable
    • getMessageWithoutFeature

      public final String getMessageWithoutFeature()
    • getMessage

      protected abstract String getMessage(boolean withFeature)
    • getItemID

      @Deprecated public final String getItemID()
      Deprecated.
      Use getItemText() instead
    • getItemText

      @Deprecated public final String getItemText()
      Deprecated.
      Use getItemPhrase() instead.