dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #24875
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 12240: Simplication
------------------------------------------------------------
revno: 12240
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2013-09-25 15:51:20 +0200
message:
Simplication
modified:
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/AbstractCrudController.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-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/AbstractCrudController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/AbstractCrudController.java 2013-09-25 13:21:51 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/AbstractCrudController.java 2013-09-25 13:51:20 +0000
@@ -295,21 +295,14 @@
protected List<T> queryForEntityList( WebMetaData metaData, WebOptions options, String query )
{
- List<T> entityList;
+ List<T> entityList = new ArrayList<T>( manager.filter( getEntityClass(), query ) );
if ( options.hasPaging() )
{
- entityList = new ArrayList<T>( manager.filter( getEntityClass(), query ) );
-
Pager pager = new Pager( options.getPage(), entityList.size(), options.getPageSize() );
metaData.setPager( pager );
entityList = PagerUtils.pageCollection( entityList, pager );
-
- }
- else
- {
- entityList = new ArrayList<T>( manager.filter( getEntityClass(), query ) );
}
return entityList;