资讯

精准传达 • 有效沟通

从品牌网站建设到网络营销策划,从策略到执行的一站式服务

iBATIS参数有哪些

这篇文章将为大家详细讲解有关iBATIS参数有哪些,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。

成都创新互联公司专业为企业提供七里河网站建设、七里河做网站、七里河网站设计、七里河网站制作等企业网站建设、网页设计与制作、七里河企业网站模板建站服务,十载七里河做网站经验,不只是建网站,更提供有价值的思路和整体网络服务。

iBATIS参数的学习,首先我们看看都有哪些iBATIS参数:

◆iBATIS参数之:原型参数

﹤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参数之:Map类参数

﹤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参数之:对象参数

﹤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参数  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);

关于“iBATIS参数有哪些”这篇文章就分享到这里了,希望以上内容可以对大家有一定的帮助,使各位可以学到更多知识,如果觉得文章不错,请把它分享出去让更多的人看到。


网站栏目:iBATIS参数有哪些
URL地址:http://cdkjz.cn/article/jiehji.html
多年建站经验

多一份参考,总有益处

联系快上网,免费获得专属《策划方案》及报价

咨询相关问题或预约面谈,可以通过以下方式与我们联系

大客户专线   成都:13518219792   座机:028-86922220