Class SqlBatchUpdateQuery

All Implemented Interfaces:
BatchModifyQuery, BatchUpdateQuery, Query

public class SqlBatchUpdateQuery extends SqlBatchModifyQuery implements BatchUpdateQuery
A query that performs batch update operations using SQL statements.

This class extends SqlBatchModifyQuery to provide functionality for executing batch UPDATE statements. It initializes the SQL kind to SqlKind.UPDATE to indicate that this query performs UPDATE operations.

  • Constructor Details

    • SqlBatchUpdateQuery

      public SqlBatchUpdateQuery()
      Constructs a new instance.

      This constructor initializes the query with SqlKind.UPDATE to indicate that it performs UPDATE operations.

  • Method Details

    • incrementVersions

      public void incrementVersions()
      Increments the version numbers for all entities in the batch.

      This method is called after executing the batch to update the version numbers in the entity objects, ensuring they match the values in the database after the update. This is important for optimistic concurrency control.

      This implementation does nothing because this query does not support version incrementation.

      Specified by:
      incrementVersions in interface BatchUpdateQuery