frank oo java

我爱oo,我爱java。http://oofrank.blogchina.com

My Links

Blog统计

公告

欢迎到 oofrank@blogchina 来 QQ:421057986 email:oofrank@163.com
www.flickr.com
oofrank@flickr with my S9500

Free Download Manager
Free Download Manager

文章

收藏

相册

IT

other

存档


正在读取评论……

1:abator下载:http://ibatis.apache.org/abator.html
2:将abator安装到eclipse中
3:此时可以新建一种文件类型:Abator for iBATIS Configuration File,建立一个
4:在 jdbcConnection 中设置要mapping的数据库的jdbc连接
  classPathEntry 是你的jdbc driver类路径
5:javaModelGenerator,sqlMapGenerator,daoGenerator 分别设置 java dataObject、sql mapping文件和 DAO 接口、实现类的生成位置:targetPackage 目标包,targetProject:eclipse项目
6:daoGenerator 中可以设置属性  type: ibatis 或 spring 指定生成的dao实现类是使用com.ibatis.dao.client.template.SqlMapDaoTemplate
还是
org.springframework.orm.ibatis.support.SqlMapClientDaoSupport
7: table 中 tableName 指定要处理的表名
  可以有多个table
8:table中可以包含子元素 generatedKey: 使Insert方法可以返回值--由指定的column mapping
9:generatedKey中的sqlStatement属性可以是获取sequence的SQL,也可以是获取自增值的SQL
  比如:Oracle的 select theSequence.nextVal from dual
       SQLServer的 SELECT @@IDENTITY as  column_name
10:保存文件,选中文件,右键菜单选择Generate iBATIS Artifacts! ok...





Trackback: http://tb.donews.net/TrackBack.aspx?PostId=676620


[点击此处收藏本文]  发表于2005年12月29日 10:50 PM




正在读取评论……
大名
网址
验证码
评论