コード例 #1
0
 @Override
 public List<DemoVO> findAll(Page pages, String username) {
   {
     Map<String, Object> map = new HashMap<String, Object>();
     map.put("page", pages);
     map.put("username", username);
     List<Demo> l = InstanceFactory.getInstance(DemoRepository.class).pageFindAccount2(map);
     System.out.println(l);
   }
   List<Demo> list =
       InstanceFactory.getInstance(DemoRepository.class).pageFindAccount(pages, username);
   pages.setRows(list);
   return pages.toPage(DemoVO.class).getRows();
 }
コード例 #2
0
 @Override
 public Page pageFindAllAccount() {
   Page pages = new Page(10);
   String username = "******";
   {
     DemoVO vo = new DemoVO();
     vo.setUsername("test");
     vo.setPassword("test");
     saveAccount(vo);
   }
   {
     Map<String, Object> map = new HashMap<String, Object>();
     map.put("page", pages);
     map.put("username", username);
     List<Demo> l = InstanceFactory.getInstance(DemoRepository.class).pageFindAccount2(map);
     System.out.println(l);
   }
   List<Demo> list =
       InstanceFactory.getInstance(DemoRepository.class).pageFindAccount(pages, username);
   pages.setRows(list);
   return pages.toPage(DemoVO.class);
 }