@Test @DataSet("ViewSpaceDao.ViewSpaces.xls") public void queryByName() throws Exception { List viewSpaces = viewSpaceDao.queryByName("鼓浪屿"); assertNotNull(viewSpaces); assertEquals(viewSpaces.size(),1); }
public List<ViewSpace> queryByName(String name) { String hql = "from ViewSpace vs where vs.spaceName like ?"; name = "%" + name + "%"; return (List<ViewSpace>) find(hql, name); }
ViewSpaceDao extends BaseDao<ViewSpace> { public List<ViewSpace> queryByName(String name) { String hql = "from ViewSpace vs where vs.spaceName like ?"; name = "%" + name + "%"; return (List<ViewSpace>) find(hql, name); } }
ViewSpaceDao extends BaseDao<ViewSpace> { public List<ViewSpace> queryByName(String name) { String hql = "from ViewSpace vs where vs.spaceName like ?"; name = "%" + name + "%"; return (List<ViewSpace>) find(hql, name); }  }
ViewSpaceDao extends BaseDao<ViewSpace> { public List<ViewSpace> queryByName(String name) { String hql = "from ViewSpace vs where vs.spaceName like ?"; name = "%" + name + "%"; return (List<ViewSpace>) find(hql, name); }  List<ViewSpace> queryByName(String name); List<ViewSpace> queryByUserId(int userId); }
ViewSpaceDao extends BaseDao<ViewSpace> { public List<ViewSpace> queryByName(String name) { String hql = "from ViewSpace vs where vs.spaceName like ?"; name = "%" + name + "%"; return (List<ViewSpace>) find(hql, name); }  List<ViewSpace> queryByName(String name); List<ViewSpace> queryByUserId(int userId);  }