Class BTRepopulateBundleRequirement

java.lang.Object
overit.geocall.bl.BusinessTask<Void>
overit.geocallapp.wfm.bundler.bl.bundleRequirement.migration.task.BTRepopulateBundleRequirement
All Implemented Interfaces:
Serializable, Interruptable, Tool

public class BTRepopulateBundleRequirement extends BusinessTask<Void> implements Interruptable
Task to repopulate the table RBUNREQUIREMENT from the values contained in ABUNDLE denormalized fields (ABUNMANDATORYRESOURCES, ABUNPREFERREDRESOURCES).

This task is used for migration from the old denormalized structure to the new normalized RBUNREQUIREMENT table.

Since:
22.0
See Also:
GCApi:
task
  • Field Details

    • LOG

      protected static final LogChannel LOG
    • interrupt

      protected boolean interrupt
    • timeSlot

      protected TimeSlot timeSlot
    • deletedRows

      protected int deletedRows
    • insertedRows

      protected int insertedRows
  • Constructor Details

    • BTRepopulateBundleRequirement

      public BTRepopulateBundleRequirement()
  • Method Details

    • body

      protected void body(Void i, PoolKit pk) throws DAException, DAValidateException
      Description copied from class: BusinessTask
      Implements this method to write the specific task logic to handle the input parameter.
      Specified by:
      body in class BusinessTask<Void>
      Parameters:
      i - the object upon which the task will works on
      pk - the poolkit containing the reference to the database connection that can be used
      Throws:
      DAException - in case of database error
      DAValidateException - in case of database validation error
    • populateTable

      protected void populateTable(DBView dbvBundles, PoolKit pk) throws DAValidateException, DAException, SQLException
      Populates the RBUNREQUIREMENT table from the extracted bundles.

      For each bundle with denormalized requirement data, deletes existing records and inserts new ones based on the denormalized field values.

      Parameters:
      dbvBundles - the DBView containing bundles with denormalized requirement data
      pk - the PoolKit for database operations
      Throws:
      DAValidateException - if validation fails
      DAException - if a database error occurs
      SQLException - if a SQL error occurs
    • pleaseInterrupt

      public void pleaseInterrupt()
      Specified by:
      pleaseInterrupt in interface Interruptable