← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 19380: Analytics, removed current isAllItems property

 

------------------------------------------------------------
revno: 19380
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sat 2015-06-13 15:55:42 +0200
message:
  Analytics, removed current isAllItems property
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseDimensionalObject.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/DimensionalObject.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/main/java/org/hisp/dhis/analytics/event/data/JdbcEventAnalyticsManager.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/BaseDimensionalObject.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseDimensionalObject.java	2015-06-13 11:43:28 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseDimensionalObject.java	2015-06-13 13:55:42 +0000
@@ -132,12 +132,6 @@
     // -------------------------------------------------------------------------
 
     @Override
-    public boolean isAllItems()
-    {
-        return items != null && items.isEmpty();
-    }
-
-    @Override
     public boolean hasItems()
     {
         return items != null && !items.isEmpty();

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/DimensionalObject.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/DimensionalObject.java	2015-03-24 11:19:25 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/DimensionalObject.java	2015-06-13 13:55:42 +0000
@@ -110,12 +110,6 @@
     List<NameableObject> getItems();
 
     /**
-     * Indicates whether this dimension should use all dimension items. All
-     * dimension options is represented as an option list of zero elements.
-     */
-    boolean isAllItems();
-
-    /**
      * Indicates whether this dimension has any dimension items.
      */
     boolean hasItems();

=== 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	2015-05-28 15:04:54 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/JdbcAnalyticsManager.java	2015-06-13 13:55:42 +0000
@@ -321,7 +321,7 @@
 
         for ( DimensionalObject dim : params.getQueryDimensions() )
         {
-            if ( !dim.isAllItems() )
+            if ( !dim.getItems().isEmpty() )
             {
                 String col = statementBuilder.columnQuote( dim.getDimensionName() );
 

=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/JdbcEventAnalyticsManager.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/JdbcEventAnalyticsManager.java	2015-05-28 15:04:54 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/JdbcEventAnalyticsManager.java	2015-06-13 13:55:42 +0000
@@ -468,13 +468,10 @@
         // ---------------------------------------------------------------------
 
         for ( DimensionalObject dim : params.getDimensionsAndFilters( DimensionType.ORGANISATIONUNIT_GROUPSET ) )
-        {
-            if ( !dim.isAllItems() )
-            {
-                String col = statementBuilder.columnQuote( dim.getDimensionName() );
+        {            
+            String col = statementBuilder.columnQuote( dim.getDimensionName() );
                 
-                sql += "and " + col + " in (" + getQuotedCommaDelimitedString( getUids( dim.getItems() ) ) + ") ";
-            }
+            sql += "and " + col + " in (" + getQuotedCommaDelimitedString( getUids( dim.getItems() ) ) + ") ";
         }
 
         // ---------------------------------------------------------------------