Module eclipselink

Annotation Interface OptimisticLocking


@Target(TYPE) @Retention(RUNTIME) public @interface OptimisticLocking
The OptimisticLocking annotation is used to specify the type of optimistic locking EclipseLink should use when updating or deleting entities.

An optimistic-locking specification is supported on an Entity or MappedSuperclass annotation.

See Also:
Author:
Guy Pelletier
  • Element Details

    • type

      The type of optimistic locking policy to use.
      Default:
      VERSION_COLUMN
    • selectedColumns

      jakarta.persistence.Column[] selectedColumns
      For an optimistic locking policy of type OptimisticLockingType.SELECTED_COLUMNS, this annotation member becomes a (Required) field.
      Default:
      {}
    • cascade

      boolean cascade
      Specify where the optimistic locking policy should cascade lock.

      Currently only supported with OptimisticLockingType.VERSION_COLUMN locking.

      Default:
      false