Class BTDataCollectionSheetMassiveCodeGeneration
java.lang.Object
overit.geocall.bl.BusinessTask<Void>
overit.geocallapp.wfm.orchestrator.documents.mobileforms.bl.instance.task.BTDataCollectionSheetMassiveCodeGeneration
- All Implemented Interfaces:
Serializable,Interruptable,Tool
public class BTDataCollectionSheetMassiveCodeGeneration
extends BusinessTask<Void>
implements Interruptable
Business task for massive code generation for
This task generates codes for all existing data collection sheets that don't have a code yet.
BODataCollectionSheet. This task generates codes for all existing data collection sheets that don't have a code yet.
- Since:
- 22.0
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final intprotected booleanprotected static final LogChannelprotected LogHelperprotected MobileFormsHelperprotected BOCache<BOOperationCenter> protected TimeSlotprotected static final longprotected int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidExecutes the massive code generation for all data collection sheets without a code.protected voidcloseLog()Closes the log for the process.protected voidFrees the time slot.protected BOOperationCentergetOperationCenter(BODataCollectionSheet sheet, PoolKit poolKit) protected Stringprotected voidinit()Initializes the task.protected voidInitializes the log for the process.booleanChecks if the task has been interrupted.protected List<BODataCollectionSheet> loadSheetsWithoutCode(PoolKit poolKit) Loads data collection sheets without a code.voidInterrupts the task.protected voidprocessBatch(List<BODataCollectionSheet> sheets, PoolKit poolKit) Processes a batch of sheets, generating and updating their codes.Methods inherited from class overit.geocall.bl.BusinessTask
start, start, startAlone, startInBackground
-
Field Details
-
LOG
-
BATCH_SIZE
protected static final int BATCH_SIZE- See Also:
-
TIMESLOT_DURATION
protected static final long TIMESLOT_DURATION- See Also:
-
timeSlot
-
logHelper
-
mobileFormsHelper
-
operationCenterBOCache
-
interrupt
protected boolean interrupt -
updatedRecords
protected int updatedRecords
-
-
Constructor Details
-
BTDataCollectionSheetMassiveCodeGeneration
public BTDataCollectionSheetMassiveCodeGeneration()
-
-
Method Details
-
body
Executes the massive code generation for all data collection sheets without a code.- Specified by:
bodyin classBusinessTask<Void>- Parameters:
event- the event (Void)poolKit- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
initializeLog
Initializes the log for the process.- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
init
protected void init()Initializes the task. -
loadSheetsWithoutCode
protected List<BODataCollectionSheet> loadSheetsWithoutCode(PoolKit poolKit) throws DAException, DAValidateException Loads data collection sheets without a code.- Parameters:
poolKit- thePoolKit- Returns:
- the DBView with sheets to process
- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
processBatch
protected void processBatch(List<BODataCollectionSheet> sheets, PoolKit poolKit) throws DAException, SQLException, DAValidateException Processes a batch of sheets, generating and updating their codes.- Parameters:
sheets- the DBView with sheets to processpoolKit- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exceptionSQLException- the SQL exception
-
getOperationCenter
protected BOOperationCenter getOperationCenter(BODataCollectionSheet sheet, PoolKit poolKit) throws DAException, DAValidateException - Throws:
DAExceptionDAValidateException
-
getSqlStatement
-
freeTimeSlot
protected void freeTimeSlot()Frees the time slot. -
closeLog
Closes the log for the process.- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
isInterrupted
public boolean isInterrupted()Checks if the task has been interrupted.- Returns:
- true if interrupted, false otherwise
-
pleaseInterrupt
public void pleaseInterrupt()Interrupts the task.- Specified by:
pleaseInterruptin interfaceInterruptable
-