iBatis参数例子
?
原型参数
<select id="select1" parameterresultparameterresultparameterresultresultClass="AppLog">
select
ID as id,
TYPE as type,
DESCR as descr
from APP_LOG
where ID = #id#
</select>
?
Map参数 ?map.put("id", id);
AppLog log = (AppLog) sqlMapper.queryForObject("select0", map);
String参数 ?AppLog log = (AppLog) sqlMapper.queryForObject("select0", id);
对象参数 ?AppLog p=new AppLog();
p.setId(id);
AppLog log = (AppLog) sqlMapper.queryForObject("select0", p);