dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #10529
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2889: Quick fix data browser.
------------------------------------------------------------
revno: 2889
committer: Jason P. Pickering <jason.p.pickering@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2011-02-21 19:22:36 +0200
message:
Quick fix data browser.
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/databrowser/DataBrowserTable.java
dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/databrowser/DefaultDataBrowserService.java
dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/databrowser/jdbc/StatementManagerDataBrowserStore.java
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/databrowser/DataBrowserTable.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/databrowser/DataBrowserTable.java 2011-02-21 14:56:14 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/databrowser/DataBrowserTable.java 2011-02-21 17:22:36 +0000
@@ -187,7 +187,7 @@
makeEmptyCol = false;
for ( List<String> rowItem : this.counts )
{
- rowItem.add( addZeros ? "0": "" );
+ rowItem.add( addZeros ? "0" : "" );
}
if ( hasColumnName )
{
=== modified file 'dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/databrowser/DefaultDataBrowserService.java'
--- dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/databrowser/DefaultDataBrowserService.java 2011-02-21 14:56:14 +0000
+++ dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/databrowser/DefaultDataBrowserService.java 2011-02-21 17:22:36 +0000
@@ -183,7 +183,6 @@
dataBrowserStore.setCountDataElementsForOrgUnitBetweenPeriods( table, orgUnitId, betweenPeriodIds );
-
return table;
}
=== modified file 'dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/databrowser/jdbc/StatementManagerDataBrowserStore.java'
--- dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/databrowser/jdbc/StatementManagerDataBrowserStore.java 2011-02-21 14:56:14 +0000
+++ dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/databrowser/jdbc/StatementManagerDataBrowserStore.java 2011-02-21 17:22:36 +0000
@@ -347,9 +347,7 @@
timer.start();
ResultSet resultSet = getScrollableResult(sql, holder);
table.addQueryTime(timer.getMilliSec());
-
table.incrementQueryCount();
-
numResults = table.addColumnToAllRows( resultSet, false );
} catch (SQLException e) {
throw new RuntimeException("Failed to get aggregated data value\n"
@@ -357,6 +355,7 @@
} finally {
holder.close();
}
+ table.setNumResults( numResults );
return numResults;
}
@@ -483,6 +482,7 @@
DataBrowserTable table = new DataBrowserTable();
Timer timer = new Timer();
timer.start();
+
try {
ResultSet resultSet = getScrollableResult(sqlsb.toString(), holder);
@@ -561,8 +561,8 @@
} finally {
holder.close();
}
-
- table.setNumResults(numResults);
+ table.setNumResults( numResults );
+
return numResults;
}