Commit 7e477cf7 authored by Michael Ritter's avatar Michael Ritter
Browse files

Use CollectionState enum in query param

parent 443eb2c3
...@@ -32,6 +32,7 @@ package edu.umiacs.ace.monitor.access; ...@@ -32,6 +32,7 @@ package edu.umiacs.ace.monitor.access;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
import edu.umiacs.ace.monitor.core.Collection; import edu.umiacs.ace.monitor.core.Collection;
import edu.umiacs.ace.monitor.core.CollectionState;
import edu.umiacs.ace.monitor.support.CStateBean; import edu.umiacs.ace.monitor.support.CStateBean;
import edu.umiacs.ace.monitor.support.PageBean; import edu.umiacs.ace.monitor.support.PageBean;
import edu.umiacs.ace.util.EntityManagerServlet; import edu.umiacs.ace.util.EntityManagerServlet;
...@@ -96,8 +97,6 @@ public class StatusServlet extends EntityManagerServlet { ...@@ -96,8 +97,6 @@ public class StatusServlet extends EntityManagerServlet {
RequestDispatcher dispatcher; RequestDispatcher dispatcher;
List<CollectionSummaryBean> collections; List<CollectionSummaryBean> collections;
List<Collection> items; List<Collection> items;
LOG.info("Processing /Status request");
LOG.info("Processing /Status additional info");
long page = getParameter(request, PARAM_PAGE, DEFAULT_PAGE); long page = getParameter(request, PARAM_PAGE, DEFAULT_PAGE);
int count = (int) getParameter(request, PARAM_COUNT, DEFAULT_COUNT); int count = (int) getParameter(request, PARAM_COUNT, DEFAULT_COUNT);
...@@ -184,8 +183,8 @@ public class StatusServlet extends EntityManagerServlet { ...@@ -184,8 +183,8 @@ public class StatusServlet extends EntityManagerServlet {
} }
if (!Strings.isEmpty(state) && state.length() == 1) { if (!Strings.isEmpty(state) && state.length() == 1) {
query.setParameter(PARAM_STATE, state.charAt(0)); query.setParameter(PARAM_STATE, CollectionState.fromChar(state.charAt(0)));
countQuery.setParameter(PARAM_STATE, state.charAt(0)); countQuery.setParameter(PARAM_STATE, CollectionState.fromChar(state.charAt(0)));
} }
items = query.getResultList(); items = query.getResultList();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment