java.lang.Object
overit.geocall.bl.BusinessTask<Void>
overit.geocallapp.wfm.workorders.bl.operation.operationRequirement.migration.task.BTRepopulateOperationRequirement
All Implemented Interfaces:
Serializable, Interruptable, Tool

public class BTRepopulateOperationRequirement extends BusinessTask<Void> implements Interruptable
Task to repopulate the table RWOOPERATIONREQUIREMENT from the values contained in AWOOPERATION denormalized fields (AWOOMANDATORYIDENTNUMSET, AWOOPREFERREDIDENTNUMSET, AWOOMANDATORYTEAM).

This task is used for migration from the old denormalized structure to the new normalized RWOOPERATIONREQUIREMENT 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

    • BTRepopulateOperationRequirement

      public BTRepopulateOperationRequirement()
  • 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 dbvOperations, PoolKit pk) throws DAValidateException, DAException, SQLException
      Populates the RWOOPERATIONREQUIREMENT table from the extracted operations.

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

      Parameters:
      dbvOperations - the DBView containing operations 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