|
EclipseLink 2.2.0, build 'v20110202-r8913' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Throwable java.lang.Exception java.lang.RuntimeException org.eclipse.persistence.exceptions.EclipseLinkException org.eclipse.persistence.exceptions.OptimisticLockException
public class OptimisticLockException
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.
Field Summary | |
---|---|
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
|
Fields inherited from class org.eclipse.persistence.exceptions.EclipseLinkException |
---|
CR, errorCode, hasBeenLogged, indentationString, internalException, session, shouldPrintInternalException |
Constructor Summary | |
---|---|
protected |
OptimisticLockException(java.lang.String theMessage)
INTERNAL: TopLink exceptions should only be thrown by TopLink. |
protected |
OptimisticLockException(java.lang.String theMessage,
ObjectLevelModifyQuery query)
INTERNAL: TopLink exceptions should only be thrown by TopLink. |
Methods inherited from class org.eclipse.persistence.exceptions.EclipseLinkException |
---|
cr, getErrorCode, getIndentationString, getInternalException, getMessage, getSession, hasBeenLogged, printStackTrace, printStackTrace, printStackTrace, setErrorCode, setHasBeenLogged, setIndentationString, setInternalException, setSession, setShouldPrintInternalException, shouldPrintInternalException, toString |
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, setStackTrace |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
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
Constructor Detail |
---|
protected OptimisticLockException(java.lang.String theMessage)
protected OptimisticLockException(java.lang.String theMessage, ObjectLevelModifyQuery query)
Method Detail |
---|
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)
|
EclipseLink 2.2.0, build 'v20110202-r8913' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |