空間站

          北極心空

            BlogJava :: 首頁 :: 聯(lián)系 :: 聚合  :: 管理
            15 Posts :: 393 Stories :: 160 Comments :: 0 Trackbacks

          公告

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

          常用鏈接

          留言簿(15)

          我參與的團隊

          搜索

          •  

          最新評論

          閱讀排行榜

          評論排行榜

           

          如何在struts+spring+hibernate的框架下構(gòu)建低耦合高內(nèi)聚的軟件》。昨天和幾個朋友討論問題的時候,談到通過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的框架下構(gòu)建低耦合高內(nèi)聚的軟件》中已經(jīng)給出了這個結(jié)構(gòu)的一個實現(xiàn),供大家參考。




          說明:以上2篇文章均來自:http://fangang.javaeye.com/blog/52883推薦,到原博客閱讀,和下載相關(guān)代碼,此處只是本人收藏,方便查看,在此向作者表示衷心感謝!
          posted on 2007-10-15 09:44 蘆葦 閱讀(479) 評論(0)  編輯  收藏 所屬分類: SpringJAVAHibernate
          主站蜘蛛池模板: 西乡县| 株洲县| 津市市| 观塘区| 镇沅| 仁化县| 唐海县| 奉化市| 城口县| 辽阳市| 莱芜市| 扎囊县| 鹤庆县| 江津市| 沂水县| 兴安盟| 北川| 伊宁县| 舟曲县| 上思县| 沙河市| 普定县| 钟祥市| 昌黎县| 什邡市| 肇东市| 青海省| 鹤岗市| 康乐县| 锡林浩特市| 奈曼旗| 黑水县| 南开区| 青州市| 永兴县| 息烽县| 古交市| 枣强县| 洛浦县| 阳原县| 武安市|