Top Description Methods
org.eclipse.persistence.annotations

public @Interface OptimisticLocking

extends Annotation
Annotations
@Target:TYPE
@Retention:RUNTIME
Imports
java.lang.annotation.Target, .Retention, jakarta.persistence.Column

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.
Author
Guy Pelletier
Since
Oracle TopLink 11.1.1.0.0
See Also
org.eclipse.persistence.annotations.OptimisticLockingType

Method Summary

Modifier and TypeMethod and Description
public boolean
cascade()

(Optional) Specify where the optimistic locking policy should cascade lock.

public Column[]
selectedColumns()

(Optional) For an optimistic locking policy of type SELECTED_COLUMNS, this annotation member becomes a (Required) field.

public OptimisticLockingType
type()

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

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

cascadeback to summary
public boolean cascade()

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

selectedColumnsback to summary
public Column[] selectedColumns()

(Optional) For an optimistic locking policy of type SELECTED_COLUMNS, this annotation member becomes a (Required) field.

typeback to summary
public OptimisticLockingType type()

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