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:
  Serializable

    public class OptimisticLockException

extends CayenneRuntimeException

An exception thrown on optimistic lock failure.

Since:
  1.1
See Also:
  Serialized Form

Field Summary
`protected Map` | `qualifierSnapshot`
`protected String` | `querySQL`
`protected DbEntity` | `rootEntity`

Constructor Summary
`OptimisticLockException(DbEntity rootEntity, String querySQL, Map qualifierSnapshot)`

Method Summary
`Map<?,?>` | `getFreshSnapshot(ObjectContext context)` Retrieves fresh snapshot for the failed row.
`String` | `getMessage()` Returns descriptive message for this exception.
`Map` | `getQualifierSnapshot()`
`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

### querySQL

    protected String querySQL

### rootEntity

    protected DbEntity rootEntity

### qualifierSnapshot

    protected Map qualifierSnapshot

Constructor Detail

### OptimisticLockException

    public OptimisticLockException(DbEntity rootEntity,
                                   String querySQL,
                                   Map qualifierSnapshot)

Method Detail

### getQualifierSnapshot

    public Map getQualifierSnapshot()

### getQuerySQL

    public String getQuerySQL()

### getFreshSnapshot

    public Map<?,?> getFreshSnapshot(ObjectContext context)

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

  Since:
    3.0

### getMessage

    public String getMessage()

  Returns descriptive message for this exception.

  Overrides:
    `getMessage` in class `CayenneRuntimeException`

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-2011 Apache Cayenne. All Rights Reserved.