Purpose: An implementation of the OptimisticLockingPolicy interface. This policy compares every field in the table in the WHERE clause when doing an update or a delete. If any field has been changed, an optimistic locking exception will be thrown.
Note
This policy can only be used inside a unit of work.
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | addLockValuesToTranslationRow(ObjectLevelModifyQuery query)
Implements abstract org. Implements org. |
| protected List | getFieldsToCompare(DatabaseTable table, AbstractRecord transRow, AbstractRecord modifyRow)
Implements abstract org. |
| AllFieldsLockingPolicy | back to summary |
|---|---|
| public AllFieldsLockingPolicy() PUBLIC: Create a new all fields locking policy. A field locking policy is based on locking on all fields by comparing with their previous values to detect field-level collisions. Note the unit of work must be used for all updates when using field locking. | |
| addLockValuesToTranslationRow | back to summary |
|---|---|
| public void addLockValuesToTranslationRow(ObjectLevelModifyQuery query) Implements abstract org. Implements org. INTERNAL: Values to be included in the locking mechanism are added to the translation row. Set the translation row to all the original field values.
| |
| getFieldsToCompare | back to summary |
|---|---|
| protected List Implements abstract org. INTERNAL: Returns the fields that should be compared in the where clause. In this case, it is all the fields, except for the primary key and class indicator.
| |