Class BTDashboardAMRLoad
java.lang.Object
overit.geocall.bl.BusinessTask<DashboardAMRLoadEvent>
overit.geocallapp.wfm.ai.bl.automaticmeterreading.task.BTDashboardAMRLoad
- All Implemented Interfaces:
Serializable,Tool
@Event(DashboardAMRLoadEvent.class)
public class BTDashboardAMRLoad
extends BusinessTask<DashboardAMRLoadEvent>
Business task to prepare the data used on Automatic Meter Reading Dashboard.
- Since:
- 12.0
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidbody(DashboardAMRLoadEvent event, PoolKit pk) Implements this method to write the specific task logic to handle the input parameter.protected DBViewgetDBRecord(HashGetter filters, PoolKit pk) protected DBViewgetGroupedData(DBView dbRecords, Long chartGroup) This method returns the data grouped by chartGroup.protected HashGettermergeRecords(DBView originalDbv) This method merge all the records together, by doing a sum of the errors for each row.Methods inherited from class overit.geocall.bl.BusinessTask
start, start, startAlone, startInBackground
-
Field Details
-
DESC_WRONG
- See Also:
-
VALUE_WRONG
- See Also:
-
NUMBER_OF_ROWS
- See Also:
-
-
Constructor Details
-
BTDashboardAMRLoad
public BTDashboardAMRLoad()
-
-
Method Details
-
body
protected void body(DashboardAMRLoadEvent event, PoolKit pk) throws DAException, DAValidateException Description copied from class:BusinessTaskImplements this method to write the specific task logic to handle the input parameter.- Specified by:
bodyin classBusinessTask<DashboardAMRLoadEvent>- Parameters:
event- the object upon which the task will works onpk- the poolkit containing the reference to the database connection that can be used- Throws:
DAException- in case of database errorDAValidateException- in case of database validation error
-
getDBRecord
protected DBView getDBRecord(HashGetter filters, PoolKit pk) throws DAException, DAValidateException - Throws:
DAExceptionDAValidateException
-
getGroupedData
This method returns the data grouped by chartGroup.- Parameters:
dbRecords- is the raw db datachartGroup- is the chart grouping- Returns:
- DBVIew grouped
-
mergeRecords
This method merge all the records together, by doing a sum of the errors for each row.- Parameters:
originalDbv-- Returns:
- the first row, because it's grouped data and we are doing that for each different row.
-