Package com.exedio.cope
Class DatePrecisionViolationException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- com.exedio.cope.ConstraintViolationException
-
- com.exedio.cope.DatePrecisionViolationException
-
- All Implemented Interfaces:
Serializable
public final class DatePrecisionViolationException extends ConstraintViolationException
Signals, that an attempt to write adate field
has been failed, because the value to be written violated the precision constraint on that field. This exception will be thrown byFunctionField.set(Item,Object)
and item constructors.- Author:
- Ralf Wiebicke
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DateField
getFeature()
Returns the field, that was attempted to be written.String
getMessage(boolean withFeature)
DateField.Precision
getPrecision()
Returns the precision the value was too precise for.Date
getValue()
Returns the value, that was attempted to be written.Date
getValueAllowedInFuture()
Returns a value allowed for the field and as close as possible tothe value attempted to be written
the future.Date
getValueAllowedInPast()
Returns a value allowed for the field and as close as possible tothe value attempted to be written
the past.-
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 DateField getFeature()
Returns the field, that was attempted to be written.- Specified by:
getFeature
in classConstraintViolationException
-
getPrecision
public DateField.Precision getPrecision()
Returns the precision the value was too precise for.
-
getValue
public Date getValue()
Returns the value, that was attempted to be written.
-
getValueAllowedInPast
public Date getValueAllowedInPast()
Returns a value allowed for the field and as close as possible tothe value attempted to be written
the past.
-
getValueAllowedInFuture
public Date getValueAllowedInFuture()
Returns a value allowed for the field and as close as possible tothe value attempted to be written
the future.
-
getMessage
public String getMessage(boolean withFeature)
- Specified by:
getMessage
in classConstraintViolationException
-
-