@SuppressWarnings("unchecked")
	@Test
	public void QueryStudent(){
		Session session = HibernateUtil.currentSession();
		Transaction tx = session.beginTransaction();
		
		List<Student> slist = new ArrayList<Student>();
		
		String hql = "select s from Student as s";
		Query q = session.createQuery(hql);
		slist = q.list();
		
		Student s = null;
		Book b = null;
		for(int i=0;i<slist.size();i++){
			s = slist.get(i);
			System.out.println("学生姓名:"+s.getsName()+";年龄"+s.getsAge());
			Set<?> book = s.getBook();
			Iterator<?> it = book.iterator();
			
			while(it.hasNext()){
				b = (Book) it.next();
				System.out.println("书本名字:"+b.getbName()+";价格:"+b.getbPrice());
			}
		}
		
		tx.commit();
		HibernateUtil.closeSession();
	}