|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--java.lang.Throwable
|
+--java.lang.Exception
|
+--org.infoglue.cms.exception.ConstraintException
Thrown to indicate that some business rule rule has been violated. Examples include trying to assign non-unique values, illegal syntax, missing values for required fields...
As there is a possibility that more than one rule is validated, ConstraintException can be chained.
Note! This is not an internal exception
| Constructor Summary | |
ConstraintException(java.lang.String fieldName,
java.lang.String errorCode)
Construct a ConstraintException with the specified field name and error code. |
|
ConstraintException(java.lang.String fieldName,
java.lang.String errorCode,
ConstraintException chainedException)
|
|
| Method Summary | |
boolean |
equals(java.lang.Object o)
Returns true if the specified object is a constraint exception with the same field name and error code. |
ConstraintException |
getChainedException()
|
java.lang.String |
getErrorCode()
|
java.lang.String |
getFieldName()
|
java.lang.String |
getMessage()
|
int |
hashCode()
Note! |
void |
setChainedException(ConstraintException chainedException)
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace |
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public ConstraintException(java.lang.String fieldName,
java.lang.String errorCode)
fieldName - the name of the (entity) field causing the exception.errorCode - indicates the error type.
public ConstraintException(java.lang.String fieldName,
java.lang.String errorCode,
ConstraintException chainedException)
| Method Detail |
public void setChainedException(ConstraintException chainedException)
public ConstraintException getChainedException()
public java.lang.String getFieldName()
public java.lang.String getErrorCode()
public java.lang.String getMessage()
getMessage in class java.lang.Throwablepublic java.lang.String toString()
toString in class java.lang.Throwablepublic boolean equals(java.lang.Object o)
Returns true if the specified object is a constraint exception with the same field name and error code.
Note! Does not include equals check for any chained exceptions. To check for the, use the ConstraintExceptionBuffer class.
equals in class java.lang.Objecto - the reference object with which to compare.
public int hashCode()
hashCode in class java.lang.Object
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||