dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #32980
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 16781: Analytics, renamed AggregationType.AVERAGE_INT_DISAGGREGATION to AVERAGE_SUM_INT_DISAGGREGATION
------------------------------------------------------------
revno: 16781
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2014-09-23 13:41:51 +0200
message:
Analytics, renamed AggregationType.AVERAGE_INT_DISAGGREGATION to AVERAGE_SUM_INT_DISAGGREGATION
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/analytics/AggregationType.java
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/DataQueryParams.java
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultQueryPlanner.java
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/JdbcAnalyticsManager.java
dhis-2/dhis-services/dhis-service-analytics/src/test/java/org/hisp/dhis/analytics/data/AnalyticsManagerTest.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/analytics/AggregationType.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/analytics/AggregationType.java 2014-09-23 07:43:22 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/analytics/AggregationType.java 2014-09-23 11:41:51 +0000
@@ -35,7 +35,7 @@
{
SUM( "sum" ),
AVERAGE_SUM_INT( "avg_int" ), // Sum in organisation unit hierarchy
- AVERAGE_INT_DISAGGREGATION( "avg_int_disaggregation" ),
+ AVERAGE_SUM_INT_DISAGGREGATION( "avg_int_disaggregation" ),
AVERAGE_BOOL( "avg" ),
COUNT( "count" ),
STDDEV( "stddev" ),
=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/DataQueryParams.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/DataQueryParams.java 2014-09-23 07:43:22 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/DataQueryParams.java 2014-09-23 11:41:51 +0000
@@ -28,7 +28,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import static org.hisp.dhis.analytics.AggregationType.AVERAGE_INT_DISAGGREGATION;
+import static org.hisp.dhis.analytics.AggregationType.AVERAGE_SUM_INT_DISAGGREGATION;
import static org.hisp.dhis.common.DimensionType.DATASET;
import static org.hisp.dhis.common.DimensionType.ORGANISATIONUNIT;
import static org.hisp.dhis.common.DimensionType.ORGANISATIONUNIT_GROUPSET;
@@ -657,7 +657,7 @@
*/
public void replaceAggregationPeriodsWithDataPeriods( ListMap<NameableObject, NameableObject> dataPeriodAggregationPeriodMap )
{
- if ( isAggregationType( AVERAGE_INT_DISAGGREGATION ) && dataPeriodType != null )
+ if ( isAggregationType( AVERAGE_SUM_INT_DISAGGREGATION ) && dataPeriodType != null )
{
this.periodType = this.dataPeriodType.getName();
=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultQueryPlanner.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultQueryPlanner.java 2014-09-23 07:43:22 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultQueryPlanner.java 2014-09-23 11:41:51 +0000
@@ -30,7 +30,7 @@
import static org.hisp.dhis.analytics.AggregationType.AVERAGE_BOOL;
import static org.hisp.dhis.analytics.AggregationType.AVERAGE_SUM_INT;
-import static org.hisp.dhis.analytics.AggregationType.AVERAGE_INT_DISAGGREGATION;
+import static org.hisp.dhis.analytics.AggregationType.AVERAGE_SUM_INT_DISAGGREGATION;
import static org.hisp.dhis.analytics.AggregationType.SUM;
import static org.hisp.dhis.analytics.DataQueryParams.LEVEL_PREFIX;
import static org.hisp.dhis.common.DimensionalObject.CATEGORYOPTIONCOMBO_DIM_ID;
@@ -242,7 +242,7 @@
for ( DataQueryParams byAggregationType : groupedByAggregationType )
{
- if ( AVERAGE_INT_DISAGGREGATION.equals( byAggregationType.getAggregationType() ) )
+ if ( AVERAGE_SUM_INT_DISAGGREGATION.equals( byAggregationType.getAggregationType() ) )
{
List<DataQueryParams> groupedByDataPeriodType = groupByDataPeriodType( byAggregationType );
@@ -734,7 +734,7 @@
}
else
{
- aggregationType = AVERAGE_INT_DISAGGREGATION;
+ aggregationType = AVERAGE_SUM_INT_DISAGGREGATION;
}
}
}
=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/JdbcAnalyticsManager.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/JdbcAnalyticsManager.java 2014-09-23 07:43:22 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/JdbcAnalyticsManager.java 2014-09-23 11:41:51 +0000
@@ -30,7 +30,7 @@
import static org.hisp.dhis.analytics.AggregationType.AVERAGE_BOOL;
import static org.hisp.dhis.analytics.AggregationType.AVERAGE_SUM_INT;
-import static org.hisp.dhis.analytics.AggregationType.AVERAGE_INT_DISAGGREGATION;
+import static org.hisp.dhis.analytics.AggregationType.AVERAGE_SUM_INT_DISAGGREGATION;
import static org.hisp.dhis.analytics.AggregationType.COUNT;
import static org.hisp.dhis.analytics.AggregationType.MAX;
import static org.hisp.dhis.analytics.AggregationType.MIN;
@@ -161,7 +161,7 @@
public void replaceDataPeriodsWithAggregationPeriods( Map<String, Object> dataValueMap, DataQueryParams params, ListMap<NameableObject, NameableObject> dataPeriodAggregationPeriodMap )
{
- if ( params.isAggregationType( AVERAGE_INT_DISAGGREGATION ) )
+ if ( params.isAggregationType( AVERAGE_SUM_INT_DISAGGREGATION ) )
{
int periodIndex = params.getPeriodDimensionIndex();
=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/test/java/org/hisp/dhis/analytics/data/AnalyticsManagerTest.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/test/java/org/hisp/dhis/analytics/data/AnalyticsManagerTest.java 2014-09-22 13:22:24 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/test/java/org/hisp/dhis/analytics/data/AnalyticsManagerTest.java 2014-09-23 11:41:51 +0000
@@ -65,7 +65,7 @@
params.setPeriods( getList( y2012 ) );
params.setOrganisationUnits( getList( createOrganisationUnit( 'A' ) ) );
params.setDataPeriodType( new YearlyPeriodType() );
- params.setAggregationType( AggregationType.AVERAGE_INT_DISAGGREGATION );
+ params.setAggregationType( AggregationType.AVERAGE_SUM_INT_DISAGGREGATION );
Map<String, Object> dataValueMap = new HashMap<>();
dataValueMap.put( BASE_UID + "A-2012-" + BASE_UID + "A", 1d );