=== 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 getAggregatedIndicatorValues( Collection indicatorIds, + Collection getAggregatedIndicatorValues( Collection indicatorIds, Collection periodIds, Collection 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 getDataValues( int dataElementId, Collection periodIds, Collection 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 getDataValues( final int dataElementId, final Collection periodIds, final Collection 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 list = new ArrayList(); - - 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(); - } - public Map getDataValueMap( final int periodId, final int sourceId ) { final StatementHolder holder = statementManager.getHolder();