Package io.permazen.core
Class ReferencedObjectException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
io.permazen.core.DatabaseException
io.permazen.core.ReferencedObjectException
- All Implemented Interfaces:
Serializable
Thrown on an attempt to delete an object which is still referenced
by a
ReferenceField
configured for DeleteAction.EXCEPTION
.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionGet the name of the field in the referring object that still referrs to the object that was supposed to be deleted.getId()
Get the ID of the object that could not be deleted because it was referenced.Get the ID of the object that still refers to the object that was to be deleted.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Method Details
-
getId
Get the ID of the object that could not be deleted because it was referenced.- Returns:
- referenced object's ID
-
getReferrer
Get the ID of the object that still refers to the object that was to be deleted.- Returns:
- referencing object's ID
-
getFieldName
Get the name of the field in the referring object that still referrs to the object that was supposed to be deleted.- Returns:
- reference field name
-