← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 21242: minor fix for TranslationController

 

------------------------------------------------------------
revno: 21242
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2015-12-01 10:03:14 +0700
message:
  minor fix for TranslationController
modified:
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/TranslationController.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/webapi/controller/TranslationController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/TranslationController.java	2015-02-20 09:14:02 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/TranslationController.java	2015-12-01 03:03:14 +0000
@@ -28,18 +28,11 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import com.google.common.collect.Lists;
-import org.hisp.dhis.common.Pager;
-import org.hisp.dhis.query.Order;
 import org.hisp.dhis.schema.descriptors.TranslationSchemaDescriptor;
 import org.hisp.dhis.translation.Translation;
-import org.hisp.dhis.webapi.webdomain.WebMetaData;
-import org.hisp.dhis.webapi.webdomain.WebOptions;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
 
-import java.util.List;
-
 /**
  * @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
  */
@@ -47,25 +40,4 @@
 @RequestMapping( value = TranslationSchemaDescriptor.API_ENDPOINT )
 public class TranslationController extends AbstractCrudController<Translation>
 {
-    @Override
-    protected List<Translation> getEntityList( WebMetaData metaData, WebOptions options, List<String> filters, List<Order> orders )
-    {
-        List<Translation> entityList;
-
-        if ( options.hasPaging() )
-        {
-            int count = manager.getCount( getEntityClass() );
-
-            Pager pager = new Pager( options.getPage(), count, options.getPageSize() );
-            metaData.setPager( pager );
-
-            entityList = Lists.newArrayList( manager.getBetween( getEntityClass(), pager.getOffset(), pager.getPageSize() ) );
-        }
-        else
-        {
-            entityList = Lists.newArrayList( manager.getAll( getEntityClass() ) );
-        }
-
-        return entityList;
-    }
 }