dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #15302
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5484: removed paging from categoryOptionCombo
------------------------------------------------------------
revno: 5484
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2011-12-19 19:23:29 +0100
message:
removed paging from categoryOptionCombo
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementCategoryService.java
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/DefaultDataElementCategoryService.java
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/CategoryOptionComboController.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/DataElementCategoryService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementCategoryService.java 2011-12-19 18:07:12 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementCategoryService.java 2011-12-19 18:23:29 +0000
@@ -440,10 +440,6 @@
int getDataElementCategoryOptionComboCountByName( String name );
- Collection<DataElementCategoryOptionCombo> getDataElementCategoryOptionCombosBetween( int first, int max );
-
- Collection<DataElementCategoryOptionCombo> getDataElementCategoryOptionCombosBetweenByName( String name, int first, int max );
-
int getDataElementCategoryComboCount();
int getDataElementCategoryComboCountByName( String name );
=== 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 2011-12-19 18:07:12 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/DefaultDataElementCategoryService.java 2011-12-19 18:23:29 +0000
@@ -602,16 +602,4 @@
{
return dataElementCategoryOptionStore.getBetweenByName( name, first, max );
}
-
- @Override
- public Collection<DataElementCategoryOptionCombo> getDataElementCategoryOptionCombosBetween( int first, int max )
- {
- return dataElementCategoryOptionComboStore.getBetween( first, max );
- }
-
- @Override
- public Collection<DataElementCategoryOptionCombo> getDataElementCategoryOptionCombosBetweenByName( String name, int first, int max )
- {
- return dataElementCategoryOptionComboStore.getBetweenByName( name, first, max );
- }
}
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/CategoryOptionComboController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/CategoryOptionComboController.java 2011-12-19 18:07:12 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/CategoryOptionComboController.java 2011-12-19 18:23:29 +0000
@@ -64,23 +64,7 @@
public String getCategoryOptionCombos( IdentifiableObjectParams params, Model model, HttpServletRequest request )
{
DataElementCategoryOptionCombos categoryOptionCombos = new DataElementCategoryOptionCombos();
-
- if ( params.isPaging() )
- {
- int total = dataElementCategoryService.getDataElementCategoryOptionComboCount();
-
- Pager pager = new Pager( params.getPage(), total );
- categoryOptionCombos.setPager( pager );
-
- List<DataElementCategoryOptionCombo> categoryOptionComboList = new ArrayList<DataElementCategoryOptionCombo>(
- dataElementCategoryService.getDataElementCategoryOptionCombosBetween( pager.getOffset(), pager.getPageSize() ) );
-
- categoryOptionCombos.setCategoryOptionCombos( categoryOptionComboList );
- }
- else
- {
- categoryOptionCombos.setCategoryOptionCombos( new ArrayList<DataElementCategoryOptionCombo>( dataElementCategoryService.getAllDataElementCategoryOptionCombos() ) );
- }
+ categoryOptionCombos.setCategoryOptionCombos( new ArrayList<DataElementCategoryOptionCombo>( dataElementCategoryService.getAllDataElementCategoryOptionCombos() ) );
if ( params.hasLinks() )
{