浏览 2744 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
|
|
---|---|
作者 | 正文 |
发表时间:2003-12-24
声明:ITeye文章版权属于作者,受法律保护。没有作者书面许可不得转载。
推荐链接
|
|
返回顶楼 | |
发表时间:2003-12-24
能不能把你的程序代码贴出来?
|
|
返回顶楼 | |
发表时间:2003-12-24
public Vector getList(String times,String timee,String inftypeid,String dest_nbr) throws HibernateException
{ Vector vec=new Vector(10,2); Iterator it = null; beginTransaction(); String queryString = "select DispenseMobileWaits from DispenseMobileWait as DispenseMobileWaits "; String substr=""; if (times != null) substr += " DispenseMobileWaits.moTime>=:times and"; if (timee != null) substr += " DispenseMobileWaits.moTime<=:timee and"; if (inftypeid != null) substr += " DispenseMobileWaits.infTypeId=:inftypeid and"; if (dest_nbr != null) substr += " DispenseMobileWaits.destNbr=:destbr and"; if (!substr.equals("")) { queryString+=" where "+substr.substring(0,substr.length()-3); } Query query=session.createQuery(queryString+" order by DispenseMobileWaits.moTime "); if (times != null) query.setString("times",times); if (timee != null) query.setString("timee",timee); if (inftypeid != null) query.setString("inftypeid",inftypeid); if (dest_nbr != null) query.setString("destbr",dest_nbr); it=query.iterate(); while (it.hasNext()) { DispenseMobileWait dmw=(DispenseMobileWait)it.next(); String[] stemp={"","","","","","","","","","","",""}; stemp[0] = dmw.getSpCode(); stemp[1] = dmw.getInfTypeId(); stemp[2] = dmw.getReplyType(); stemp[3] = dmw.getAcctNbr(); stemp[4] = dmw.getDestNbr(); stemp[5] = dmw.getServiceCode(); stemp[6] = dmw.getInformationId()+""; stemp[7] = dmw.getFeeType(); stemp[8] = dmw.getFeeCode(); stemp[9] = dmw.getMsgContent(); stemp[10] = dmw.getMsgPri(); stemp[11]=dmw.getMoTime(); vec.addElement(stemp); } endTransaction(false); return vec; } |
|
返回顶楼 | |
发表时间:2003-12-25
帮帮忙撒
|
|
返回顶楼 | |
发表时间:2003-12-25
不太明白你这段代码要完成的工作
这段代码也不太完整,你肯定是这段代码的问题么? |
|
返回顶楼 | |