← Back to team overview

dhis2-devs team mailing list archive

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

 

------------------------------------------------------------
revno: 1087
committer: Lars Helge Oeverland larshelge@xxxxxxxxx
branch nick: trunk
timestamp: Mon 2009-11-23 16:04:54 +0100
message:
  Removed unused method.
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/datamart/DataMartStore.java
  dhis-2/dhis-services/dhis-service-datamart-default/src/main/java/org/hisp/dhis/datamart/jdbc/JdbcDataMartStore.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/datamart/DataMartStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/datamart/DataMartStore.java	2009-11-19 17:30:24 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/datamart/DataMartStore.java	2009-11-23 15:04:54 +0000
@@ -160,7 +160,7 @@
      * @param organisationUnitIds the OrganisationUnit identifiers.
      * @return a collection of AggregatedIndicatorValues.
      */
-    Collection<AggregatedIndicatorValue> getAggregatedIndicatorValues( Collection<Integer> indicatorIds, 
+    Collection<AggregatedIndicatorValue> getAggregatedIndicatorValues( Collection<Integer> indicatorIds,
         Collection<Integer> periodIds, Collection<Integer> organisationUnitIds );
     
     /**
@@ -220,17 +220,6 @@
     DataValue getDataValue( final int dataElementId, final int categoryOptionComboId, final int periodId, final int sourceId );
     
     /**
-     * Gets all DataValues for the given DataElement identifer, collection of Period identifers, and collection of Sources
-     * grouped by Period.
-     * 
-     * @param dataElementId the DataElement identifier.
-     * @param periodIds the collection of Period identifiers.
-     * @param sourceIds the collection of Source identifiers.
-     * @return collection of DataValues.
-     */
-    Collection<DataValue> getDataValues( int dataElementId, Collection<Integer> periodIds, Collection<Integer> sourceIds );
-    
-    /**
      * Gets a Map with entries containing Operand and value for all DataValues registered for the given Period and Source.
      * 
      * @param periodId the Period identifier.

=== modified file 'dhis-2/dhis-services/dhis-service-datamart-default/src/main/java/org/hisp/dhis/datamart/jdbc/JdbcDataMartStore.java'
--- dhis-2/dhis-services/dhis-service-datamart-default/src/main/java/org/hisp/dhis/datamart/jdbc/JdbcDataMartStore.java	2009-11-19 17:30:24 +0000
+++ dhis-2/dhis-services/dhis-service-datamart-default/src/main/java/org/hisp/dhis/datamart/jdbc/JdbcDataMartStore.java	2009-11-23 15:04:54 +0000
@@ -432,55 +432,6 @@
         }
     }
     
-    public Collection<DataValue> getDataValues( final int dataElementId, final Collection<Integer> periodIds, final Collection<Integer> sourceIds )
-    {
-        if ( sourceIds != null && sourceIds.size() > 0 && periodIds != null && periodIds.size() > 0 )
-        {
-            final StatementHolder holder = statementManager.getHolder();
-            
-            try
-            {
-                final String sql = 
-                    "SELECT periodid, value " +
-                    "FROM datavalue " +
-                    "WHERE dataelementid = " + dataElementId + " " +
-                    "AND periodid IN ( " + getCommaDelimitedString( periodIds ) + " ) " +
-                    "AND sourceid IN ( " + getCommaDelimitedString( sourceIds ) + " ) " +
-                    "GROUP BY periodid";
-                
-                final ResultSet resultSet = holder.getStatement().executeQuery( sql );
-                
-                final Collection<DataValue> list = new ArrayList<DataValue>();
-                
-                while ( resultSet.next() )
-                {
-                    final Period period = new Period();
-                    
-                    period.setId( Integer.parseInt( resultSet.getString( 1 ) ) );
-                    
-                    final DataValue dataValue = new DataValue();
-                    
-                    dataValue.setPeriod( period );
-                    dataValue.setValue( resultSet.getString( 2 ) );
-                    
-                    list.add( dataValue );
-                }
-                
-                return list;
-            }
-            catch ( SQLException ex )
-            {
-                throw new RuntimeException( "Failed to get DataValues", ex );
-            }
-            finally
-            {
-                holder.close();
-            }
-        }
-        
-        return new ArrayList<DataValue>();
-    }
-
     public Map<Operand, String> getDataValueMap( final int periodId, final int sourceId )
     {
         final StatementHolder holder = statementManager.getHolder();