← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 15850: Removed unused method

 

------------------------------------------------------------
revno: 15850
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2014-06-25 15:45:29 +0200
message:
  Removed unused method
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementService.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementStore.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/DefaultDataElementService.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/hibernate/HibernateDataElementStore.java
  dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementServiceTest.java
  dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementStoreTest.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/dataelement/DataElementService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementService.java	2014-06-15 13:20:39 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementService.java	2014-06-25 13:45:29 +0000
@@ -161,14 +161,6 @@
     Collection<DataElement> getAggregateableDataElements();
 
     /**
-     * Returns all active DataElements.
-     *
-     * @return a collection of all active DataElements, or an empty collection
-     *         if there are no active DataElements.
-     */
-    Collection<DataElement> getAllActiveDataElements();
-
-    /**
      * Returns all DataElements with a given aggregation operator.
      *
      * @param aggregationOperator the aggregation operator of the DataElements

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementStore.java	2014-06-15 13:20:39 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementStore.java	2014-06-25 13:45:29 +0000
@@ -66,14 +66,6 @@
     Collection<DataElement> getAggregateableDataElements();
 
     /**
-     * Returns all active DataElements.
-     * 
-     * @return a collection of all active DataElements, or an empty collection
-     *         if there are no active DataElements.
-     */
-    Collection<DataElement> getAllActiveDataElements();
-
-    /**
      * Returns all DataElements with a given aggregation operator.
      * 
      * @param aggregationOperator the aggregation operator of the DataElements

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/DefaultDataElementService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/DefaultDataElementService.java	2014-06-25 13:41:44 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/DefaultDataElementService.java	2014-06-25 13:45:29 +0000
@@ -180,11 +180,6 @@
         return i18n( i18nService, dataElementStore.getAggregateableDataElements() );
     }
 
-    public Collection<DataElement> getAllActiveDataElements()
-    {
-        return i18n( i18nService, dataElementStore.getAllActiveDataElements() );
-    }
-
     public DataElement getDataElementByName( String name )
     {
         List<DataElement> dataElements = new ArrayList<DataElement>( dataElementStore.getAllEqName( name ) );

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/hibernate/HibernateDataElementStore.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/hibernate/HibernateDataElementStore.java	2014-06-16 05:13:31 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/hibernate/HibernateDataElementStore.java	2014-06-25 13:45:29 +0000
@@ -84,12 +84,6 @@
     }
 
     @SuppressWarnings("unchecked")
-    public Collection<DataElement> getAllActiveDataElements()
-    {
-        return getCriteria( Restrictions.eq( "active", true ) ).list();
-    }
-
-    @SuppressWarnings("unchecked")
     public Collection<DataElement> getDataElementsByAggregationOperator( String aggregationOperator )
     {
         return getCriteria( Restrictions.eq( "aggregationOperator", aggregationOperator ) ).list();

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementServiceTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementServiceTest.java	2014-06-15 13:20:39 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementServiceTest.java	2014-06-25 13:45:29 +0000
@@ -304,39 +304,6 @@
     }
 
     @Test
-    public void testGetAllActiveDataElements()
-        throws Exception
-    {
-        assertEquals( 0, dataElementService.getAllActiveDataElements().size() );
-
-        DataElement dataElementA = createDataElement( 'A' );
-        dataElementA.setActive( true );
-        DataElement dataElementB = createDataElement( 'B' );
-        dataElementB.setActive( true );
-        DataElement dataElementC = createDataElement( 'C' );
-        dataElementC.setActive( true );
-        DataElement dataElementD = createDataElement( 'D' );
-        dataElementD.setActive( false );
-
-        dataElementService.addDataElement( dataElementA );
-        dataElementService.addDataElement( dataElementB );
-        dataElementService.addDataElement( dataElementC );
-        dataElementService.addDataElement( dataElementD );
-
-        Collection<DataElement> dataElementsRef = new HashSet<DataElement>();
-        dataElementsRef.add( dataElementA );
-        dataElementsRef.add( dataElementB );
-        dataElementsRef.add( dataElementC );
-
-        assertEquals( dataElementsRef.size() + 1, dataElementService.getAllDataElements().size() );
-
-        Collection<DataElement> dataElements = dataElementService.getAllActiveDataElements();
-        assertNotNull( dataElements );
-        assertEquals( dataElementsRef.size(), dataElements.size() );
-        assertTrue( dataElements.containsAll( dataElementsRef ) );
-    }
-
-    @Test
     public void testGetDataElementsByAggregationOperator()
         throws Exception
     {

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementStoreTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementStoreTest.java	2014-06-16 05:13:31 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementStoreTest.java	2014-06-25 13:45:29 +0000
@@ -268,38 +268,6 @@
     }
 
     @Test
-    public void testGetAllActiveDataElements()
-    {
-        assertEquals( 0, dataElementStore.getAllActiveDataElements().size() );
-
-        DataElement dataElementA = createDataElement( 'A' );
-        dataElementA.setActive( true );
-        DataElement dataElementB = createDataElement( 'B' );
-        dataElementB.setActive( true );
-        DataElement dataElementC = createDataElement( 'C' );
-        dataElementC.setActive( true );
-        DataElement dataElementD = createDataElement( 'D' );
-        dataElementD.setActive( false );
-
-        dataElementStore.save( dataElementA );
-        dataElementStore.save( dataElementB );
-        dataElementStore.save( dataElementC );
-        dataElementStore.save( dataElementD );
-
-        Collection<DataElement> dataElementsRef = new HashSet<DataElement>();
-        dataElementsRef.add( dataElementA );
-        dataElementsRef.add( dataElementB );
-        dataElementsRef.add( dataElementC );
-
-        assertEquals( dataElementsRef.size() + 1, dataElementStore.getAll().size() );
-
-        Collection<DataElement> dataElements = dataElementStore.getAllActiveDataElements();
-        assertNotNull( dataElements );
-        assertEquals( dataElementsRef.size(), dataElements.size() );
-        assertTrue( dataElements.containsAll( dataElementsRef ) );
-    }
-
-    @Test
     public void testGetDataElementsByAggregationOperator()
     {
         assertEquals( 0, dataElementStore.getDataElementsByAggregationOperator(