public class HGReplaceRefusedException extends HGException
This exception is thrown when an attempt to replace the value of an existing atom
failed. Generally, this exception is thrown as a response to the HGAtomReplaceRequestEvent
and can be caught by an application that expects it to occur. Listener of the
HGAtomReplaceRequestEvent
can be defined to implement various database integrity constraints or
even application-level constraints that are otherwise cumbersome to enforce.
Constructor and Description |
---|
HGReplaceRefusedException()
Default constructor.
|
HGReplaceRefusedException(HGHandle atom,
Object reason) |
Modifier and Type | Method and Description |
---|---|
HGHandle |
getAtom()
Return the proposed atom whose addition failed.
|
Object |
getReason()
Return the reason of the failure - could be a string or a more complex
object interpreted by the application at hand.
|
void |
setAtom(HGHandle atom)
Set the proposed atom whose addition failed.
|
void |
setReason(Object reason)
Set the reason for the failure (a string or anything else an application
can make use of).
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public HGReplaceRefusedException()
Default constructor. Normally used only for serialization/de-serialization purposes.
Call setAtom
and setReason
subsequently.
public HGHandle getAtom()
public void setAtom(HGHandle atom)
atom
- public Object getReason()
public void setReason(Object reason)
reason
- Copyright © 2015. All rights reserved.