空間站

          北極心空

            BlogJava :: 首頁 :: 聯系 :: 聚合  :: 管理
            15 Posts :: 393 Stories :: 160 Comments :: 0 Trackbacks

          公告

          本博客主要是在本人收集網上一些精彩技術文章,有時可能因疏忽轉載的時候沒有說明轉載出處和作者,如果您認為哪篇文章侵犯了你的版權,請通知本人: EMAIL:luwei-80@163.com 歡迎您光臨本博客!

          常用鏈接

          留言簿(15)

          我參與的團隊

          搜索

          •  

          最新評論

          閱讀排行榜

          評論排行榜

           

          如何在struts+spring+hibernate的框架下構建低耦合高內聚的軟件》。昨天和幾個朋友討論問題的時候,談到通過DaoSupport

          2
          java 代碼

          1. package com.htxx.thps.psb.dao.imp;   
          2.   
          3. import com.htxx.service.dao.BasicDao;   
          4. import com.htxx.service.dao.Condition;   
          5. import com.htxx.service.dao.ResultSet;   
          6. import com.htxx.thps.model.PsPsb;   
          7. import com.htxx.thps.model.PsPsjcd;   
          8. import com.htxx.thps.model.PsWtmx;   
          9. import com.htxx.thps.psb.dao.PsbDao;   
          10.   
          11. /**  
          12.  * @author FanGang  
          13.  *  
          14.  */  
          15. public class PsbDaoImp extends BasicDao implements PsbDao {   
          16.   
          17.     /* (non-Javadoc)  
          18.      * @see com.htxx.thps.psb.dao.PsbDao#getPsb(java.lang.String)  
          19.      */  
          20.     public PsPsb getPsb(String id) {   
          21.         return (PsPsb)this.load(PsPsb.class, id);   
          22.     }   
          23.   
          24.     /* (non-Javadoc)  
          25.      * @see com.htxx.thps.psb.dao.PsbDao#updatePsb(com.htxx.thps.model.PsPsb)  
          26.      */  
          27.     public void updatePsb(PsPsb vo) {   
          28.         this.update(vo);   
          29.     }   
          30.   
          31.     /* (non-Javadoc)  
          32.      * @see com.htxx.thps.psb.dao.PsbDao#getPsb(com.htxx.service.dao.Condition)  
          33.      */  
          34.     public ResultSet getPsb(Condition condition) {   
          35.         return this.query("PsPsb", condition);   
          36.     }   
          37.   
          38.     public PsPsjcd getPsjcd(String id) {   
          39.         return (PsPsjcd)this.load(PsPsjcd.class, id);   
          40.     }   
          41.   
          42.     public ResultSet getPsjcd(Condition condition) {   
          43.         return this.query("PsPsjcd", condition);   
          44.     }   
          45.   
          46.     public PsWtmx getWtmx(String id) {   
          47.         return (PsWtmx)this.load(PsWtmx.class, id);   
          48.     }   
          49.   
          50.     public ResultSet getWtmx(Condition condition) {   
          51.         return this.query("PsWtmx", condition);   
          52.     }   
          53.   
          54.     public void updatePsjcd(PsPsjcd vo) {   
          55.         this.update(vo);   
          56.     }   
          57.   
          58.     public void updateWtmx(PsWtmx vo) {   
          59.         this.update(vo);   
          60.     }   
          61.   
          62. }  
          4
           

           

          如何在struts+spring+hibernate的框架下構建低耦合高內聚的軟件》中已經給出了這個結構的一個實現,供大家參考。




          說明:以上2篇文章均來自:http://fangang.javaeye.com/blog/52883推薦,到原博客閱讀,和下載相關代碼,此處只是本人收藏,方便查看,在此向作者表示衷心感謝!
          posted on 2007-10-15 09:44 蘆葦 閱讀(479) 評論(0)  編輯  收藏 所屬分類: SpringJAVAHibernate
          主站蜘蛛池模板: 武功县| 闸北区| 阜宁县| 佛教| 罗城| 西畴县| 尼勒克县| 基隆市| 恩平市| 东兴市| 南宁市| 从江县| 怀化市| 昌宁县| 汉川市| 平原县| 如东县| 阜平县| 苍溪县| 高青县| 库伦旗| 西安市| 梅河口市| 大同市| 若羌县| 乐陵市| 武定县| 太仓市| 株洲市| 喀喇| 逊克县| 焦作市| 茶陵县| 成安县| 讷河市| 中阳县| 历史| 恭城| 双柏县| 宾阳县| 获嘉县|