Package com.exedio.cope
Class StringLengthViolationException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- com.exedio.cope.ConstraintViolationException
-
- com.exedio.cope.StringLengthViolationException
-
- All Implemented Interfaces:
Serializable
public final class StringLengthViolationException extends ConstraintViolationException
Signals, that an attempt to write astring field
has been failed, because value to be written violated the length constraint on that field. This exception will be thrown byFunctionField.set(Item,Object)
and item constructors.- Author:
- Ralf Wiebicke
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description StringLengthViolationException(StringField feature, Item item, String value, boolean isTooShort, int border)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description StringField
getFeature()
Returns the field, that was attempted to be written.String
getMessage(boolean withFeature)
StringField
getStringAttribute()
Deprecated.Renamed togetFeature()
.String
getValue()
Returns the value, that was attempted to be written.boolean
isTooShort()
-
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
-
-
-
-
Constructor Detail
-
StringLengthViolationException
@Deprecated public StringLengthViolationException(StringField feature, Item item, String value, boolean isTooShort, int border)
Deprecated.
-
-
Method Detail
-
getFeature
public StringField getFeature()
Returns the field, that was attempted to be written.- Specified by:
getFeature
in classConstraintViolationException
-
getValue
public String getValue()
Returns the value, that was attempted to be written.
-
isTooShort
public boolean isTooShort()
-
getMessage
public String getMessage(boolean withFeature)
- Specified by:
getMessage
in classConstraintViolationException
-
getStringAttribute
@Deprecated public StringField getStringAttribute()
Deprecated.Renamed togetFeature()
.
-
-