Package com.exedio.cope
Class ConstraintViolationException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- com.exedio.cope.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:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ConstraintViolationException(Item item, Throwable cause)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description abstract Feature
getFeature()
Item
getItem()
Returns the item that was attempted to be modified.String
getItemID()
Deprecated.UsegetItemText()
insteadprotected String
getItemPhrase()
String
getItemText()
Deprecated.UsegetItemPhrase()
instead.String
getMessage()
protected abstract String
getMessage(boolean withFeature)
String
getMessageWithoutFeature()
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Method Detail
-
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 classThrowable
-
getMessageWithoutFeature
public final String getMessageWithoutFeature()
-
getMessage
protected abstract String getMessage(boolean withFeature)
-
getItemID
@Deprecated public final String getItemID()
Deprecated.UsegetItemText()
instead
-
getItemText
@Deprecated public final String getItemText()
Deprecated.UsegetItemPhrase()
instead.
-
-