← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 19999: Report table, removed unused properties

 

------------------------------------------------------------
revno: 19999
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2015-09-04 16:39:54 +0200
message:
  Report table, removed unused properties
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/reporttable/ReportTable.java
  dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/importer/ReportTableImporter.java
  dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/reporttable/ReportTableStoreTest.java
  dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/ReportTableBatchHandler.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/reporttable/ReportTable.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/reporttable/ReportTable.java	2015-08-04 16:05:37 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/reporttable/ReportTable.java	2015-09-04 14:39:54 +0000
@@ -505,51 +505,6 @@
         return relativeOrganisationUnit != null ? relativeOrganisationUnit.getName() : EMPTY;
     }
 
-    public boolean isDoIndicators()
-    {
-        return columnDimensions.contains( DATA_X_DIM_ID );
-    }
-
-    public void setDoIndicators( boolean doIndicators )
-    {
-        this.columnDimensions.remove( DATA_X_DIM_ID );
-
-        if ( doIndicators )
-        {
-            this.columnDimensions.add( DATA_X_DIM_ID );
-        }
-    }
-
-    public boolean isDoPeriods()
-    {
-        return columnDimensions.contains( PERIOD_DIM_ID );
-    }
-
-    public void setDoPeriods( boolean doPeriods )
-    {
-        this.columnDimensions.remove( PERIOD_DIM_ID );
-
-        if ( doPeriods )
-        {
-            this.columnDimensions.add( PERIOD_DIM_ID );
-        }
-    }
-
-    public boolean isDoUnits()
-    {
-        return columnDimensions.contains( ORGUNIT_DIM_ID );
-    }
-
-    public void setDoUnits( boolean doUnits )
-    {
-        this.columnDimensions.remove( ORGUNIT_DIM_ID );
-
-        if ( doUnits )
-        {
-            this.columnDimensions.add( ORGUNIT_DIM_ID );
-        }
-    }
-
     /**
      * Adds an empty list of NameableObjects to the given list if empty.
      */

=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/importer/ReportTableImporter.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/importer/ReportTableImporter.java	2015-03-31 15:22:00 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/importer/ReportTableImporter.java	2015-09-04 14:39:54 +0000
@@ -90,10 +90,6 @@
         match.setName( object.getName() );
         match.setRegression( object.isRegression() );
 
-        match.setDoIndicators( match.isDoIndicators() );
-        match.setDoPeriods( match.isDoPeriods() );
-        match.setDoUnits( match.isDoUnits() );
-
         match.getRelatives().setLastMonth( object.getRelatives().isLastMonth() );
         match.getRelatives().setMonthsThisYear( object.getRelatives().isMonthsThisYear() );
         match.getRelatives().setQuartersThisYear( object.getRelatives().isQuartersThisYear() );
@@ -128,19 +124,6 @@
             return false;
         }
 
-        if ( object.isDoIndicators() != existing.isDoIndicators() )
-        {
-            return false;
-        }
-        if ( object.isDoPeriods() != existing.isDoPeriods() )
-        {
-            return false;
-        }
-        if ( object.isDoUnits() != existing.isDoUnits() )
-        {
-            return false;
-        }
-
         return true;
     }
 }

=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/reporttable/ReportTableStoreTest.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/reporttable/ReportTableStoreTest.java	2015-09-03 03:11:47 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/reporttable/ReportTableStoreTest.java	2015-09-04 14:39:54 +0000
@@ -210,26 +210,17 @@
         assertEquals( indicators, reportTableA.getIndicators() );
         assertEquals( periods, reportTableA.getPeriods() );
         assertEquals( units, reportTableA.getOrganisationUnits() );
-        assertEquals( true, reportTableA.isDoIndicators() );
-        assertEquals( true, reportTableA.isDoPeriods() );
-        assertEquals( false, reportTableA.isDoUnits() );
         assertEquals( relativesA, reportTableA.getRelatives() );
         
         assertEquals( "Prescriptions", reportTableB.getName() );
         assertEquals( dataElements, reportTableB.getDataElements() );
         assertEquals( periods, reportTableB.getPeriods() );
         assertEquals( units, reportTableB.getOrganisationUnits() );
-        assertEquals( false, reportTableB.isDoIndicators() );
-        assertEquals( false, reportTableB.isDoPeriods() );
-        assertEquals( true, reportTableB.isDoUnits() );
         assertEquals( relativesB, reportTableB.getRelatives() );
 
         assertEquals( "Assualt", reportTableC.getName() );
         assertEquals( periods, reportTableC.getPeriods() );
         assertEquals( units, reportTableC.getOrganisationUnits() );
-        assertEquals( false, reportTableC.isDoIndicators() );
-        assertEquals( false, reportTableC.isDoPeriods() );
-        assertEquals( true, reportTableC.isDoUnits() );
         assertEquals( relativesC, reportTableC.getRelatives() );
     }
 

=== modified file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/ReportTableBatchHandler.java'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/ReportTableBatchHandler.java	2015-03-31 15:22:00 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/ReportTableBatchHandler.java	2015-09-04 14:39:54 +0000
@@ -95,9 +95,6 @@
         statementBuilder.setColumn( "code" );
         statementBuilder.setColumn( "name" );
         statementBuilder.setColumn( "regression" );
-        statementBuilder.setColumn( "doindicators" );
-        statementBuilder.setColumn( "doperiods" );
-        statementBuilder.setColumn( "dounits" );
         
         statementBuilder.setColumn( "reportingmonth" );
         statementBuilder.setColumn( "monthsthisyear" );
@@ -119,9 +116,6 @@
         statementBuilder.setValue( reportTable.getCode() );
         statementBuilder.setValue( reportTable.getName() );
         statementBuilder.setValue( reportTable.isRegression() );
-        statementBuilder.setValue( reportTable.isDoIndicators() );
-        statementBuilder.setValue( reportTable.isDoPeriods() );
-        statementBuilder.setValue( reportTable.isDoUnits() );
         
         statementBuilder.setValue( reportTable.getRelatives().isLastMonth() );
         statementBuilder.setValue( reportTable.getRelatives().isMonthsThisYear() );