Interface LockingClauseStrategy

All Known Implementing Classes:
NonLockingClauseStrategy, StandardLockingClauseStrategy

public interface LockingClauseStrategy
Strategy for dealing with locking via a SQL FOR UPDATE (OF) clause.

Some dialects do not use a FOR UPDATE (OF) to apply locks - e.g., they apply locks in the FROM clause. Such dialects would return a no-op version of this contract.

Some dialects support an additional FOR SHARE (OF) clause as well to acquire non-exclusive locks. That is also handled here, varied by the requested LockMode.

Operates in 2 "phases"-

  1. collect tables which are to be locked (based on Locking.Scope, and other things)
  2. render the appropriate locking fragment
See Also:
  • Method Details

    • registerRoot

      void registerRoot(TableGroup root)
    • registerJoin

      void registerJoin(TableGroupJoin join)
    • containsOuterJoins

      boolean containsOuterJoins()
    • render

      void render(SqlAppender sqlAppender)