Class StandardLockingClauseStrategies

java.lang.Object
org.hibernate.dialect.lock.spi.StandardLockingClauseStrategies

@Incubating(since="7.1", group="dialect-locking") @SPI(USE) public final class StandardLockingClauseStrategies extends Object

Creates the standard per-translation locking-clause strategies.

Use none() when the Dialect applies locking outside a statement-level clause. Use standard(LockingClauseRenderer, PessimisticLockKind, RowLockStrategy, LockOptions, Set) to compose a provider-owned LockingClauseRenderer with Hibernate's standard root and join target collection.

Since:
8.0
See Also:
  • Method Details

    • none

      public static LockingClauseStrategy none()
      Returns the reusable strategy which collects no targets and renders nothing.
    • standard

      public static LockingClauseStrategy standard(LockingClauseRenderer lockingClauseRenderer, PessimisticLockKind lockKind, RowLockStrategy rowLockStrategy, LockOptions lockOptions, Set<NavigablePath> rootsForLocking)

      Creates a strategy for one SQL AST translation.

      The lock options are read when this method is invoked. The root-path set is copied so later caller mutation cannot change the translation. A null root-path set, as produced by an SQL AST with no selected entity roots, is treated as empty.