← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 18528: Analytics tables. Getting dimensions without ACL to ensure that all dimensions are used.

 

------------------------------------------------------------
revno: 18528
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sun 2015-03-08 15:57:52 +0100
message:
  Analytics tables. Getting dimensions without ACL to ensure that all dimensions are used.
added:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/CategoryOptionGroupSetStore.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/hibernate/HibernateCategoryOptionGroupSetStore.java
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/IdentifiableObjectManager.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/CategoryStore.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementCategoryService.java
  dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/AbstractJdbcTableManager.java
  dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcAnalyticsTableManager.java
  dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcCompletenessTableManager.java
  dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcCompletenessTargetTableManager.java
  dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcEventAnalyticsTableManager.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/common/DefaultIdentifiableObjectManager.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/DefaultDataElementCategoryService.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/hibernate/HibernateCategoryStore.java
  dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml


--
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/IdentifiableObjectManager.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/IdentifiableObjectManager.java	2015-03-08 13:34:06 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/IdentifiableObjectManager.java	2015-03-08 14:57:52 +0000
@@ -132,6 +132,8 @@
     <T extends IdentifiableObject> int getCountLikeName( Class<T> clazz, String name );
 
     <T extends NameableObject> int getCountLikeShortName( Class<T> clazz, String shortName );
+    
+    <T extends DimensionalObject> List<T> getByDataDimensionNoAcl( Class<T> clazz, boolean dataDimension );
 
     void refresh( Object object );
 

=== added file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/CategoryOptionGroupSetStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/CategoryOptionGroupSetStore.java	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/CategoryOptionGroupSetStore.java	2015-03-08 14:57:52 +0000
@@ -0,0 +1,36 @@
+package org.hisp.dhis.dataelement;
+
+/*
+ * Copyright (c) 2004-2015, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * Neither the name of the HISP project nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+import org.hisp.dhis.common.GenericDimensionalObjectStore;
+
+public interface CategoryOptionGroupSetStore
+    extends GenericDimensionalObjectStore<CategoryOptionGroupSet>
+{
+}

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/CategoryStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/CategoryStore.java	2015-03-08 10:49:07 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/CategoryStore.java	2015-03-08 14:57:52 +0000
@@ -29,6 +29,7 @@
  */
 
 import java.util.Collection;
+import java.util.List;
 
 import org.hisp.dhis.common.GenericDimensionalObjectStore;
 
@@ -41,4 +42,6 @@
     Collection<DataElementCategory> getCategoriesByDimensionType( String dimensionType );
     
     Collection<DataElementCategory> getCategories( String dimensionType, boolean dataDimension );
+    
+    List<DataElementCategory> getCategoriesNoAcl( String dimensionType, boolean dataDimension );
 }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementCategoryService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementCategoryService.java	2015-01-24 11:12:45 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementCategoryService.java	2015-03-08 14:57:52 +0000
@@ -136,11 +136,11 @@
 
     /**
      * Retrieves all DataElementCategories of dimension type disaggregation and
-     * data dimensional.
+     * data dimensional. Ignores ACL / sharing.
      * 
      * @return a collection of DataElementCategoryCombos.
      */
-    Collection<DataElementCategory> getDisaggregationDataDimensionCategories();
+    Collection<DataElementCategory> getDisaggregationDataDimensionCategoriesNoAcl();
 
     /**
      * Retrieves all DataElementCategories of dimension type attribute.
@@ -151,11 +151,11 @@
 
     /**
      * Retrieves all DataElementCategories of dimension type attribute and data
-     * dimensional.
+     * dimensional. Ignores ACL / sharing.
      * 
      * @return a collection of DataElementCategoryCombos.
      */
-    Collection<DataElementCategory> getAttributeDataDimensionCategories();
+    Collection<DataElementCategory> getAttributeDataDimensionCategoriesNoAcl();
 
     // -------------------------------------------------------------------------
     // CategoryOption

=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/AbstractJdbcTableManager.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/AbstractJdbcTableManager.java	2015-02-27 11:50:10 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/AbstractJdbcTableManager.java	2015-03-08 14:57:52 +0000
@@ -43,11 +43,11 @@
 import org.hisp.dhis.analytics.AnalyticsTable;
 import org.hisp.dhis.analytics.AnalyticsTableManager;
 import org.hisp.dhis.common.CodeGenerator;
+import org.hisp.dhis.common.IdentifiableObjectManager;
 import org.hisp.dhis.dataapproval.DataApprovalLevelService;
 import org.hisp.dhis.dataelement.DataElementCategoryService;
 import org.hisp.dhis.dataelement.DataElementService;
 import org.hisp.dhis.jdbc.StatementBuilder;
-import org.hisp.dhis.organisationunit.OrganisationUnitGroupService;
 import org.hisp.dhis.organisationunit.OrganisationUnitService;
 import org.hisp.dhis.period.Period;
 import org.hisp.dhis.setting.SystemSettingManager;
@@ -71,7 +71,10 @@
     public static final String PREFIX_ORGUNITGROUPSET = "ougs_";
     public static final String PREFIX_ORGUNITLEVEL = "uidlevel";
     public static final String PREFIX_INDEX = "in_";
-    
+
+    @Autowired
+    protected IdentifiableObjectManager idObjectManager;
+   
     @Autowired
     protected OrganisationUnitService organisationUnitService;
     
@@ -79,9 +82,6 @@
     protected DataElementService dataElementService;
     
     @Autowired
-    protected OrganisationUnitGroupService organisationUnitGroupService;
-    
-    @Autowired
     protected DataElementCategoryService categoryService;
     
     @Autowired

=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcAnalyticsTableManager.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcAnalyticsTableManager.java	2015-03-02 10:56:38 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcAnalyticsTableManager.java	2015-03-08 14:57:52 +0000
@@ -268,16 +268,18 @@
             dataElementService.getDataDimensionDataElementGroupSets();
         
         Collection<OrganisationUnitGroupSet> orgUnitGroupSets = 
-            organisationUnitGroupService.getDataDimensionOrganisationUnitGroupSets();
-
+            idObjectManager.getByDataDimensionNoAcl( OrganisationUnitGroupSet.class, true );
+        
+        System.out.println("org unit group sets " + orgUnitGroupSets);
+        
         Collection<CategoryOptionGroupSet> categoryOptionGroupSets =
-            categoryService.getDataDimensionCategoryOptionGroupSets();
+            idObjectManager.getByDataDimensionNoAcl( CategoryOptionGroupSet.class, true );
         
         Collection<DataElementCategory> disaggregationCategories =
-            categoryService.getDisaggregationDataDimensionCategories();
+            categoryService.getDisaggregationDataDimensionCategoriesNoAcl();
         
         Collection<DataElementCategory> attributeCategories =
-            categoryService.getAttributeDataDimensionCategories();
+            categoryService.getAttributeDataDimensionCategoriesNoAcl();
 
         Collection<OrganisationUnitLevel> levels =
             organisationUnitService.getOrganisationUnitLevels();

=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcCompletenessTableManager.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcCompletenessTableManager.java	2015-03-02 10:56:38 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcCompletenessTableManager.java	2015-03-08 14:57:52 +0000
@@ -163,7 +163,7 @@
         List<String[]> columns = new ArrayList<>();
 
         Collection<OrganisationUnitGroupSet> orgUnitGroupSets = 
-            organisationUnitGroupService.getDataDimensionOrganisationUnitGroupSets();
+            idObjectManager.getByDataDimensionNoAcl( OrganisationUnitGroupSet.class, true );
         
         Collection<OrganisationUnitLevel> levels =
             organisationUnitService.getOrganisationUnitLevels();

=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcCompletenessTargetTableManager.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcCompletenessTargetTableManager.java	2015-03-02 10:56:38 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcCompletenessTargetTableManager.java	2015-03-08 14:57:52 +0000
@@ -157,7 +157,7 @@
         List<String[]> columns = new ArrayList<>();
 
         Collection<OrganisationUnitGroupSet> orgUnitGroupSets = 
-            organisationUnitGroupService.getDataDimensionOrganisationUnitGroupSets();
+            idObjectManager.getByDataDimensionNoAcl( OrganisationUnitGroupSet.class, true );
         
         Collection<OrganisationUnitLevel> levels =
             organisationUnitService.getOrganisationUnitLevels();

=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcEventAnalyticsTableManager.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcEventAnalyticsTableManager.java	2015-03-03 10:20:32 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcEventAnalyticsTableManager.java	2015-03-08 14:57:52 +0000
@@ -232,8 +232,8 @@
         List<String[]> columns = new ArrayList<>();
 
         Collection<OrganisationUnitGroupSet> orgUnitGroupSets = 
-            organisationUnitGroupService.getDataDimensionOrganisationUnitGroupSets();
-
+            idObjectManager.getByDataDimensionNoAcl( OrganisationUnitGroupSet.class, true );
+        
         Collection<OrganisationUnitLevel> levels = 
             organisationUnitService.getOrganisationUnitLevels();
 

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/common/DefaultIdentifiableObjectManager.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/common/DefaultIdentifiableObjectManager.java	2015-03-08 13:34:06 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/common/DefaultIdentifiableObjectManager.java	2015-03-08 14:57:52 +0000
@@ -68,7 +68,10 @@
 
     @Autowired
     private Set<GenericNameableObjectStore<? extends NameableObject>> nameableObjectStores;
-    
+
+    @Autowired
+    private Set<GenericDimensionalObjectStore<? extends DimensionalObject>> dimensionalObjectStores;
+
     @Autowired
     private SessionFactory sessionFactory;
 
@@ -79,6 +82,8 @@
 
     private Map<Class<? extends NameableObject>, GenericNameableObjectStore<? extends NameableObject>> nameableObjectStoreMap;
 
+    private Map<Class<? extends DimensionalObject>, GenericDimensionalObjectStore<? extends DimensionalObject>> dimensionalObjectStoreMap;
+
     //--------------------------------------------------------------------------
     // IdentifiableObjectManager implementation
     //--------------------------------------------------------------------------
@@ -902,6 +907,20 @@
         return (Collection<T>) store.getAllNoAcl( first, max );
     }
 
+    @Override
+    @SuppressWarnings( "unchecked" )
+    public <T extends DimensionalObject> List<T> getByDataDimensionNoAcl( Class<T> clazz, boolean dataDimension )
+    {
+        GenericDimensionalObjectStore<DimensionalObject> store = getDimensionalObjectStore( clazz );
+
+        if ( store == null )
+        {
+            return new ArrayList<>();
+        }
+
+        return (List<T>) store.getByDataDimensionNoAcl( dataDimension );
+    }
+    
     //--------------------------------------------------------------------------
     // Supportive methods
     //--------------------------------------------------------------------------
@@ -946,6 +965,26 @@
         return (GenericNameableObjectStore<NameableObject>) store;
     }
 
+    @SuppressWarnings( "unchecked" )
+    private <T extends DimensionalObject> GenericDimensionalObjectStore<DimensionalObject> getDimensionalObjectStore( Class<T> clazz )
+    {
+        initMaps();
+
+        GenericDimensionalObjectStore<? extends DimensionalObject> store = dimensionalObjectStoreMap.get( clazz );
+
+        if ( store == null )
+        {
+            store = dimensionalObjectStoreMap.get( clazz.getSuperclass() );
+
+            if ( store == null )
+            {
+                log.warn( "No DimensionalObjectStore found for class: " + clazz );
+            }
+        }
+
+        return (GenericDimensionalObjectStore<DimensionalObject>) store;
+    }
+
     private void initMaps()
     {
         if ( identifiableObjectStoreMap != null )
@@ -966,5 +1005,12 @@
         {
             nameableObjectStoreMap.put( store.getClazz(), store );
         }
+        
+        dimensionalObjectStoreMap = new HashMap<>();
+        
+        for ( GenericDimensionalObjectStore<? extends DimensionalObject> store : dimensionalObjectStores )
+        {
+            dimensionalObjectStoreMap.put( store.getClazz(), store );
+        }
     }
 }

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/DefaultDataElementCategoryService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/DefaultDataElementCategoryService.java	2015-03-08 10:49:07 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/DefaultDataElementCategoryService.java	2015-03-08 14:57:52 +0000
@@ -217,9 +217,9 @@
     }
 
     @Override
-    public Collection<DataElementCategory> getDisaggregationDataDimensionCategories()
+    public Collection<DataElementCategory> getDisaggregationDataDimensionCategoriesNoAcl()
     {
-        return categoryStore.getCategories( DataElementCategoryCombo.DIMENSION_TYPE_DISAGGREGATION, true );
+        return categoryStore.getCategoriesNoAcl( DataElementCategoryCombo.DIMENSION_TYPE_DISAGGREGATION, true );
     }
 
     @Override
@@ -229,9 +229,9 @@
     }
 
     @Override
-    public Collection<DataElementCategory> getAttributeDataDimensionCategories()
+    public Collection<DataElementCategory> getAttributeDataDimensionCategoriesNoAcl()
     {
-        return categoryStore.getCategories( DataElementCategoryCombo.DIMENSION_TYPE_ATTTRIBUTE, true );
+        return categoryStore.getCategoriesNoAcl( DataElementCategoryCombo.DIMENSION_TYPE_ATTTRIBUTE, true );
     }
 
     @Override

=== added file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/hibernate/HibernateCategoryOptionGroupSetStore.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/hibernate/HibernateCategoryOptionGroupSetStore.java	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/hibernate/HibernateCategoryOptionGroupSetStore.java	2015-03-08 14:57:52 +0000
@@ -0,0 +1,39 @@
+package org.hisp.dhis.dataelement.hibernate;
+
+/*
+ * Copyright (c) 2004-2015, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * Neither the name of the HISP project nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+import org.hisp.dhis.common.hibernate.HibernateIdentifiableObjectStore;
+import org.hisp.dhis.dataelement.CategoryOptionGroupSet;
+import org.hisp.dhis.dataelement.CategoryOptionGroupSetStore;
+
+public class HibernateCategoryOptionGroupSetStore
+    extends HibernateIdentifiableObjectStore<CategoryOptionGroupSet>
+    implements CategoryOptionGroupSetStore
+{
+}

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/hibernate/HibernateCategoryStore.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/hibernate/HibernateCategoryStore.java	2015-01-17 07:41:26 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/hibernate/HibernateCategoryStore.java	2015-03-08 14:57:52 +0000
@@ -29,6 +29,7 @@
  */
 
 import java.util.Collection;
+import java.util.List;
 
 import org.hibernate.criterion.Restrictions;
 import org.hisp.dhis.common.hibernate.HibernateIdentifiableObjectStore;
@@ -57,4 +58,13 @@
             Restrictions.eq( "dataDimensionType", dimensionType ),
             Restrictions.eq( "dataDimension", dataDimension ) ).list();
     }
+    
+    @Override
+    @SuppressWarnings("unchecked")
+    public List<DataElementCategory> getCategoriesNoAcl( String dimensionType, boolean dataDimension )
+    {
+        return getCriteria( 
+            Restrictions.eq( "dataDimensionType", dimensionType ),
+            Restrictions.eq( "dataDimension", dataDimension ) ).list();
+    }
 }

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml	2015-03-08 13:34:06 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml	2015-03-08 14:57:52 +0000
@@ -196,7 +196,7 @@
     <property name="cacheable" value="true" />
   </bean>
 
-  <bean id="org.hisp.dhis.dataelement.CategoryOptionGroupSetStore" class="org.hisp.dhis.common.hibernate.HibernateIdentifiableObjectStore">
+  <bean id="org.hisp.dhis.dataelement.CategoryOptionGroupSetStore" class="org.hisp.dhis.dataelement.hibernate.HibernateCategoryOptionGroupSetStore">
     <property name="clazz" value="org.hisp.dhis.dataelement.CategoryOptionGroupSet" />
     <property name="sessionFactory" ref="sessionFactory" />
     <property name="cacheable" value="true" />