dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #40624
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 20628: Removed unused methods
------------------------------------------------------------
revno: 20628
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2015-10-12 12:18:30 +0200
message:
Removed unused methods
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementService.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataentryform/DataEntryFormService.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/indicator/IndicatorService.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/PeriodService.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/dataentryform/DefaultDataEntryFormService.java
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/indicator/DefaultIndicatorService.java
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/period/DefaultPeriodService.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 2015-09-15 09:54:24 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementService.java 2015-10-12 10:18:30 +0000
@@ -140,15 +140,6 @@
* Returns all DataElements with corresponding identifiers. Returns all
* DataElements if the given argument is null.
*
- * @param identifiers the collection of identifiers.
- * @return a list of DataElements.
- */
- List<DataElement> getDataElements( Collection<Integer> identifiers );
-
- /**
- * Returns all DataElements with corresponding identifiers. Returns all
- * DataElements if the given argument is null.
- *
* @param uids the collection of uids.
* @return a list of DataElements.
*/
@@ -354,14 +345,6 @@
DataElementGroup getDataElementGroup( int id, boolean i18nDataElements );
/**
- * Returns data element groups with identifiers in the given collection.
- *
- * @param identifiers the id collection.
- * @return data elements with identifiers in the given collection.
- */
- List<DataElementGroup> getDataElementGroups( Collection<Integer> identifiers );
-
- /**
* Returns the data element groups with the given uids.
*
* @param uids the uid collection.
@@ -477,8 +460,6 @@
List<DataElementGroupSet> getAllDataElementGroupSets();
- List<DataElementGroupSet> getDataElementGroupSets( Collection<Integer> identifiers );
-
List<DataElementGroupSet> getDataElementGroupSetsByUid( Collection<String> uids );
List<DataElementGroupSet> getDataElementGroupSetsBetween( int first, int max );
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataentryform/DataEntryFormService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataentryform/DataEntryFormService.java 2015-09-16 14:49:50 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataentryform/DataEntryFormService.java 2015-10-12 10:18:30 +0000
@@ -28,7 +28,6 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import java.util.Collection;
import java.util.List;
import java.util.Set;
import java.util.regex.Pattern;
@@ -102,15 +101,6 @@
List<DataEntryForm> getAllDataEntryForms();
/**
- * Return the DataEntryForms with the given collection of identifiers. If the
- * given argument is null, all DataEntryForms are returned.
- *
- * @param identifiers the collection of identifiers.
- * @return a collection of DataEntryForms.
- */
- List<DataEntryForm> getDataEntryForms( Collection<Integer> identifiers );
-
- /**
* Prepare DataEntryForm code for save by reversing the effects of
* prepareDataEntryFormForEdit().
*
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/indicator/IndicatorService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/indicator/IndicatorService.java 2015-08-25 10:03:15 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/indicator/IndicatorService.java 2015-10-12 10:18:30 +0000
@@ -56,8 +56,6 @@
List<Indicator> getAllIndicators();
- List<Indicator> getIndicators( Collection<Integer> identifiers );
-
List<Indicator> getIndicatorsByUid( Collection<String> uids );
List<Indicator> getIndicatorByName( String name );
@@ -96,8 +94,6 @@
IndicatorType getIndicatorType( String uid );
- List<IndicatorType> getIndicatorTypes( Collection<Integer> identifiers );
-
List<IndicatorType> getAllIndicatorTypes();
IndicatorType getIndicatorTypeByName( String name );
@@ -124,8 +120,6 @@
IndicatorGroup getIndicatorGroup( int id, boolean i18nIndicators );
- List<IndicatorGroup> getIndicatorGroups( Collection<Integer> identifiers );
-
IndicatorGroup getIndicatorGroup( String uid );
List<IndicatorGroup> getAllIndicatorGroups();
@@ -162,8 +156,6 @@
List<IndicatorGroupSet> getAllIndicatorGroupSets();
- List<IndicatorGroupSet> getIndicatorGroupSets( Collection<Integer> identifiers );
-
List<IndicatorGroupSet> getIndicatorGroupSetsBetween( int first, int max );
List<IndicatorGroupSet> getIndicatorGroupSetsBetweenByName( String name, int first, int max );
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/PeriodService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/PeriodService.java 2015-06-16 05:11:29 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/PeriodService.java 2015-10-12 10:18:30 +0000
@@ -36,7 +36,6 @@
/**
* @author Kristian Nordal
- * @version $Id: PeriodService.java 5983 2008-10-17 17:42:44Z larshelg $
*/
public interface PeriodService
{
@@ -105,14 +104,6 @@
List<Period> getAllPeriods();
/**
- * Returns all Periods with corresponding identifiers.
- *
- * @param identifiers a collection of identifiers.
- * @return a list of Periods.
- */
- List<Period> getPeriods( Collection<Integer> identifiers );
-
- /**
* Returns all Periods with start date after or equal the specified start
* date and end date before or equal the specified end date.
*
=== 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 2015-09-15 09:54:24 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/DefaultDataElementService.java 2015-10-12 10:18:30 +0000
@@ -137,12 +137,6 @@
}
@Override
- public List<DataElement> getDataElements( final Collection<Integer> identifiers )
- {
- return getAllDataElements().stream().filter( p -> identifiers.contains( p.getId() ) ).collect( Collectors.toList() );
- }
-
- @Override
public List<DataElement> getDataElementsByUid( Collection<String> uids )
{
return i18n( i18nService, dataElementStore.getByUid( uids ) );
@@ -428,12 +422,6 @@
}
@Override
- public List<DataElementGroup> getDataElementGroups( final Collection<Integer> identifiers )
- {
- return getAllDataElementGroups().stream().filter( p -> identifiers.contains( p.getId() ) ).collect( Collectors.toList() );
- }
-
- @Override
public List<DataElementGroup> getDataElementGroupsByUid( Collection<String> uids )
{
return i18n( i18nService, dataElementGroupStore.getByUid( uids ) );
@@ -576,12 +564,6 @@
}
@Override
- public List<DataElementGroupSet> getDataElementGroupSets( final Collection<Integer> identifiers )
- {
- return getAllDataElementGroupSets().stream().filter( p -> identifiers.contains( p.getId() ) ).collect( Collectors.toList() );
- }
-
- @Override
public List<DataElementGroupSet> getDataElementGroupSetsByUid( Collection<String> uids )
{
return i18n( i18nService, dataElementGroupSetStore.getByUid( uids ) );
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataentryform/DefaultDataEntryFormService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataentryform/DefaultDataEntryFormService.java 2015-09-04 09:29:23 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataentryform/DefaultDataEntryFormService.java 2015-10-12 10:18:30 +0000
@@ -34,8 +34,6 @@
import org.hisp.dhis.common.IdentifiableObjectUtils;
import org.hisp.dhis.common.ValueType;
import org.hisp.dhis.commons.collection.CachingMap;
-import org.hisp.dhis.commons.filter.Filter;
-import org.hisp.dhis.commons.filter.FilterUtils;
import org.hisp.dhis.dataelement.DataElement;
import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo;
import org.hisp.dhis.dataelement.DataElementOperand;
@@ -47,7 +45,6 @@
import org.hisp.dhis.system.callable.IdentifiableObjectCallable;
import org.springframework.transaction.annotation.Transactional;
-import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
@@ -497,21 +494,6 @@
return dataEntryFormStore.listDistinctDataEntryFormByDataSetIds( dataSetIds );
}
- @Override
- public List<DataEntryForm> getDataEntryForms( final Collection<Integer> identifiers )
- {
- List<DataEntryForm> dataEntryForms = getAllDataEntryForms();
-
- return identifiers == null ? dataEntryForms : FilterUtils.filter( dataEntryForms, new Filter<DataEntryForm>()
- {
- @Override
- public boolean retain( DataEntryForm object )
- {
- return identifiers.contains( object.getId() );
- }
- } );
- }
-
// -------------------------------------------------------------------------
// Supportive methods
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/indicator/DefaultIndicatorService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/indicator/DefaultIndicatorService.java 2015-08-25 10:03:15 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/indicator/DefaultIndicatorService.java 2015-10-12 10:18:30 +0000
@@ -132,21 +132,6 @@
}
@Override
- public List<Indicator> getIndicators( final Collection<Integer> identifiers )
- {
- List<Indicator> indicators = getAllIndicators();
-
- return identifiers == null ? indicators : FilterUtils.filter( indicators, new Filter<Indicator>()
- {
- @Override
- public boolean retain( Indicator object )
- {
- return identifiers.contains( object.getId() );
- }
- } );
- }
-
- @Override
public List<Indicator> getIndicatorsByUid( Collection<String> uids )
{
return i18n( i18nService, indicatorStore.getByUid( uids ) );
@@ -253,21 +238,6 @@
}
@Override
- public List<IndicatorType> getIndicatorTypes( final Collection<Integer> identifiers )
- {
- List<IndicatorType> types = getAllIndicatorTypes();
-
- return identifiers == null ? types : FilterUtils.filter( types, new Filter<IndicatorType>()
- {
- @Override
- public boolean retain( IndicatorType object )
- {
- return identifiers.contains( object.getId() );
- }
- } );
- }
-
- @Override
public List<IndicatorType> getAllIndicatorTypes()
{
return i18n( i18nService, indicatorTypeStore.getAll() );
@@ -345,21 +315,6 @@
}
@Override
- public List<IndicatorGroup> getIndicatorGroups( final Collection<Integer> identifiers )
- {
- List<IndicatorGroup> groups = getAllIndicatorGroups();
-
- return identifiers == null ? groups : FilterUtils.filter( groups, new Filter<IndicatorGroup>()
- {
- @Override
- public boolean retain( IndicatorGroup object )
- {
- return identifiers.contains( object.getId() );
- }
- } );
- }
-
- @Override
public IndicatorGroup getIndicatorGroup( String uid )
{
return i18n( i18nService, indicatorGroupStore.getByUid( uid ) );
@@ -474,21 +429,6 @@
}
@Override
- public List<IndicatorGroupSet> getIndicatorGroupSets( final Collection<Integer> identifiers )
- {
- List<IndicatorGroupSet> groupSets = getAllIndicatorGroupSets();
-
- return identifiers == null ? groupSets : FilterUtils.filter( groupSets, new Filter<IndicatorGroupSet>()
- {
- @Override
- public boolean retain( IndicatorGroupSet object )
- {
- return identifiers.contains( object.getId() );
- }
- } );
- }
-
- @Override
public int getIndicatorGroupSetCount()
{
return indicatorGroupSetStore.getCount();
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/period/DefaultPeriodService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/period/DefaultPeriodService.java 2015-09-13 17:45:53 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/period/DefaultPeriodService.java 2015-10-12 10:18:30 +0000
@@ -41,8 +41,6 @@
import org.hisp.dhis.i18n.I18nFormat;
import org.hisp.dhis.system.util.DateUtils;
-import org.hisp.dhis.commons.filter.Filter;
-import org.hisp.dhis.commons.filter.FilterUtils;
import org.springframework.transaction.annotation.Transactional;
/**
@@ -112,21 +110,6 @@
}
@Override
- public List<Period> getPeriods( final Collection<Integer> identifiers )
- {
- List<Period> periods = getAllPeriods();
-
- return identifiers == null ? periods : FilterUtils.filter( periods, new Filter<Period>()
- {
- @Override
- public boolean retain( Period object )
- {
- return identifiers.contains( object.getId() );
- }
- } );
- }
-
- @Override
public List<Period> getPeriodsByPeriodType( PeriodType periodType )
{
return periodStore.getPeriodsByPeriodType( periodType );