哦,我的meetList的list对象是在另外一个地方实现的
写在这里的:
public class MeetList{
public static List<Tmeet> tmeetList = null;
public static Configuration config = new Configuration().configure();
public static Session session = config.buildSessionFactory().openSession();
static Criteria criterria = session.createCriteria(Tmeet.class);
static Tmeet tmeet = new Tmeet();
public static List getMeetList(String ID){
if(tmeetList == null){
tmeetList = new ArrayList<Tmeet>();
tmeet.setId(ID);
criterria.add(Example.create(tmeet));
criterria.addOrder(Order.desc("meetTime"));
List list = criterria.list();
for(int i=0;i<list.size();i++){
tmeetList.add((Tmeet)list.get(i));
}
}
return tmeetList;
}
}