public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
resp.setContentType("text/plain");
resp.getWriter().println("Hello, world");
// PersistenceManager pm = PMF.get().getPersistenceManager();
CarRegService service = new CarRegServiceImpl();
// CarReg cr = new CarReg();
//
// cr.setDeviceID("deviceID");
//
// service.add(cr);
List<CarReg> list = service.getPaginationData().getResultList();
int i = 0;
Long key = null;
resp.getWriter().println("count=" + list.size());
for (CarReg o : list) {
resp.getWriter().println("index:" + (++i) + ", CarReg=" + JSON.toJSONString(o));
resp.getWriter().println("index:" + (++i) + ", key=" + KeyFactory.keyToString(o.getKey()));
key = o.getKey().getId();
// service.delete(o.getKey());
}
resp.getWriter().println("get last=" + JSON.toJSONString(service.getDataByID(key)));
// Query q = pm.newQuery(CarReg.class);
// try {
// List<CarReg> list = (List<CarReg>) q.execute();
// int i = 0;