waterye

          Preview of new JDBC features for Spring 1.3

          支持命名參數(shù)查詢
          public List getPreferredBeer() {
              Map 
          params = new HashMap(2);
              
          params.put("unwantedBrand""Heineken");
              
          params.put("maxPrice"new BigDecimal(25.00));
              List l 
          = getJdbcTemplate().queryForList(
                
          "select id, price, brand from beers " +
                
          "where price < :maxPrice and brand <> :unwantedBrand",
                
          params);
              
          return l;
            }


          Preview of new JDBC features for Spring 1.3

          posted on 2005-08-25 20:45 waterye 閱讀(547) 評論(3)  編輯  收藏 所屬分類: spring

          Feedback

          # re: Preview of new JDBC features for Spring 1.3 2005-08-25 21:25 江南白衣@ITO

          希望spring能繼續(xù)吸收o/r broker,ibatis的優(yōu)點,成為非orm時的首選簡單方案。不過說實話,命名參數(shù)這功能好簡單,兩三個小時就夠?qū)崿F(xiàn)了,1.3才加進來顯得有點晚啦~~~~  回復(fù)  更多評論   

          # re: Preview of new JDBC features for Spring 1.3 2005-08-25 21:34 Water Ye@ITO

          ActiveMapper的作者Thomas Risberg寫的
          到時Spring Jdbc用于查詢, ActiveMapper用于cud, 是種不錯的方案
            回復(fù)  更多評論   

          # re: Preview of new JDBC features for Spring 1.3 2005-08-25 21:37 江南白衣@ITO

          ActiveMapper前天的CVS好象又動了一下,但進度還是慢阿~~~~.  回復(fù)  更多評論   

          My Links

          Blog Stats

          News

          留言簿(7)

          隨筆檔案(175)

          最新隨筆

          搜索

          最新評論

          主站蜘蛛池模板: 仁化县| 开远市| 桂阳县| 陈巴尔虎旗| 龙陵县| 福建省| 丰都县| 博乐市| 吴旗县| 中西区| 宁明县| 霸州市| 宝清县| 庆云县| 郯城县| 商河县| 双牌县| 衡南县| 磐安县| 揭阳市| 黎川县| 芜湖县| 宁安市| 洛隆县| 上栗县| 邢台县| 宣恩县| 溧水县| 工布江达县| 安仁县| 屯留县| 蓬安县| 高清| 许昌县| 察雅县| 辽宁省| 鄱阳县| 宜春市| 建宁县| 光山县| 浏阳市|