EclipseLink 1.1.1_ 1.1.1.v20090430-r4097 API Reference

org.eclipse.persistence.annotations
Annotation Type OptimisticLocking


@Target(value=TYPE)
@Retention(value=RUNTIME)
public @interface OptimisticLocking

The OptimisticLocking annotation is used to specify the type of optimistic locking TopLink should use when updating or deleting entities. An optimistic-locking specification is supported on an Entity or MappedSuperclass annotation.

See Also:
org.eclipse.persistence.annotations.OptimisticLockingType.
Author:
Guy Pelletier
Since:
Oracle TopLink 11.1.1.0.0

Optional Element Summary
 boolean cascade
          (Optional) Specify where the optimistic locking policy should cascade lock.
 Column[] selectedColumns
          (Optional) For an optimistic locking policy of type SELECTED_COLUMNS, this annotation member becomes a (Required) field.
 OptimisticLockingType type
          (Optional) The type of optimistic locking policy to use.
 

type

public abstract OptimisticLockingType type
(Optional) The type of optimistic locking policy to use.

Default:
org.eclipse.persistence.annotations.OptimisticLockingType.VERSION_COLUMN

selectedColumns

public abstract Column[] selectedColumns
(Optional) For an optimistic locking policy of type SELECTED_COLUMNS, this annotation member becomes a (Required) field.

Default:
{}

cascade

public abstract boolean cascade
(Optional) Specify where the optimistic locking policy should cascade lock. Currently only supported with VERSION_COLUMN locking.

Default:
false

EclipseLink 1.1.1_ 1.1.1.v20090430-r4097 API Reference