Class MutationBindTemplate

java.lang.Object
org.hibernate.action.queue.spi.bind.MutationBindTemplate

public final class MutationBindTemplate extends Object

Ordered binding slots for a mutation operation.

A template is created from the ordered parameter binders of a PreparableMutationOperation when every binder is a ColumnValueParameter. In that case, JdbcValueBindings can bind values by array slot instead of building descriptor-based BindingGroup instances for each row.

Templates are cached per mutation operation. Each template is immutable after construction and may be reused by many per-row binding instances.

  • Method Details

    • forOperation

      public static MutationBindTemplate forOperation(PreparableMutationOperation operation)
      Resolve the slot template for the given mutation operation.
      Returns:
      the cached template, or null when the operation contains a non-column-value parameter binder and must use descriptor-based binding
    • slots

      public BindSlot[] slots()

      The mutation's ordered JDBC binding slots.

      The returned array is owned by this immutable template. Callers use the array indexes as stable positions in their per-row value storage.

    • findSlot

      public BindSlot findSlot(String columnName, ParameterUsage usage)
      Find the slot for a column and parameter usage.
      Returns:
      the matching slot, or null if the mutation operation does not contain a parameter for the requested column and usage