← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2759: Gave method on Grid more intuitive name

 

------------------------------------------------------------
revno: 2759
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2011-01-26 11:01:53 +0100
message:
  Gave method on Grid more intuitive name
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/Grid.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/validation/DefaultValidationRuleService.java
  dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/orgunitdistribution/impl/DefaultOrgUnitDistributionService.java
  dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/impl/DefaultReportTableService.java
  dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/jdbc/JDBCReportTableManager.java
  dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/grid/ListGrid.java
  dhis-2/dhis-support/dhis-support-system/src/test/java/org/hisp/dhis/system/grid/GridTest.java
  dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/completeness/action/GetDataCompletenessAction.java
  dhis-2/dhis-web/dhis-web-validationrule/src/main/java/org/hisp/dhis/validationrule/action/ExportValidationResultAction.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/common/Grid.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/Grid.java	2011-01-25 21:27:17 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/Grid.java	2011-01-26 10:01:53 +0000
@@ -97,7 +97,7 @@
     /**
      * Adds a new row the the grid and moves the cursor accordingly.
      */
-    Grid nextRow();
+    Grid addRow();
 
     /**
      * Adds the value to the end of the current row.

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/validation/DefaultValidationRuleService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/validation/DefaultValidationRuleService.java	2010-12-29 10:06:33 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/validation/DefaultValidationRuleService.java	2011-01-26 10:01:53 +0000
@@ -126,7 +126,7 @@
             counter.count( result.getPeriod(), result.getSource() );
         }
 
-        grid.nextRow();
+        grid.addRow();
         grid.addValue( "" );
         
         for ( Period period : periods )
@@ -136,7 +136,7 @@
         
         for ( Source source : sources )
         {
-            grid.nextRow();
+            grid.addRow();
             grid.addValue( source.getName() );
             
             for ( Period period : periods )

=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/orgunitdistribution/impl/DefaultOrgUnitDistributionService.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/orgunitdistribution/impl/DefaultOrgUnitDistributionService.java	2011-01-18 10:39:31 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/orgunitdistribution/impl/DefaultOrgUnitDistributionService.java	2011-01-26 10:01:53 +0000
@@ -136,7 +136,7 @@
         
         for ( OrganisationUnit unit : units )
         {            
-            grid.nextRow();
+            grid.addRow();
             grid.addValue( unit.getName() );
             
             Collection<OrganisationUnit> subTree = organisationUnitService.getOrganisationUnitWithChildren( unit.getId() ); 

=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/impl/DefaultReportTableService.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/impl/DefaultReportTableService.java	2011-01-17 16:20:07 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/impl/DefaultReportTableService.java	2011-01-26 10:01:53 +0000
@@ -455,7 +455,7 @@
                 {
                     for ( final OrganisationUnit unit : reportTable.getReportUnits() )
                     {
-                        grid.nextRow();
+                        grid.addRow();
                         
                         // -----------------------------------------------------
                         // Identifier

=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/jdbc/JDBCReportTableManager.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/jdbc/JDBCReportTableManager.java	2011-01-17 16:20:07 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/jdbc/JDBCReportTableManager.java	2011-01-26 10:01:53 +0000
@@ -227,7 +227,7 @@
 
             while ( resultSet.next() )
             {
-                grid.nextRow();
+                grid.addRow();
                 
                 for ( String column : reportTable.getIndexColumns() )
                 {

=== modified file 'dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/grid/ListGrid.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/grid/ListGrid.java	2011-01-14 16:18:27 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/grid/ListGrid.java	2011-01-26 10:01:53 +0000
@@ -169,7 +169,7 @@
         return ( grid != null && grid.size() > 0 )  ? getVisibleRows().get( 0 ).size() : 0;
     }
     
-    public Grid nextRow()
+    public Grid addRow()
     {
         grid.add( new ArrayList<String>() );
         

=== modified file 'dhis-2/dhis-support/dhis-support-system/src/test/java/org/hisp/dhis/system/grid/GridTest.java'
--- dhis-2/dhis-support/dhis-support-system/src/test/java/org/hisp/dhis/system/grid/GridTest.java	2011-01-14 16:14:22 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/test/java/org/hisp/dhis/system/grid/GridTest.java	2011-01-26 10:01:53 +0000
@@ -63,22 +63,22 @@
         grid.addHeader( headerB );
         grid.addHeader( headerC );
         
-        grid.nextRow();        
+        grid.addRow();        
         grid.addValue( "11" );
         grid.addValue( "12" );
         grid.addValue( "13" );
 
-        grid.nextRow();        
+        grid.addRow();        
         grid.addValue( "21" );
         grid.addValue( "22" );
         grid.addValue( "23" );
 
-        grid.nextRow();        
+        grid.addRow();        
         grid.addValue( "31" );
         grid.addValue( "32" );
         grid.addValue( "33" );
 
-        grid.nextRow();        
+        grid.addRow();        
         grid.addValue( "41" );
         grid.addValue( "42" );
         grid.addValue( "43" );
@@ -218,13 +218,13 @@
     {
         grid = new ListGrid();        
 
-        grid.nextRow();        
+        grid.addRow();        
         grid.addValue( "10.0" );
-        grid.nextRow();        
+        grid.addRow();        
         grid.addValue( "50.0" );
-        grid.nextRow();        
+        grid.addRow();        
         grid.addValue( "20.0" );
-        grid.nextRow();        
+        grid.addRow();        
         grid.addValue( "60.0" );
         
         grid.addRegressionColumn( 0 );

=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/completeness/action/GetDataCompletenessAction.java'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/completeness/action/GetDataCompletenessAction.java	2011-01-14 16:14:22 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/completeness/action/GetDataCompletenessAction.java	2011-01-26 10:01:53 +0000
@@ -209,7 +209,7 @@
         
         for ( DataSetCompletenessResult result : results )
         {
-            grid.nextRow();
+            grid.addRow();
             grid.addValue( result.getName() );
             grid.addValue( String.valueOf( result.getRegistrations() ) );
             grid.addValue( String.valueOf( result.getSources() ) );

=== modified file 'dhis-2/dhis-web/dhis-web-validationrule/src/main/java/org/hisp/dhis/validationrule/action/ExportValidationResultAction.java'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/java/org/hisp/dhis/validationrule/action/ExportValidationResultAction.java	2011-01-14 16:14:22 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/java/org/hisp/dhis/validationrule/action/ExportValidationResultAction.java	2011-01-26 10:01:53 +0000
@@ -129,7 +129,7 @@
             OrganisationUnit unit = (OrganisationUnit) validationResult.getSource();
             Period period = validationResult.getPeriod();
             
-            grid.nextRow();
+            grid.addRow();
             grid.addValue( unit.getName() );
             grid.addValue( format.formatPeriod( period ) );
             grid.addValue( validationResult.getValidationRule().getLeftSide().getDescription() ); //TODO lazy prone