本站首页    管理页面    写新日志    退出


«August 2025»
12
3456789
10111213141516
17181920212223
24252627282930
31


公告
 本博客在此声明所有文章均为转摘,只做资料收集使用。

我的分类(专题)

日志更新

最新评论

留言板

链接

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


阅读全文(18351) | 回复(0) | 编辑 | 精华 | 删除
 


[iBatis]关于 iBATIS 的几点补充
软件技术

lhwork 发表于 2008/3/11 16:24:27

14.6. 在iBATIS 2.09以后SQLMap


阅读全文(6065) | 回复(0) | 编辑 | 精华 | 删除
 


[iBatis]IBatis中的强制刷新缓存
软件技术

lhwork 发表于 2008/3/11 16:24:04

了IBatis内置的缓存作为缓存方案.并使用了spring集成IBatis

我在我的一篇文章"使用IBatis作数据缓存"谈到了使用IBaits作缓存,但这或许是不够的,为了给测试人员提供方便,必须提供一个 强制刷新缓存的功能,如何实现?马上进入实战:

我们通过一个jsp搞定
阅读全文(6262) | 回复(1) | 编辑 | 精华 | 删除
 


[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() {
     

阅读全文(9400) | 回复(1) | 编辑 | 精华 | 删除
 


[iBatis]一个使用ibatis对数据库增删改查的例子
软件技术

lhwork 发表于 2008/3/11 16:20:06

一个使用ibatis对数据库增删改查的例子

阅读全文(3809) | 回复(0) | 编辑 | 精华 | 删除
 


[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

阅读全文(3605) | 回复(0) | 编辑 | 精华 | 删除
 


[iBatis]解决Ibatis一对多映射n+1问题
软件技术

lhwork 发表于 2008/3/11 16:17:47

存在一对多的逻辑关系,比如视频和视频标签(严格来讲是多对多的关系),目前想取出一些视频和该视频包含的标签,传统的做法往往会存在n+1问题,对性能有些影响

在IBatis中如何做?马上进入实战

配置文件如下:
阅读全文(5988) | 回复(0) | 编辑 | 精华 | 删除
 


« 1



站点首页 | 联系我们 | 博客注册 | 博客登陆

Sponsored By W3CHINA
W3CHINA Blog 0.8 Processed in 0.422 second(s), page refreshed 144776319 times.
《全国人大常委会关于维护互联网安全的决定》  《计算机信息网络国际联网安全保护管理办法》
苏ICP备05006046号