Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.cayenne.access
Class OptimisticLockException

    java.lang.Object
      java.lang.Throwable
          java.lang.Exception
              java.lang.RuntimeException
                  org.apache.cayenne.CayenneRuntimeException
                      org.apache.cayenne.access.OptimisticLockException

All Implemented Interfaces:
  java.io.Serializable

    public class OptimisticLockException

extends CayenneRuntimeException

An exception thrown on optimistic lock failure.

Since:
  1.1
See Also:
  Serialized Form

Field Summary
`protected ObjectId` | `failedObjectId`
`protected java.util.Map` | `qualifierSnapshot`
`protected java.lang.String` | `querySQL`
`protected DbEntity` | `rootEntity`

Constructor Summary
`OptimisticLockException(ObjectId id, DbEntity rootEntity, java.lang.String querySQL, java.util.Map qualifierSnapshot)`

Method Summary
`ObjectId` | `getFailedObjectId()` Returns the ObjectId of the object that caused the OptimisticLockException.
`java.util.Map<?,?>` | `getFreshSnapshot(ObjectContext context)` Retrieves fresh snapshot for the failed row.
`java.lang.String` | `getMessage()` Returns descriptive message for this exception.
`java.util.Map` | `getQualifierSnapshot()`
`java.lang.String` | `getQuerySQL()`

Methods inherited from class org.apache.cayenne.CayenneRuntimeException
`getUnlabeledMessage`

Methods inherited from class java.lang.Throwable
`fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### failedObjectId

    protected ObjectId failedObjectId

### querySQL

    protected java.lang.String querySQL

### rootEntity

    protected DbEntity rootEntity

### qualifierSnapshot

    protected java.util.Map qualifierSnapshot

Constructor Detail

### OptimisticLockException

    public OptimisticLockException(ObjectId id,
                                   DbEntity rootEntity,
                                   java.lang.String querySQL,
                                   java.util.Map qualifierSnapshot)

Method Detail

### getQualifierSnapshot

    public java.util.Map getQualifierSnapshot()

### getQuerySQL

    public java.lang.String getQuerySQL()

### getFreshSnapshot

    public java.util.Map<?,?> getFreshSnapshot(ObjectContext context)

  Retrieves fresh snapshot for the failed row. Null row indicates that it was deleted.

  Since:
    3.0

### getMessage

    public java.lang.String getMessage()

  Returns descriptive message for this exception.

  Overrides:
    `getMessage` in class `CayenneRuntimeException`

### getFailedObjectId

    public ObjectId getFailedObjectId()

  Returns the ObjectId of the object that caused the OptimisticLockException.

  Since:
    3.1

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2012 Apache Cayenne. All Rights Reserved.