public class OptimisticLockException extends EclipseLinkException
Purpose: This exception is used when TopLink's optimistic locking feature is used. It will be raised if the object being updated or deleted was changed or deleted from the database since it as last read.
Modifier and Type | Field and Description |
---|---|
static int |
MUST_HAVE_MAPPING_WHEN_IN_OBJECT |
static int |
NEED_TO_MAP_JAVA_SQL_TIMESTAMP |
static int |
NO_VERSION_NUMBER_WHEN_DELETING |
static int |
NO_VERSION_NUMBER_WHEN_UPDATING |
static int |
OBJECT_CHANGED_SINCE_LAST_MERGE |
static int |
OBJECT_CHANGED_SINCE_LAST_READ_WHEN_DELETING |
static int |
OBJECT_CHANGED_SINCE_LAST_READ_WHEN_UPDATING |
protected ObjectLevelModifyQuery |
query
Store the query that raised the optimistic violation.
|
static int |
STATEMENT_NOT_EXECUTED_IN_BATCH |
static int |
UNWRAPPING_OBJECT_DELETED_SINCE_LAST_READ |
CR, errorCode, hasBeenLogged, indentationString, internalException, session, shouldPrintInternalException
Modifier | Constructor and Description |
---|---|
protected |
OptimisticLockException()
INTERNAL:
EclipseLink exceptions should only be thrown by EclipseLink.
|
protected |
OptimisticLockException(java.lang.String theMessage)
INTERNAL:
EclipseLink exceptions should only be thrown by EclipseLink.
|
protected |
OptimisticLockException(java.lang.String theMessage,
ObjectLevelModifyQuery query)
INTERNAL:
EclipseLink exceptions should only be thrown by EclipseLink.
|
cr, getErrorCode, getIndentationString, getInternalException, getMessage, getSession, getUnformattedMessage, hasBeenLogged, printStackTrace, printStackTrace, printStackTrace, setErrorCode, setHasBeenLogged, setIndentationString, setInternalException, setSession, setShouldPrintInternalException, shouldPrintInternalException, toString
protected transient ObjectLevelModifyQuery query
public static final int NO_VERSION_NUMBER_WHEN_DELETING
public static final int OBJECT_CHANGED_SINCE_LAST_READ_WHEN_DELETING
public static final int NO_VERSION_NUMBER_WHEN_UPDATING
public static final int OBJECT_CHANGED_SINCE_LAST_READ_WHEN_UPDATING
public static final int MUST_HAVE_MAPPING_WHEN_IN_OBJECT
public static final int NEED_TO_MAP_JAVA_SQL_TIMESTAMP
public static final int UNWRAPPING_OBJECT_DELETED_SINCE_LAST_READ
public static final int OBJECT_CHANGED_SINCE_LAST_MERGE
public static final int STATEMENT_NOT_EXECUTED_IN_BATCH
protected OptimisticLockException()
protected OptimisticLockException(java.lang.String theMessage)
protected OptimisticLockException(java.lang.String theMessage, ObjectLevelModifyQuery query)
public java.lang.Object getObject()
public ObjectLevelModifyQuery getQuery()
public static OptimisticLockException batchStatementExecutionFailure()
public static OptimisticLockException mustHaveMappingWhenStoredInObject(java.lang.Class aClass)
public static OptimisticLockException noVersionNumberWhenDeleting(java.lang.Object object, ObjectLevelModifyQuery query)
public static OptimisticLockException noVersionNumberWhenUpdating(java.lang.Object object, ObjectLevelModifyQuery query)
public static OptimisticLockException objectChangedSinceLastReadWhenDeleting(java.lang.Object object, ObjectLevelModifyQuery query)
public static OptimisticLockException objectChangedSinceLastReadWhenUpdating(java.lang.Object object, ObjectLevelModifyQuery query)
public static OptimisticLockException objectChangedSinceLastMerge(java.lang.Object object)
public static OptimisticLockException unwrappingObjectDeletedSinceLastRead(java.util.Vector pkVector, java.lang.String className)
public static OptimisticLockException needToMapJavaSqlTimestampWhenStoredInObject()
public void setQuery(ObjectLevelModifyQuery query)