summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk/epsdk-analytics/src/main
diff options
context:
space:
mode:
authorSunder Tattavarada <statta@research.att.com>2020-05-19 17:53:53 +0000
committerGerrit Code Review <gerrit@onap.org>2020-05-19 17:53:53 +0000
commitcce0f0aad94690b67024dab191988814ded1fb74 (patch)
tree54d642ae6875c44b2186efc6c998259616384da7 /ecomp-sdk/epsdk-analytics/src/main
parentd5f6516c56b2912589a676385e22233916a79273 (diff)
parenta5f3b926d32cceab130096d0e3b687e0305c2059 (diff)
Merge "Setting reportTotalDataRows to reportJSONRuntime"
Diffstat (limited to 'ecomp-sdk/epsdk-analytics/src/main')
-rw-r--r--ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ReportRuntime.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ReportRuntime.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ReportRuntime.java
index b6f944a7..29c5f3c1 100644
--- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ReportRuntime.java
+++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ReportRuntime.java
@@ -2791,6 +2791,7 @@ public List getMapMarkers(ReportData rd, org.onap.portalsdk.analytics.xmlobj.Rep
reportJSONRuntime.setTotalRows(getReportDataSize());
ArrayList<ColumnHeader> colList = new ArrayList<>();
ArrayList<Map<String,Object>> reportDataRows = new ArrayList<>();
+ ArrayList<Map<String,Object>> reportTotalDataRows = new ArrayList<Map<String,Object>>();
for(rd.reportColumnHeaderRows.resetNext(); rd.reportColumnHeaderRows.hasNext(); ) {
count++;
ColumnHeaderRow chr = rd.reportColumnHeaderRows.getNext();
@@ -2815,10 +2816,27 @@ public List getMapMarkers(ReportData rd, org.onap.portalsdk.analytics.xmlobj.Rep
reportDataRows.add(dvJSON);
}
}
+ if(rd.reportDataTotalRow != null) {
+ for(rd.reportDataTotalRow.resetNext(); rd.reportDataTotalRow.hasNext(); count++) {
+ dvJSON = new HashMap<String,Object>();
+ DataRow dr = rd.reportDataTotalRow.getNext();
+ for(dr.resetNext(); dr.hasNext(); ) {
+ DataValue dv = dr.getNext();
+ try {
+ dvJSON.put(dv.getColId(), dv);
+ } catch (Exception ex) {
+ ex.printStackTrace();
+
+ }
+ }
+ reportTotalDataRows.add(dvJSON);
+ }
+ }
reportJSONRuntime.setReportDataColumns(colList);
reportJSONRuntime.setReportDataRows(reportDataRows);
//reportJSONRuntime.setSqlWhole(getWholeSQL());
reportJSONRuntime.setPageSize(getPageSize());
+ reportJSONRuntime.setReportTotalDataRows(reportTotalDataRows);
}