Interface BindPlan


@Incubating public interface BindPlan
Represents JDBC parameter binding for graph-based operation execution
Since:
8.0
  • Method Details

    • getEntityId

      @Nullable default Object getEntityId()
      Access to the entity identifier associated with the FlushOperation that this BindPlan is associated with. May be null.
    • getEntityInstance

      @Nullable default Object getEntityInstance()
      Get the entity instance for this operation. Used for tracking entities that become managed during flush (for unresolved insert resolution).
      Returns:
      the entity instance, or null if this operation doesn't have an associated entity instance
    • getLoadedState

      @Nullable default Object[] getLoadedState()
      Get the loaded state for this operation. Used for extracting unique constraint values from DELETE operations.
      Returns:
      the entity's loaded state, or null if not available
    • getUniqueConstraintValues

      @Nullable default Object[] getUniqueConstraintValues(org.hibernate.action.queue.internal.constraint.UniqueConstraint constraint, SharedSessionContractImplementor session)

      Extract the values this operation assigns to a unique constraint.

      Entity operations expose state through getEntityInstance() and getLoadedState(). Collection row operations do not represent an entity instance, but they still need to participate in unique slot ordering.

    • getPreviousUniqueConstraintValues

      @Nullable default Object[] getPreviousUniqueConstraintValues(org.hibernate.action.queue.internal.constraint.UniqueConstraint constraint, SharedSessionContractImplementor session)

      Extract the values this operation previously assigned to a unique constraint.

      This is mainly used for non-entity UPDATE-style operations whose bind plan already knows both the old row locator and the new assigned values.

    • bindValues

      void bindValues(JdbcValueBindings valueBindings, FlushOperation flushOperation, SharedSessionContractImplementor session)
      Bind JDBC values for the operation being executed.
      Parameters:
      valueBindings - the JDBC value bindings to populate
      flushOperation - the operation being executed
      session - the session
    • getGeneratedValuesCollector

      default GeneratedValuesCollector getGeneratedValuesCollector()
    • getOperationResultChecker

      default OperationResultChecker getOperationResultChecker()
    • hasOperationResultChecker

      default boolean hasOperationResultChecker()
    • checkResult

      default boolean checkResult(FlushOperation flushOperation, int affectedRowCount, int batchPosition, String sqlString, SessionFactoryImplementor sessionFactory) throws SQLException
      Throws:
      SQLException
    • getValuesAnalysis

      default ValuesAnalysis getValuesAnalysis()