Class BTSchedulableActivitiesSearch
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
This task performs a comprehensive search of work order operations that can be scheduled, applying various filters including operation centers, work orders, request types, service types, technical object types, activities, and operation statuses. The search supports date range filtering and pagination.
Required fields:
- None - all filter fields are optional
Permission:
- Validated through
ValidPermissionBusinessTask
- Since:
- 22.0
- See Also:
- GCApi:
- task
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List<BOActivity> protected List<BOOperationCenter> protected List<BOWorkOrderOperationStatus> protected List<BORequestType> protected List<BOServiceType> protected List<BOTechnicalObjectType> protected List<BOWorkOrderHeader> Fields inherited from class overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask
LOG -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionConverts the filter to search parameters for the DAO query.protected voidexecute(SchedulableActivitiesSearchEvent event, PoolKit poolKit) Executes the search for schedulable activities.protected DBViewExecutes the query to search for schedulable activities.protected voidinitializeRelatedEntities(SchedulableActivitiesSearchFilter filter, PoolKit poolKit) Initializes related entities by searching for all filter-related business objects.booleanDetermines whether the current state is valid for execution.protected voidsearchActivities(SchedulableActivitiesSearchFilter filter, PoolKit poolKit) Searches for activities based on the filter criteria.protected voidsearchAddresses(SchedulableActivitiesSearchFilter filter, PoolKit poolKit) Searches for addresses based on the filter criteria.protected voidsearchOperationCenters(SchedulableActivitiesSearchFilter filter, PoolKit poolKit) Searches for operation centers based on the filter criteria.protected voidsearchRequestTypes(SchedulableActivitiesSearchFilter filter, PoolKit poolKit) Searches for request types based on the filter criteria.protected voidsearchServiceTypes(SchedulableActivitiesSearchFilter filter, PoolKit poolKit) Searches for service types based on the filter criteria.protected voidsearchTechnicalObjects(SchedulableActivitiesSearchFilter filter, PoolKit poolKit) protected voidsearchTechnicalObjectTypes(SchedulableActivitiesSearchFilter filter, PoolKit poolKit) Searches for technical object types (assets and accounts) based on the filter criteria.protected voidsearchWorkOrderHeaders(SchedulableActivitiesSearchFilter filter, PoolKit poolKit) Searches for work order headers based on the filter criteria.protected voidsearchWorkOrderOperationStatus(SchedulableActivitiesSearchFilter filter, PoolKit poolKit) Searches for work order operation statuses based on the filter criteria.Methods inherited from class overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask
checkValidExecution, getException, throwExceptionIfInvalidMethods inherited from class overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask
body, getEventMethods inherited from class overit.geocall.bl.BusinessTask
start, start, startAlone, startInBackground
-
Field Details
-
operationCenterFilters
-
workOrderHeaderFilters
-
requestTypeFilters
-
serviceTypeFilters
-
technicalObjectTypeFilters
-
accountFilters
-
assetFilters
-
addressFilters
-
activityFilters
-
operationStatusFilters
-
-
Constructor Details
-
BTSchedulableActivitiesSearch
public BTSchedulableActivitiesSearch()
-
-
Method Details
-
execute
protected void execute(SchedulableActivitiesSearchEvent event, PoolKit poolKit) throws DAException, DAValidateException Executes the search for schedulable activities.- Specified by:
executein classValidExecutionBusinessTask<SchedulableActivitiesSearchEvent>- Parameters:
event- theSchedulableActivitiesSearchEventpoolKit- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
initializeRelatedEntities
protected void initializeRelatedEntities(SchedulableActivitiesSearchFilter filter, PoolKit poolKit) throws DAValidateException, DAException Initializes related entities by searching for all filter-related business objects.This method performs searches for operation centers, work order headers, operation statuses, request types, service types, technical object types, and activities based on the provided filter. The results are stored in the corresponding filter fields for later use in query construction.
- Parameters:
filter- the search filter containing the criteriapoolKit- the pool kit for database access- Throws:
DAValidateException- if validation fails during entity searchesDAException- if a database error occurs during entity searches
-
searchOperationCenters
protected void searchOperationCenters(SchedulableActivitiesSearchFilter filter, PoolKit poolKit) throws DAValidateException, DAException Searches for operation centers based on the filter criteria.If operation center IDs are specified in the filter, this method retrieves the corresponding operation center business objects and stores them in
operationCenterFilters.- Parameters:
filter- the search filter containing operation center IDspoolKit- the pool kit for database access- Throws:
DAValidateException- if validation fails during the searchDAException- if a database error occurs during the search
-
searchWorkOrderHeaders
protected void searchWorkOrderHeaders(SchedulableActivitiesSearchFilter filter, PoolKit poolKit) throws DAException, DAValidateException Searches for work order headers based on the filter criteria.This method searches for work orders by ID, source, or urgency. If any matching work orders are found, they are stored in
workOrderHeaderFilters.- Parameters:
filter- the search filter containing work order criteriapoolKit- the pool kit for database access- Throws:
DAException- if a database error occurs during the searchDAValidateException- if validation fails during the search
-
searchWorkOrderOperationStatus
protected void searchWorkOrderOperationStatus(SchedulableActivitiesSearchFilter filter, PoolKit poolKit) throws DAException, DAValidateException Searches for work order operation statuses based on the filter criteria.If operation status IDs are specified in the filter, this method retrieves the corresponding status business objects and stores them in
operationStatusFilters.- Parameters:
filter- the search filter containing operation status IDspoolKit- the pool kit for database access- Throws:
DAException- if a database error occurs during the searchDAValidateException- if validation fails during the search
-
searchRequestTypes
protected void searchRequestTypes(SchedulableActivitiesSearchFilter filter, PoolKit poolKit) throws DAException, DAValidateException Searches for request types based on the filter criteria.If request type IDs are specified in the filter, this method retrieves the corresponding request type business objects and stores them in
requestTypeFilters.- Parameters:
filter- the search filter containing request type IDspoolKit- the pool kit for database access- Throws:
DAException- if a database error occurs during the searchDAValidateException- if validation fails during the search
-
searchServiceTypes
protected void searchServiceTypes(SchedulableActivitiesSearchFilter filter, PoolKit poolKit) throws DAException, DAValidateException Searches for service types based on the filter criteria.If service type IDs are specified in the filter, this method retrieves the corresponding service type business objects and stores them in
serviceTypeFilters.- Parameters:
filter- the search filter containing service type IDspoolKit- the pool kit for database access- Throws:
DAException- if a database error occurs during the searchDAValidateException- if validation fails during the search
-
searchTechnicalObjectTypes
protected void searchTechnicalObjectTypes(SchedulableActivitiesSearchFilter filter, PoolKit poolKit) throws DAException, DAValidateException Searches for technical object types (assets and accounts) based on the filter criteria.This method combines both account type IDs and asset type IDs from the filter and retrieves the corresponding technical object type business objects, storing them in
technicalObjectTypeFilters.- Parameters:
filter- the search filter containing account type and asset type IDspoolKit- the pool kit for database access- Throws:
DAException- if a database error occurs during the searchDAValidateException- if validation fails during the search
-
searchTechnicalObjects
protected void searchTechnicalObjects(SchedulableActivitiesSearchFilter filter, PoolKit poolKit) throws DAException, DAValidateException - Throws:
DAExceptionDAValidateException
-
searchAddresses
protected void searchAddresses(SchedulableActivitiesSearchFilter filter, PoolKit poolKit) throws DAException, DAValidateException Searches for addresses based on the filter criteria.If address IDs are specified in the filter, this method retrieves the corresponding address business objects and stores them in
addressFilters.- Parameters:
filter- the search filter containing address IDspoolKit- the pool kit for database access- Throws:
DAException- if a database error occurs during the searchDAValidateException- if validation fails during the search
-
searchActivities
protected void searchActivities(SchedulableActivitiesSearchFilter filter, PoolKit poolKit) throws DAException, DAValidateException Searches for activities based on the filter criteria.If activity IDs are specified in the filter, this method retrieves the corresponding activity business objects and stores them in
activityFilters.- Parameters:
filter- the search filter containing activity IDspoolKit- the pool kit for database access- Throws:
DAException- if a database error occurs during the searchDAValidateException- if validation fails during the search
-
convertFilterToParams
Converts the filter to search parameters for the DAO query.This method transforms the filter objects (operation centers, work orders, etc.) into a map of search parameters that can be used by
DAOSearchSchedulingActivities. It extracts IDs from the filtered business objects and includes date range parameters.- Parameters:
filter- the search filter to convert- Returns:
- a map of search parameters for the DAO query
-
executeQuery
protected DBView executeQuery(PoolKit poolKit, Map<String, Object> searchParams, Page page) throws DAException, DAValidateExceptionExecutes the query to search for schedulable activities.This method uses
DAOSearchSchedulingActivitiesto perform the database query with the provided search parameters and pagination settings. After executing the query, it callsto allow for additional data enrichment.invalid reference
#completeSchedulingActivitiesDBView(DBView)- Parameters:
poolKit- the pool kit for database accesssearchParams- the search parameters mappage- the pagination settings- Returns:
- the DBView containing the query results
- Throws:
DAException- if a database error occurs during the queryDAValidateException- if validation fails during the query
-
isValidExecution
public boolean isValidExecution()Description copied from interface:ValidExecutionDetermines whether the current state is valid for execution.- Returns:
- true if execution is valid, false otherwise
-