Package se.conciliate.extensions.store
Class MTRemoteChangeException
java.lang.Object
java.lang.Throwable
java.lang.Exception
se.conciliate.extensions.store.MTRemoteChangeException
- All Implemented Interfaces:
Serializable
Thrown when a direct update request (save(), remove()) fails because
the object is out of date or because the object to update is currently being
updated by someone else.
- Author:
- Per-Erik
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Error code that idicates that a change failed due to someone else making changes to the object.static final int
Error code that indicates that a change failed due to the changed object being out of date. -
Constructor Summary
ConstructorsConstructorDescriptionMTRemoteChangeException
(int cause, String user, String userFullName, String dataObjectName, long dataObjectID, boolean isModel) -
Method Summary
Modifier and TypeMethodDescriptionint
Returns eitherOUT_OF_DATE
orALREADY_CHANGING
depending on the reported cause of the exception.long
Returns the id of the data object that is locked/out of date.Returns the name/title of the data object that is locked/out of date.Returns the user name that is holding the lock or the last known user that made changes to the data object rendering the data object to be out of date.boolean
isModel()
Returns true if this MTRemoteChangeException was raised because of an attempt to change a model, false otherwise (if symbol).Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
OUT_OF_DATE
public static final int OUT_OF_DATEError code that indicates that a change failed due to the changed object being out of date. Re-query the object, make the changes and try again.- See Also:
-
ALREADY_CHANGING
public static final int ALREADY_CHANGINGError code that idicates that a change failed due to someone else making changes to the object.- See Also:
-
-
Constructor Details
-
MTRemoteChangeException
-
-
Method Details
-
getUserName
Returns the user name that is holding the lock or the last known user that made changes to the data object rendering the data object to be out of date.- Returns:
- the user that is holding the lock or the last known user that made changes to the data object rendering the data object to be out of date.
-
getUserFullName
-
getDataObjectName
Returns the name/title of the data object that is locked/out of date.- Returns:
- the data object that is locked/out of date.
-
getDataObjectID
public long getDataObjectID()Returns the id of the data object that is locked/out of date.- Returns:
- the id of the data object that is locked/out of date.
-
isModel
public boolean isModel()Returns true if this MTRemoteChangeException was raised because of an attempt to change a model, false otherwise (if symbol).- Returns:
- true if this MTRemoteChangeException was raised because of an attempt to change a model, false otherwise (if symbol).
-
getChangeCause
public int getChangeCause()Returns eitherOUT_OF_DATE
orALREADY_CHANGING
depending on the reported cause of the exception.- Returns:
-