← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 18787: Renamed reportingMonth to lastMonth etc in RelativePeriods.java

 

------------------------------------------------------------
revno: 18787
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2015-03-31 17:22:00 +0200
message:
  Renamed reportingMonth to lastMonth etc in RelativePeriods.java
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/RelativePeriods.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java
  dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/period/hibernate/RelativePeriods.hbm.xml
  dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/ChartConverter.java
  dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/ReportTableConverter.java
  dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/importer/ChartImporter.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-services/dhis-service-reporting/src/test/java/org/hisp/dhis/reporttable/ReportTableTest.java
  dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/RelativePeriodsBatchHandler.java
  dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/ReportTableBatchHandler.java
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/AggregatedValueController.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/period/RelativePeriods.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/RelativePeriods.java	2015-03-26 20:17:08 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/RelativePeriods.java	2015-03-31 15:22:00 +0000
@@ -55,9 +55,9 @@
     private static final List<Period> NO = new ArrayList<>();
     
     public static final String LAST_WEEK = "last_week";
-    public static final String REPORTING_MONTH = "reporting_month";
-    public static final String REPORTING_BIMONTH = "reporting_bimonth";
-    public static final String REPORTING_QUARTER = "reporting_quarter";
+    public static final String LAST_MONTH = "reporting_month";
+    public static final String LAST_BIMONTH = "reporting_bimonth";
+    public static final String LAST_QUARTER = "reporting_quarter";
     public static final String LAST_SIXMONTH = "last_sixmonth";
     public static final String THIS_YEAR = "year";
     public static final String LAST_YEAR = "last_year";
@@ -155,11 +155,11 @@
 
     private int id;
     
-    private boolean reportingMonth = false; // TODO rename to lastMonth
-
-    private boolean reportingBimonth = false; // TODO rename to lastBimonth
-
-    private boolean reportingQuarter = false; // TODO rename to lastQuarter
+    private boolean lastMonth = false;
+
+    private boolean lastBimonth = false;
+
+    private boolean lastQuarter = false;
 
     private boolean lastSixMonth = false;
 
@@ -212,9 +212,9 @@
     }
 
     /**
-     * @param reportingMonth        reporting month
-     * @param reportingBimonth      reporting bi-month
-     * @param reportingQuarter      reporting quarter
+     * @param lastMonth             last month
+     * @param lastBimonth           last bi-month
+     * @param lastQuarter           last quarter
      * @param lastSixMonth          last six month
      * @param monthsThisYear        months this year
      * @param quartersThisYear      quarters this year
@@ -236,16 +236,16 @@
      * @param last12Weeks           last 12 weeks
      * @param last52Weeks           last 52 weeks
      */
-    public RelativePeriods( boolean reportingMonth, boolean reportingBimonth, boolean reportingQuarter, boolean lastSixMonth,
+    public RelativePeriods( boolean lastMonth, boolean lastBimonth, boolean lastQuarter, boolean lastSixMonth,
                             boolean monthsThisYear, boolean quartersThisYear, boolean thisYear,
                             boolean monthsLastYear, boolean quartersLastYear, boolean lastYear, boolean last5Years,
                             boolean last12Months, boolean last6Months, boolean last3Months, boolean last6BiMonths, boolean last4Quarters, boolean last2SixMonths,
                             boolean thisFinancialYear, boolean lastFinancialYear, boolean last5FinancialYears, 
                             boolean lastWeek, boolean last4Weeks, boolean last12Weeks, boolean last52Weeks )
     {
-        this.reportingMonth = reportingMonth;
-        this.reportingBimonth = reportingBimonth;
-        this.reportingQuarter = reportingQuarter;
+        this.lastMonth = lastMonth;
+        this.lastBimonth = lastBimonth;
+        this.lastQuarter = lastQuarter;
         this.lastSixMonth = lastSixMonth;
         this.monthsThisYear = monthsThisYear;
         this.quartersThisYear = quartersThisYear;
@@ -278,9 +278,9 @@
      */
     public RelativePeriods clear()
     {
-        this.reportingMonth = false;
-        this.reportingBimonth = false;
-        this.reportingQuarter = false;
+        this.lastMonth = false;
+        this.lastBimonth = false;
+        this.lastQuarter = false;
         this.lastSixMonth = false;
         this.monthsThisYear = false;
         this.quartersThisYear = false;
@@ -326,17 +326,17 @@
             return PeriodType.getPeriodTypeByName( WeeklyPeriodType.NAME );
         }
         
-        if ( isReportingMonth() || isLast12Months() || isLast6Months() || isLast3Months() )
+        if ( isLastMonth() || isLast12Months() || isLast6Months() || isLast3Months() )
         {
             return PeriodType.getPeriodTypeByName( MonthlyPeriodType.NAME );
         }
 
-        if ( isReportingBimonth() || isLast6BiMonths() )
+        if ( isLastBimonth() || isLast6BiMonths() )
         {
             return PeriodType.getPeriodTypeByName( BiMonthlyPeriodType.NAME );
         }
 
-        if ( isReportingQuarter() || isLast4Quarters() )
+        if ( isLastQuarter() || isLast4Quarters() )
         {
             return PeriodType.getPeriodTypeByName( QuarterlyPeriodType.NAME );
         }
@@ -464,19 +464,19 @@
         
         List<Period> periods = new ArrayList<>();
 
-        if ( isReportingMonth() )
-        {
-            periods.add( getRelativePeriod( new MonthlyPeriodType(), REPORTING_MONTH, date, dynamicNames, format ) );
-        }
-
-        if ( isReportingBimonth() )
-        {
-            periods.add( getRelativePeriod( new BiMonthlyPeriodType(), REPORTING_BIMONTH, date, dynamicNames, format ) );
-        }
-
-        if ( isReportingQuarter() )
-        {
-            periods.add( getRelativePeriod( new QuarterlyPeriodType(), REPORTING_QUARTER, date, dynamicNames, format ) );
+        if ( isLastMonth() )
+        {
+            periods.add( getRelativePeriod( new MonthlyPeriodType(), LAST_MONTH, date, dynamicNames, format ) );
+        }
+
+        if ( isLastBimonth() )
+        {
+            periods.add( getRelativePeriod( new BiMonthlyPeriodType(), LAST_BIMONTH, date, dynamicNames, format ) );
+        }
+
+        if ( isLastQuarter() )
+        {
+            periods.add( getRelativePeriod( new QuarterlyPeriodType(), LAST_QUARTER, date, dynamicNames, format ) );
         }
 
         if ( isLastSixMonth() )
@@ -712,9 +712,9 @@
     {
         Map<RelativePeriodEnum, RelativePeriods> map = new HashMap<>();
         
-        map.put( RelativePeriodEnum.LAST_MONTH, new RelativePeriods().setReportingMonth( true ) );
-        map.put( RelativePeriodEnum.LAST_BIMONTH, new RelativePeriods().setReportingBimonth( true ) );
-        map.put( RelativePeriodEnum.LAST_QUARTER, new RelativePeriods().setReportingQuarter( true ) );
+        map.put( RelativePeriodEnum.LAST_MONTH, new RelativePeriods().setLastMonth( true ) );
+        map.put( RelativePeriodEnum.LAST_BIMONTH, new RelativePeriods().setLastBimonth( true ) );
+        map.put( RelativePeriodEnum.LAST_QUARTER, new RelativePeriods().setLastQuarter( true ) );
         map.put( RelativePeriodEnum.LAST_SIX_MONTH, new RelativePeriods().setLastSixMonth( true ) );
         map.put( RelativePeriodEnum.MONTHS_THIS_YEAR, new RelativePeriods().setMonthsThisYear( true ) );
         map.put( RelativePeriodEnum.QUARTERS_THIS_YEAR, new RelativePeriods().setQuartersThisYear( true ) );
@@ -749,9 +749,9 @@
     {
         List<RelativePeriodEnum> list = new ArrayList<>();
         
-        add( list, RelativePeriodEnum.LAST_MONTH, reportingMonth );
-        add( list, RelativePeriodEnum.LAST_BIMONTH, reportingBimonth );
-        add( list, RelativePeriodEnum.LAST_QUARTER, reportingQuarter );
+        add( list, RelativePeriodEnum.LAST_MONTH, lastMonth );
+        add( list, RelativePeriodEnum.LAST_BIMONTH, lastBimonth );
+        add( list, RelativePeriodEnum.LAST_QUARTER, lastQuarter );
         add( list, RelativePeriodEnum.LAST_SIX_MONTH, lastSixMonth );
         add( list, RelativePeriodEnum.MONTHS_THIS_YEAR, monthsThisYear );
         add( list, RelativePeriodEnum.QUARTERS_THIS_YEAR, quartersThisYear );
@@ -781,9 +781,9 @@
     {
         if ( relativePeriods != null )
         {
-            reportingMonth = relativePeriods.contains( RelativePeriodEnum.LAST_MONTH );
-            reportingBimonth = relativePeriods.contains( RelativePeriodEnum.LAST_BIMONTH );
-            reportingQuarter = relativePeriods.contains( RelativePeriodEnum.LAST_QUARTER );
+            lastMonth = relativePeriods.contains( RelativePeriodEnum.LAST_MONTH );
+            lastBimonth = relativePeriods.contains( RelativePeriodEnum.LAST_BIMONTH );
+            lastQuarter = relativePeriods.contains( RelativePeriodEnum.LAST_QUARTER );
             lastSixMonth = relativePeriods.contains( RelativePeriodEnum.LAST_SIX_MONTH );
             monthsThisYear = relativePeriods.contains( RelativePeriodEnum.MONTHS_THIS_YEAR );
             quartersThisYear = relativePeriods.contains( RelativePeriodEnum.QUARTERS_THIS_YEAR );
@@ -834,40 +834,40 @@
 
     @JsonProperty( value = "lastMonth" )
     @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0)
-    public boolean isReportingMonth()
+    public boolean isLastMonth()
     {
-        return reportingMonth;
+        return lastMonth;
     }
 
-    public RelativePeriods setReportingMonth( boolean reportingMonth )
+    public RelativePeriods setLastMonth( boolean lastMonth )
     {
-        this.reportingMonth = reportingMonth;
+        this.lastMonth = lastMonth;
         return this;
     }
 
     @JsonProperty( value = "lastBimonth" )
     @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0)
-    public boolean isReportingBimonth()
+    public boolean isLastBimonth()
     {
-        return reportingBimonth;
+        return lastBimonth;
     }
 
-    public RelativePeriods setReportingBimonth( boolean reportingBimonth )
+    public RelativePeriods setLastBimonth( boolean reportingBimonth )
     {
-        this.reportingBimonth = reportingBimonth;
+        this.lastBimonth = reportingBimonth;
         return this;
     }
 
     @JsonProperty( value = "lastQuarter" )
     @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0)
-    public boolean isReportingQuarter()
+    public boolean isLastQuarter()
     {
-        return reportingQuarter;
+        return lastQuarter;
     }
 
-    public RelativePeriods setReportingQuarter( boolean reportingQuarter )
+    public RelativePeriods setLastQuarter( boolean reportingQuarter )
     {
-        this.reportingQuarter = reportingQuarter;
+        this.lastQuarter = reportingQuarter;
         return this;
     }
 
@@ -1155,9 +1155,9 @@
 
         int result = 1;
 
-        result = prime * result + (reportingMonth ? 1 : 0);
-        result = prime * result + (reportingBimonth ? 1 : 0);
-        result = prime * result + (reportingQuarter ? 1 : 0);
+        result = prime * result + (lastMonth ? 1 : 0);
+        result = prime * result + (lastBimonth ? 1 : 0);
+        result = prime * result + (lastQuarter ? 1 : 0);
         result = prime * result + (lastSixMonth ? 1 : 0);
         result = prime * result + (monthsThisYear ? 1 : 0);
         result = prime * result + (quartersThisYear ? 1 : 0);
@@ -1202,17 +1202,17 @@
 
         final RelativePeriods other = (RelativePeriods) object;
 
-        if ( !reportingMonth == other.reportingMonth )
-        {
-            return false;
-        }
-
-        if ( !reportingBimonth == other.reportingBimonth )
-        {
-            return false;
-        }
-
-        if ( !reportingQuarter == other.reportingQuarter )
+        if ( !lastMonth == other.lastMonth )
+        {
+            return false;
+        }
+
+        if ( !lastBimonth == other.lastBimonth )
+        {
+            return false;
+        }
+
+        if ( !lastQuarter == other.lastQuarter )
         {
             return false;
         }

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java	2015-03-31 14:49:05 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java	2015-03-31 15:22:00 +0000
@@ -816,6 +816,8 @@
         updateOptions();
         
         upgradeAggregationType( "reporttable" );
+        
+        updateRelativePeriods();
 
         log.info( "Tables updated" );
     }
@@ -831,6 +833,13 @@
         executeSql( "update " + table + " set aggregationtype='DEFAULT' where aggregationtype='default'" );
     }
 
+    private void updateRelativePeriods()
+    {
+        executeSql( "update relativeperiods set lastmonth=reportingmonth" );
+        executeSql( "update relativeperiods set lastbimonth=reportingbimonth" );
+        executeSql( "update relativeperiods set lastquarter=reportingquarter" );
+    }
+    
     private void upgradeDataValuesWithAttributeOptionCombo()
     {
         final String sql = statementBuilder.getNumberOfColumnsInPrimaryKey( "datavalue" );

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/period/hibernate/RelativePeriods.hbm.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/period/hibernate/RelativePeriods.hbm.xml	2014-10-13 12:13:36 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/period/hibernate/RelativePeriods.hbm.xml	2015-03-31 15:22:00 +0000
@@ -12,9 +12,9 @@
       <generator class="native" />
     </id>
     
-    <property name="reportingMonth" />
-    <property name="reportingBimonth" />
-    <property name="reportingQuarter" />
+    <property name="lastMonth" />
+    <property name="lastBimonth" />
+    <property name="lastQuarter" />
     <property name="lastSixMonth" />
     <property name="monthsThisYear" />
     <property name="quartersThisYear" />

=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/ChartConverter.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/ChartConverter.java	2015-01-17 07:41:26 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/ChartConverter.java	2015-03-31 15:22:00 +0000
@@ -142,7 +142,7 @@
                 }
                 writer.closeElement();                
 
-                writer.writeElement( FIELD_REPORTING_MONTH, String.valueOf( chart.getRelatives().isReportingMonth() ) );
+                writer.writeElement( FIELD_REPORTING_MONTH, String.valueOf( chart.getRelatives().isLastMonth() ) );
                 writer.writeElement( FIELD_MONTHS_THIS_YEAR, String.valueOf( chart.getRelatives().isMonthsThisYear() ) );
                 writer.writeElement( FIELD_QUARTERS_THIS_YEAR, String.valueOf( chart.getRelatives().isQuartersThisYear() ) );
                 writer.writeElement( FIELD_THIS_YEAR, String.valueOf( chart.getRelatives().isThisYear() ) );
@@ -204,7 +204,7 @@
             if ( params.minorVersionGreaterOrEqual( DXFConverter.MINOR_VERSION_12 ) )
             {
                 reader.moveToStartElement( FIELD_REPORTING_MONTH );          
-                chart.getRelatives().setReportingMonth( Boolean.parseBoolean( reader.getElementValue() ) );
+                chart.getRelatives().setLastMonth( Boolean.parseBoolean( reader.getElementValue() ) );
                 
                 reader.moveToStartElement( FIELD_MONTHS_THIS_YEAR );
                 chart.getRelatives().setMonthsThisYear( Boolean.parseBoolean( reader.getElementValue() ) );

=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/ReportTableConverter.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/ReportTableConverter.java	2015-01-17 07:41:26 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/ReportTableConverter.java	2015-03-31 15:22:00 +0000
@@ -222,7 +222,7 @@
                 writer.writeElement( FIELD_DO_PERIODS, String.valueOf( reportTable.isDoPeriods() ) );
                 writer.writeElement( FIELD_DO_ORGANISATION_UNITS, String.valueOf( reportTable.isDoUnits() ) );
 
-                writer.writeElement( FIELD_REPORTING_MONTH, String.valueOf( reportTable.getRelatives().isReportingMonth() ) );
+                writer.writeElement( FIELD_REPORTING_MONTH, String.valueOf( reportTable.getRelatives().isLastMonth() ) );
                 writer.writeElement( FIELD_MONTHS_THIS_YEAR, String.valueOf( reportTable.getRelatives().isMonthsThisYear() ) );
                 writer.writeElement( FIELD_QUARTERS_THIS_YEAR, String.valueOf( reportTable.getRelatives().isQuartersThisYear() ) );
                 writer.writeElement( FIELD_THIS_YEAR, String.valueOf( reportTable.getRelatives().isThisYear() ) );
@@ -313,7 +313,7 @@
             if ( params.minorVersionGreaterOrEqual( DXFConverter.MINOR_VERSION_12 ) )
             {
                 reader.moveToStartElement( FIELD_REPORTING_MONTH );          
-                reportTable.getRelatives().setReportingMonth( Boolean.parseBoolean( reader.getElementValue() ) );
+                reportTable.getRelatives().setLastMonth( Boolean.parseBoolean( reader.getElementValue() ) );
                 
                 reader.moveToStartElement( FIELD_MONTHS_THIS_YEAR );
                 reportTable.getRelatives().setMonthsThisYear( Boolean.parseBoolean( reader.getElementValue() ) );

=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/importer/ChartImporter.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/importer/ChartImporter.java	2015-01-17 07:41:26 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/importer/ChartImporter.java	2015-03-31 15:22:00 +0000
@@ -71,7 +71,7 @@
         match.setHideLegend( object.isHideLegend() );
         match.setRegression( object.isRegression() );        
 
-        match.getRelatives().setReportingMonth( object.getRelatives().isReportingMonth() );
+        match.getRelatives().setLastMonth( object.getRelatives().isLastMonth() );
         match.getRelatives().setMonthsThisYear( object.getRelatives().isMonthsThisYear() );
         match.getRelatives().setQuartersThisYear( object.getRelatives().isQuartersThisYear() );
         match.getRelatives().setThisYear( object.getRelatives().isThisYear() );

=== 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-01-17 07:41:26 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/importer/ReportTableImporter.java	2015-03-31 15:22:00 +0000
@@ -94,7 +94,7 @@
         match.setDoPeriods( match.isDoPeriods() );
         match.setDoUnits( match.isDoUnits() );
 
-        match.getRelatives().setReportingMonth( object.getRelatives().isReportingMonth() );
+        match.getRelatives().setLastMonth( object.getRelatives().isLastMonth() );
         match.getRelatives().setMonthsThisYear( object.getRelatives().isMonthsThisYear() );
         match.getRelatives().setQuartersThisYear( object.getRelatives().isQuartersThisYear() );
         match.getRelatives().setThisYear( object.getRelatives().isThisYear() );

=== 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-01-17 07:41:26 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/reporttable/ReportTableStoreTest.java	2015-03-31 15:22:00 +0000
@@ -174,15 +174,15 @@
         units.add( unitB );
 
         relativesA = new RelativePeriods();        
-        relativesA.setReportingMonth( true );
+        relativesA.setLastMonth( true );
         relativesA.setThisYear( true );
 
         relativesB = new RelativePeriods();        
-        relativesB.setReportingMonth( true );
+        relativesB.setLastMonth( true );
         relativesB.setThisYear( true );
 
         relativesC = new RelativePeriods();        
-        relativesC.setReportingMonth( true );
+        relativesC.setLastMonth( true );
         relativesC.setThisYear( true );    
     }
 

=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/reporttable/ReportTableTest.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/reporttable/ReportTableTest.java	2015-01-17 07:41:26 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/reporttable/ReportTableTest.java	2015-03-31 15:22:00 +0000
@@ -180,7 +180,7 @@
 
         relatives = new RelativePeriods();
         
-        relatives.setReportingMonth( true );
+        relatives.setLastMonth( true );
         relatives.setThisYear( true );
 
         List<Period> rp = relatives.getRelativePeriods();

=== modified file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/RelativePeriodsBatchHandler.java'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/RelativePeriodsBatchHandler.java	2015-01-17 07:41:26 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/RelativePeriodsBatchHandler.java	2015-03-31 15:22:00 +0000
@@ -84,9 +84,9 @@
     @Override
     protected void setColumns()
     {
-        statementBuilder.setColumn( "reportingmonth" );
-        statementBuilder.setColumn( "reportingbimonth" );
-        statementBuilder.setColumn( "reportingquarter" );
+        statementBuilder.setColumn( "lastmonth" );
+        statementBuilder.setColumn( "lastbimonth" );
+        statementBuilder.setColumn( "lastquarter" );
         statementBuilder.setColumn( "lastsixmonth" );
         statementBuilder.setColumn( "monthsthisyear" );
         statementBuilder.setColumn( "quartersthisyear" );
@@ -112,9 +112,9 @@
     @Override
     protected void setValues( RelativePeriods relatives )
     {        
-        statementBuilder.setValue( relatives.isReportingMonth() );
-        statementBuilder.setValue( relatives.isReportingBimonth() );
-        statementBuilder.setValue( relatives.isReportingQuarter() );
+        statementBuilder.setValue( relatives.isLastMonth() );
+        statementBuilder.setValue( relatives.isLastBimonth() );
+        statementBuilder.setValue( relatives.isLastQuarter() );
         statementBuilder.setValue( relatives.isLastSixMonth() );
         statementBuilder.setValue( relatives.isMonthsThisYear() );
         statementBuilder.setValue( relatives.isQuartersThisYear() );

=== 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-01-17 07:41:26 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/ReportTableBatchHandler.java	2015-03-31 15:22:00 +0000
@@ -123,7 +123,7 @@
         statementBuilder.setValue( reportTable.isDoPeriods() );
         statementBuilder.setValue( reportTable.isDoUnits() );
         
-        statementBuilder.setValue( reportTable.getRelatives().isReportingMonth() );
+        statementBuilder.setValue( reportTable.getRelatives().isLastMonth() );
         statementBuilder.setValue( reportTable.getRelatives().isMonthsThisYear() );
         statementBuilder.setValue( reportTable.getRelatives().isQuartersThisYear() );
         statementBuilder.setValue( reportTable.getRelatives().isThisYear() );

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/AggregatedValueController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/AggregatedValueController.java	2015-02-17 06:00:52 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/AggregatedValueController.java	2015-03-31 15:22:00 +0000
@@ -101,10 +101,10 @@
     ) throws IOException
     {
         RelativePeriods rp = new RelativePeriods();
-        rp.setReportingMonth( lastMonth );
+        rp.setLastMonth( lastMonth );
         rp.setMonthsThisYear( monthsThisYear );
         rp.setMonthsLastYear( monthsLastYear );
-        rp.setReportingQuarter( lastQuarter );
+        rp.setLastQuarter( lastQuarter );
         rp.setQuartersThisYear( quartersThisYear );
         rp.setQuartersLastYear( quartersLastYear );
         rp.setThisYear( thisYear );