Blog信息 |
blog名称: 日志总数:1304 评论数量:2242 留言数量:5 访问次数:7595348 建立时间:2006年5月29日 |

| |
[iBatis]iBatis for Paging 软件技术
lhwork 发表于 2008/4/2 9:38:54 |
I'm trying to move from pure jdbc to iBatis DAO and SQLMaps. Why iBatis? I have the experience and it is comfortable to be used in an environment where are lots of pre written database procedures and complex queries.
One of the reason why the move to iBatis was due to paging, the requirement is to show data from more than 4 million records, querying data for paging was taking a lot of time using result set. Next step was moving to scrollable result set, however managing the connection |
|
[iBatis]IBatis中的强制刷新缓存 软件技术
lhwork 发表于 2008/3/11 16:24:04 |
了IBatis内置的缓存作为缓存方案.并使用了spring集成IBatis
我在我的一篇文章"使用IBatis作数据缓存"谈到了使用IBaits作缓存,但这或许是不够的,为了给测试人员提供方便,必须提供一个 强制刷新缓存的功能,如何实现?马上进入实战:
我们通过一个jsp搞定
| |
[iBatis]iBatis对批量update的支持 软件技术
lhwork 发表于 2008/3/11 16:23:33 |
最近遇到需要批量update数据的问题,一开始用了一个for循环去update,数据量大的时候效率很低。原因是for循环每次update一条语句,都是一次连接过程。遇到大批数据更新的时候,效率就可想而知了。在google上找了一遍,发现iBatis里有对批量update的支持,挺好的东西。
代码如下: final List tempList = list; try { if (List tempList != null) { template.execute( new SqlMapClientCallback() { |
|
[iBatis]一个使用ibatis对数据库增删改查的例子 软件技术
lhwork 发表于 2008/3/11 16:18:32 |
一个使用ibatis对数据库增删改查的例子: 这里用的开发环境是:Eclipse3.2+mysql5.0.20,ibatis包是ibatis-common-2.jar, ibatis-dao-2.jar,ibatis-sqlmap-2.jar,mysql包是mysql-connector-java-5.0.3-bin.jar. 步骤: 1.创建数据库: create database itcast; use itcast; 创建表: create table student ( id int primary key auto_increment, firstname varchar(20) not null, lastname varchar(20) not null )
2.创建POJO类,Student.java,此程序中用到的所有类都放在cn.itca |
|
« 1 ›
|