Package com.exedio.cope
Class UniqueViolationException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- com.exedio.cope.ConstraintViolationException
-
- com.exedio.cope.UniqueViolationException
-
- All Implemented Interfaces:
Serializable
public final class UniqueViolationException extends ConstraintViolationException
Signals, that an attempt to write an field has been failed, and the value to be set violated a unique constraint. This exception will be thrown byItem.set
and item constructors if that field is covered by aunique constraint
and the value to be set violated the uniqueness.- Author:
- Ralf Wiebicke
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description UniqueConstraint
getConstraint()
Deprecated.Renamed togetFeature()
.UniqueConstraint
getFeature()
Returns the violated constraint.Feature
getFeatureForDescription()
List<FunctionField<?>>
getFields()
String
getMessage(boolean withFeature)
-
Methods inherited from class com.exedio.cope.ConstraintViolationException
getItem, getItemID, getItemPhrase, getItemText, getMessage, getMessageWithoutFeature
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Method Detail
-
getFeature
public UniqueConstraint getFeature()
Returns the violated constraint.- Specified by:
getFeature
in classConstraintViolationException
-
getFeatureForDescription
public Feature getFeatureForDescription()
-
getFields
public List<FunctionField<?>> getFields()
-
getConstraint
@Deprecated public UniqueConstraint getConstraint()
Deprecated.Renamed togetFeature()
.
-
getMessage
public String getMessage(boolean withFeature)
- Specified by:
getMessage
in classConstraintViolationException
-
-