public class OptimisticLockingException extends NlsRuntimeException
OptimisticLockException
that is suitable for
end-users and support NLS/I18N.Modifier and Type | Field and Description |
---|---|
private static long |
serialVersionUID |
KEY_ANNOTATION, KEY_ARGUMENT, KEY_CAPACITY, KEY_CONTAINER, KEY_DEFAULT, KEY_DIRECTORY, KEY_ERROR, KEY_EXISTING, KEY_EXPECTED, KEY_FILE, KEY_FUNCTION, KEY_ID, KEY_KEY, KEY_LOCATION, KEY_MAX, KEY_MIN, KEY_MODE, KEY_NAME, KEY_OBJECT, KEY_OPERAND, KEY_OPERATION, KEY_OPTION, KEY_PATH, KEY_PROPERTY, KEY_QUERY, KEY_RESOURCE, KEY_SIZE, KEY_SOURCE, KEY_TARGET_TYPE, KEY_TITLE, KEY_TYPE, KEY_URI, KEY_USER, KEY_VALUE
Constructor and Description |
---|
OptimisticLockingException(Throwable cause,
Object entity,
Object id)
The constructor.
|
Modifier and Type | Method and Description |
---|---|
(package private) static String |
getEntityRepresentation(Object entity) |
(package private) static Object |
getId(Object entity) |
boolean |
isForUser() |
static OptimisticLockingException |
of(Throwable optimisticLockError)
Creates an
OptimisticLockingException for the given Throwable cause. |
createBundle, createCopy, createCopyViaClone, createUuid, getCode, getLocalizedMessage, getLocalizedMessage, getLocalizedMessage, getMessage, getNlsMessage, getUuid, isTechnical, printStackTrace, printStackTrace, toNlsMessage, toString, toString, toString
addSuppressed, fillInStackTrace, getCause, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getCause, getStackTrace
private static final long serialVersionUID
public OptimisticLockingException(Throwable cause, Object entity, Object id)
cause
- is the cause such as OptimisticLockException
or
ObjectOptimisticLockingFailureException
.entity
- the entity representation (e.g. simple name of the entity class).id
- the ID of the entity.public boolean isForUser()
isForUser
in interface NlsThrowable
isForUser
in class NlsRuntimeException
true
if the message
of this exception is for end-users (or clients),
false
otherwise (for internal technical
errors).public static OptimisticLockingException of(Throwable optimisticLockError)
OptimisticLockingException
for the given Throwable
cause.optimisticLockError
- a Throwable
like StaleObjectStateException
,
OptimisticLockException
, or
ObjectOptimisticLockingFailureException
.OptimisticLockingException
or null
if the given Throwable
is
not a known optimitisc locking exception.Copyright © 2001–2016 mmm-Team. All rights reserved.