Class BTDailyPlanBundleCacheInitialize
java.lang.Object
overit.geocall.bl.BusinessTask<DailyPlanBundleCacheInitializeEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<DailyPlanBundleCacheInitializeEvent>
overit.geocallapp.wfm.core.ux.schedule.dailyplan.task.BTDailyPlanBundleCacheInitialize
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(DailyPlanBundleCacheInitializeEvent.class)
public class BTDailyPlanBundleCacheInitialize
extends ValidExecutionBusinessTask<DailyPlanBundleCacheInitializeEvent>
Business task for initializing the daily plan bundle cache.
Loads and populates
Loads and populates
DailyPlanBundleCache with related entities based on appointment IDs.- Since:
- 20.1
- See Also:
- GCApi:
- task
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidexecute(DailyPlanBundleCacheInitializeEvent event, PoolKit poolKit) Executes the cache initialization process.protected Collection<Long> getBundleIds(Collection<Long> bundleOperationIds, PoolKit poolKit) Retrieves bundle IDs from the provided bundle operation IDs.protected Collection<Long> getBundleOperationIds(DailyPlanBundleCacheInitializeInput input, PoolKit poolKit) Retrieves bundle operation IDs from the provided appointments.Returns exception when bundler module is not active.booleanValidates if bundler management module is active.protected Collection<BOAppointment> loadAppointments(Collection<Long> bundleOperationIds, PoolKit poolKit) Loads appointments for the specified bundle operation IDs.protected Collection<BOBundleHeader> loadBundleHeaders(Collection<Long> bundleIds, PoolKit poolKit) Loads bundle headers for the specified bundle IDs.protected Collection<BOBundleOperation> loadBundleOperations(Collection<Long> bundleIds, PoolKit poolKit) Loads bundle operations for the specified bundle IDs.protected Collection<BOInterventionResource> loadInterventionResources(Collection<Long> interventionIds, PoolKit poolKit) Loads intervention resources for the specified intervention IDs.protected Collection<InterventionAggregate> loadInterventions(Collection<Long> appointmentIds, PoolKit poolKit) Loads interventions for the specified appointment IDs.protected Collection<BOWorkOrderHeader> loadWorkOrderHeaders(Collection<Long> workOrderHeaderIds, PoolKit poolKit) Loads work order headers for the specified header IDs.protected Collection<BOWorkOrderOperation> loadWorkOrderOperations(Collection<Long> workOrderOperationIds, PoolKit poolKit) Loads work order operations for the specified operation IDs.booleanIndicates whether to throw exception if validation fails.Methods inherited from class overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask
body, checkValidExecution, getEventMethods inherited from class overit.geocall.bl.BusinessTask
start, start, startAlone, startInBackground
-
Constructor Details
-
BTDailyPlanBundleCacheInitialize
public BTDailyPlanBundleCacheInitialize()
-
-
Method Details
-
isValidExecution
public boolean isValidExecution()Validates if bundler management module is active.- Returns:
- true if bundler management is active
-
getException
Returns exception when bundler module is not active.- Returns:
DAValidateExceptionwith module not active code
-
throwExceptionIfInvalid
public boolean throwExceptionIfInvalid()Indicates whether to throw exception if validation fails.- Returns:
- false to suppress exception throwing
-
execute
protected void execute(DailyPlanBundleCacheInitializeEvent event, PoolKit poolKit) throws DAException, DAValidateException Executes the cache initialization process. Loads all related entities for the provided appointments and populates the cache.- Specified by:
executein classValidExecutionBusinessTask<DailyPlanBundleCacheInitializeEvent>- Parameters:
event- theDailyPlanBundleCacheInitializeEventpoolKit- thePoolKit- Throws:
DAException- if data access error occursDAValidateException- if validation error occurs
-
getBundleOperationIds
protected Collection<Long> getBundleOperationIds(DailyPlanBundleCacheInitializeInput input, PoolKit poolKit) throws DAValidateException, DAException Retrieves bundle operation IDs from the provided appointments.- Parameters:
input- theDailyPlanBundleCacheInitializeInputpoolKit- thePoolKit- Returns:
- collection of bundle operation IDs
- Throws:
DAValidateException- if validation error occursDAException- if data access error occurs
-
getBundleIds
protected Collection<Long> getBundleIds(Collection<Long> bundleOperationIds, PoolKit poolKit) throws DAValidateException, DAException Retrieves bundle IDs from the provided bundle operation IDs.- Parameters:
bundleOperationIds- collection of bundle operation IDspoolKit- thePoolKit- Returns:
- collection of bundle IDs
- Throws:
DAValidateException- if validation error occursDAException- if data access error occurs
-
loadBundleHeaders
protected Collection<BOBundleHeader> loadBundleHeaders(Collection<Long> bundleIds, PoolKit poolKit) throws DAValidateException, DAException Loads bundle headers for the specified bundle IDs.- Parameters:
bundleIds- collection of bundle IDspoolKit- thePoolKit- Returns:
- collection of
BOBundleHeader - Throws:
DAValidateException- if validation error occursDAException- if data access error occurs
-
loadBundleOperations
protected Collection<BOBundleOperation> loadBundleOperations(Collection<Long> bundleIds, PoolKit poolKit) throws DAValidateException, DAException Loads bundle operations for the specified bundle IDs.- Parameters:
bundleIds- collection of bundle IDspoolKit- thePoolKit- Returns:
- collection of
BOBundleOperation - Throws:
DAValidateException- if validation error occursDAException- if data access error occurs
-
loadWorkOrderOperations
protected Collection<BOWorkOrderOperation> loadWorkOrderOperations(Collection<Long> workOrderOperationIds, PoolKit poolKit) throws DAValidateException, DAException Loads work order operations for the specified operation IDs.- Parameters:
workOrderOperationIds- collection of work order operation IDspoolKit- thePoolKit- Returns:
- collection of
BOWorkOrderOperation - Throws:
DAValidateException- if validation error occursDAException- if data access error occurs
-
loadWorkOrderHeaders
protected Collection<BOWorkOrderHeader> loadWorkOrderHeaders(Collection<Long> workOrderHeaderIds, PoolKit poolKit) throws DAValidateException, DAException Loads work order headers for the specified header IDs.- Parameters:
workOrderHeaderIds- collection of work order header IDspoolKit- thePoolKit- Returns:
- collection of
BOWorkOrderHeader - Throws:
DAValidateException- if validation error occursDAException- if data access error occurs
-
loadAppointments
protected Collection<BOAppointment> loadAppointments(Collection<Long> bundleOperationIds, PoolKit poolKit) throws DAValidateException, DAException Loads appointments for the specified bundle operation IDs.- Parameters:
bundleOperationIds- collection of bundle operation IDspoolKit- thePoolKit- Returns:
- collection of
BOAppointment - Throws:
DAValidateException- if validation error occursDAException- if data access error occurs
-
loadInterventions
protected Collection<InterventionAggregate> loadInterventions(Collection<Long> appointmentIds, PoolKit poolKit) throws DAValidateException, DAException Loads interventions for the specified appointment IDs.- Parameters:
appointmentIds- collection of appointment IDspoolKit- thePoolKit- Returns:
- collection of
InterventionAggregate - Throws:
DAValidateException- if validation error occursDAException- if data access error occurs
-
loadInterventionResources
protected Collection<BOInterventionResource> loadInterventionResources(Collection<Long> interventionIds, PoolKit poolKit) throws DAValidateException, DAException Loads intervention resources for the specified intervention IDs.- Parameters:
interventionIds- collection of intervention IDspoolKit- thePoolKit- Returns:
- collection of
BOInterventionResource - Throws:
DAValidateException- if validation error occursDAException- if data access error occurs
-