public class CascadeRequiredException extends DBException
| Constructor and Description |
|---|
CascadeRequiredException(java.util.Collection<? extends DBObject> objs,
java.util.Collection<DBObjectID> deps)
Creates a cascade exception for a large operation.
|
CascadeRequiredException(DBObject obj)
Constructor to use when the list of dependents is unknwon.
|
CascadeRequiredException(DBObject obj,
java.util.Collection<DBObjectID> deps)
The given object cannot be deleted because the list of dependent objects
exist.
|
CascadeRequiredException(DBObject obj,
java.lang.String msg)
Constructor to use when the list of dependents is unknwon.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Collection<DBObjectID> |
getDependents() |
java.lang.String |
getMessage()
Gets the message for this exception.
|
DBObject |
getObject()
The object on which this exception occurred.
|
java.util.Collection<DBObject> |
getObjects() |
void |
include(CascadeRequiredException cre2)
Includes the cascade information of the given exception with the details
of this constraint (i.e.
|
append, getAllMessages, getNextException, getRelatedObjects, setNextException, setRelatedObjectspublic CascadeRequiredException(DBObject obj, java.lang.String msg)
obj - the object for whom a cascade is blocking an attempted operationpublic CascadeRequiredException(DBObject obj)
obj - the object for whom a cascade is blocking an attempted operationpublic CascadeRequiredException(DBObject obj, java.util.Collection<DBObjectID> deps)
objs - the objects for whom the cascade is blocking an attempted
operationdeps - the dependent objects that need to be cascaded topublic CascadeRequiredException(java.util.Collection<? extends DBObject> objs, java.util.Collection<DBObjectID> deps)
objs - the objects for whom the cascade is blocking an attempted
operationdeps - the dependent objects that need to be cascaded topublic void include(CascadeRequiredException cre2)
cre2 - the details to include in this exceptionpublic java.lang.String getMessage()
DBExceptiongetAllMessages()getMessage in class DBExceptionDBException.getAllMessages()public DBObject getObject()
DBExceptiongetObject in class DBExceptionpublic java.util.Collection<DBObject> getObjects()
public java.util.Collection<DBObjectID> getDependents()