What are the iBATIS parameters
This article will explain in detail what are the parameters of iBATIS. Xiaobian thinks it is quite practical, so share it with you for reference. I hope you can gain something after reading this article.
To learn iBATIS parameters, first let's look at which iBATIS parameters are available:
◆iBATIS parameters: prototype parameters
﹤select id="select1" parameterClass="java.lang.String" resultClass="AppLog"﹥ select ID as id, TYPE as type, DESCR as descr from APP_LOG where ID = #id# ﹤/select﹥
sqlMapper.queryForObject("select0", id);
◆iBATIS parameters: Map parameters
﹤select id="select2" parameterClass="java.util.HashMap" resultClass="AppLog"﹥ select ID as id, TYPE as type, DESCR as descr from APP_LOG where ID = #id# ﹤/select﹥
map.put("id", id);
AppLog log = (AppLog) sqlMapper.queryForObject("select0", map);
◆iBATIS parameters: object parameters
﹤select id="select3" parameterClass="AppLog" resultClass="AppLog"﹥ select ID as id, TYPE as type, DESCR as descr from APP_LOG where ID = #id# ﹤/select﹥
AppLog p=new AppLog();
p.setId(id);
AppLog log = (AppLog) sqlMapper.queryForObject("select3", p);
﹤select id="select0" resultClass="AppLog"﹥ select ID as id, TYPE as type, DESCR as descr from APP_LOG where ID = #id# ﹤/select﹥
Map parameter map.put("id", id);
AppLog log = (AppLog) sqlMapper.queryForObject("select0", map);
String Parameter AppLog = (AppLog) sqlMapper.queryForObject("select0", id);
AppLog p=new AppLog();
p.setId(id);
AppLog log = (AppLog) sqlMapper.queryForObject("select0", p);
About "what are the iBATIS parameters" this article is shared here, I hope the above content can be of some help to everyone, so that you can learn more knowledge, if you think the article is good, please share it for more people to see.