日韩无码专区无码一级三级片|91人人爱网站中日韩无码电影|厨房大战丰满熟妇|AV高清无码在线免费观看|另类AV日韩少妇熟女|中文日本大黄一级黄色片|色情在线视频免费|亚洲成人特黄a片|黄片wwwav色图欧美|欧亚乱色一区二区三区

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務時間:8:30-17:00
你可能遇到了下面的問題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
iBATIS參數(shù)理解淺析

iBATIS參數(shù)的學習,首先我們看看都有哪些iBATIS參數(shù):

◆iBATIS參數(shù)之:原型參數(shù)

 
 
 
  1. ﹤select id="select1" parameterClass="java.lang.String" resultClass="AppLog"﹥
  2. select
  3. ID as id,
  4. TYPE as type,
  5. DESCR as descr
  6. from APP_LOG
  7. where ID = #id#
  8. ﹤/select﹥

sqlMapper.queryForObject("select0", id);

◆iBATIS參數(shù)之:Map類參數(shù)

 
 
 
  1. ﹤select id="select2" parameterClass="java.util.HashMap" resultClass="AppLog"﹥
  2. select
  3. ID as id,
  4. TYPE as type,
  5. DESCR as descr
  6. from APP_LOG
  7. where ID = #id#
  8. ﹤/select﹥ 

map.put("id", id);

AppLog log = (AppLog) sqlMapper.queryForObject("select0", map);

◆iBATIS參數(shù)之:對象參數(shù)

 
 
 
  1. ﹤select id="select3" parameterClass="AppLog" resultClass="AppLog"﹥
  2. select
  3. ID as id,
  4. TYPE as type,
  5. DESCR as descr
  6. from APP_LOG
  7. where ID = #id#
  8. ﹤/select﹥

AppLog p=new AppLog();
p.setId(id);
AppLog log = (AppLog) sqlMapper.queryForObject("select3", p);

 
 
 
  1. ﹤select id="select0" resultClass="AppLog"﹥
  2. select
  3. ID as id,
  4. TYPE as type,
  5. DESCR as descr
  6. from APP_LOG
  7. where ID = #id#
  8. ﹤/select﹥

Map參數(shù)  map.put("id", id);

AppLog log = (AppLog) sqlMapper.queryForObject("select0", map);

String參數(shù)  AppLog log = (AppLog) sqlMapper.queryForObject("select0", id);

對象參數(shù)  AppLog p=new AppLog();

p.setId(id);

AppLog log = (AppLog) sqlMapper.queryForObject("select0", p);

iBATIS參數(shù)的基本情況就介紹到這里,希望通過介紹使得你對iBATIS參數(shù)有一定的了解。


當前標題:iBATIS參數(shù)理解淺析
網(wǎng)站鏈接:http://m.5511xx.com/article/djjoiog.html