<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    天空是藍色的

    做好軟件為中國 #gcc -c helloworld.c -o helloworld.o //編譯目標文件 #gcc helloworld.o -o helloworld //編譯成可執行exe #helloworld //運行exe
    數據加載中……
    修正一下Hibernate取count(*)的方法
        public int getCount(String emailGroupId, String emailBatchId)
                
    throws HibernateException {

            Session session 
    = HibernateUtil.currentSession();
            Transaction tx 
    = session.beginTransaction();

            String hql 
    = "select count(*) from EmailSendInfo where email_group_id = :emailGroupId and batch_id = :batchId";
            Query query 
    = session.createQuery(hql);

            query.setString(
    "emailGroupId", emailGroupId);
            query.setString(
    "batchId", emailBatchId);
            
    /*
             * for (Iterator it = query.iterate(); it.hasNext();) { return
             * ((Integer) it.next()).intValue(); }
             
    */

            
    try {
                
    return ((Integer) query.iterate().next()).intValue();
            }
     catch (Exception e) {
                
    throw new HibernateException("");
            }
     finally {
                tx.commit();
                HibernateUtil.closeSession();
            }

        }

    posted on 2005-12-22 14:20 bluesky 閱讀(3381) 評論(3)  編輯  收藏 所屬分類: 工作總結

    評論

    # re: 修正一下Hibernate取count(*)的方法 2007-01-11 11:18 漂泊

    很好,謝謝,找了半天了!
    終于可以了
      回復  更多評論    

    # re: 修正一下Hibernate取count(*)的方法 2007-09-14 14:32 XT

    為什么我這樣寫,它卻總是報
    return ((Integer) query.iterate().next()).intValue();
    這句話類型轉換錯誤呢?
      回復  更多評論    

    # re: 修正一下Hibernate取count(*)的方法[未登錄] 2007-09-18 22:33 bluesky

    是不是你的數量太大了,超過了Integer類型的范圍了,試下Long?
      回復  更多評論    
    主站蜘蛛池模板: 在线看片无码永久免费aⅴ| 成人免费视频试看120秒| 亚洲精品熟女国产| 黄页网站免费在线观看| 天天看免费高清影视| 和老外3p爽粗大免费视频| 亚洲福利视频导航| 成人免费无码大片a毛片软件| 狠狠热精品免费观看| 亚洲va中文字幕无码久久不卡| 成年私人影院免费视频网站| 一本到卡二卡三卡免费高| 亚洲大香伊人蕉在人依线| 亚洲毛片不卡av在线播放一区| 99免费视频观看| 特黄特色大片免费| 亚洲一线产区二线产区精华| 亚洲欧洲久久久精品| 久久精品免费一区二区喷潮| 91成人免费福利网站在线| 亚洲不卡1卡2卡三卡2021麻豆| 免费一级特黄特色大片在线观看| 三年片在线观看免费观看大全动漫| 日韩国产精品亚洲а∨天堂免| 亚洲国产精久久久久久久| 无码欧精品亚洲日韩一区夜夜嗨 | 免费鲁丝片一级在线观看| 99久久免费国产特黄| 亚洲精品中文字幕无码A片老| 久久国产精品亚洲综合| 又粗又大又猛又爽免费视频| 国产大片91精品免费观看不卡| 精品国产福利尤物免费| 亚洲日本VA午夜在线影院| 中文字幕在线观看亚洲| 91麻豆精品国产自产在线观看亚洲 | 亚洲乱码中文字幕小综合| 亚洲精品无码Av人在线观看国产| 天天天欲色欲色WWW免费| 猫咪免费人成网站在线观看| 国产伦精品一区二区免费|