List of usage examples for org.apache.ibatis.session SqlSession selectList
<E> List<E> selectList(String statement, Object parameter);
From source file:shfq.one_to_many2.OneToManyTest.java
License:Apache License
public static void main(String[] args) throws Exception { SqlSession session = SessionUtil.getSessionByConfigXmlPath("shfq/one_to_many2/mybatis-config.xml"); Object o = session.selectList("shfq.one_many_annotation.People.selectPeople", 1); System.out.println(""); }
From source file:shfq.one_to_many3.OneToManyTest.java
License:Apache License
public static void main(String[] args) throws Exception { SqlSession session = SessionUtil.getSessionByConfigXmlPath("shfq/one_to_many3/mybatis-config.xml"); Object o = session.selectList("shfq.one_many_annotation.People.selectPeople", 2); System.out.println(""); }
From source file:shfq.one_to_many_null_cache_key.OneToManyNullCacheKeyTest.java
License:Apache License
public static void main(String[] args) throws Exception { SqlSession session = SessionUtil .getSessionByConfigXmlPath("shfq/one_to_many_null_cache_key/mybatis-config.xml"); Object o = session.selectList("shfq.one_to_many_null_cache_key.People.selectPeople", 1); System.out.println(""); }
From source file:webim.dao.ibatis.WebimRoomDao.java
License:Apache License
public List<WebimRoom> getRoomsOfUser(String uid) { SqlSession session = sessionFactory.openSession(); List<WebimRoom> rooms = new ArrayList<WebimRoom>(); try {//from www . jav a 2s. c om rooms = session.selectList("RoomMapper.getRoomsOfUser", uid); } catch (Exception e) { e.printStackTrace(); } finally { session.close(); } return rooms; }
From source file:webim.dao.ibatis.WebimRoomDao.java
License:Apache License
public List<WebimRoom> getRoomsByIds(String uid, String[] ids) { SqlSession session = sessionFactory.openSession(); List<WebimRoom> rooms = new ArrayList<WebimRoom>(); try {//from www. j a va 2s . c om rooms = session.selectList("RoomMapper.getRoomsByIds", ids); } catch (Exception e) { e.printStackTrace(); } finally { session.close(); } return rooms; }
From source file:webim.dao.ibatis.WebimRoomDao.java
License:Apache License
public List<WebimMember> getMembersOfRoom(String roomId) { SqlSession session = sessionFactory.openSession(); List<WebimMember> members = new ArrayList<WebimMember>(); try {// w ww . j a va2s . c o m members = session.selectList("RoomMapper.getMembersOfRoom", roomId); } catch (Exception e) { e.printStackTrace(); } finally { session.close(); } return members; }
From source file:webim.dao.ibatis.WebimVisitorDao.java
License:Apache License
public List<WebimVisitor> findAll(String[] vids) { List<WebimVisitor> visitors = new ArrayList<WebimVisitor>(); SqlSession session = sessionFactory.openSession(); try {/*from w w w . j a v a 2 s.c om*/ visitors = session.selectList("VisitorMapper.findVisitors", vids); } catch (Exception e) { e.printStackTrace(); } finally { session.close(); } return visitors; }