package com.dong.users.dao.impl;
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.LockMode;
import org.springframework.context.ApplicationContext;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
import com.dong.users.dao.IUsersInfoDAO;
import com.dong.users.entity.UsersInfo;
/**
* Data access object (DAO) for domain model class UsersInfo.
*
* @see com.dong.users.entity.UsersInfo
* @author MyEclipse Persistence Tools
*/
public class UsersInfoDAO extends HibernateDaoSupport implements IUsersInfoDAO {
private static final Log log = LogFactory.getLog(UsersInfoDAO.class);
protected void initDao() {
// do nothing
}
public void save(UsersInfo transientInstance) {
log.debug("saving UsersInfo instance");
try {
getHibernateTemplate().save(transientInstance);
log.debug("save successful");
} catch (RuntimeException re) {
log.error("save failed", re);
throw re;
}
}
public void delete(UsersInfo persistentInstance) {
log.debug("deleting UsersInfo instance");
try {
getHibernateTemplate().delete(persistentInstance);
log.debug("delete successful");
} catch (RuntimeException re) {
log.error("delete failed", re);
throw re;
}
}
public UsersInfo findById(java.lang.Integer id) {
log.debug("getting UsersInfo instance with id: " + id);
try {
UsersInfo instance = (UsersInfo) getHibernateTemplate().get(
"com.dong.users.entity.UsersInfo", id);
return instance;
} catch (RuntimeException re) {
log.error("get failed", re);
throw re;
}
}
public List findByExample(UsersInfo instance) {
log.debug("finding UsersInfo instance by example");
try {
List results = getHibernateTemplate().findByExample(instance);
log.debug("find by example successful, result size: "
+ results.size());
return results;
} catch (RuntimeException re) {
log.error("find by example failed", re);
throw re;
}
}
public List findByProperty(String propertyName, Object value) {
log.debug("finding UsersInfo instance with property: " + propertyName
+ ", value: " + value);
try {
String queryString = "from UsersInfo as model where model."
+ propertyName + "= ?";
return getHibernateTemplate().find(queryString, value);
} catch (RuntimeException re) {
log.error("find by property name failed", re);
throw re;
}
}
public List findByUserName(Object userName) {
return findByProperty(USER_NAME, userName);
}
public List findByUserPassword(Object userPassword) {
return findByProperty(USER_PASSWORD, userPassword);
}
public List findAll() {
log.debug("finding all UsersInfo instances");
try {
String queryString = "from UsersInfo";
return getHibernateTemplate().find(queryString);
} catch (RuntimeException re) {
log.error("find all failed", re);
throw re;
}
}
public UsersInfo merge(UsersInfo detachedInstance) {
log.debug("merging UsersInfo instance");
try {
UsersInfo result = (UsersInfo) getHibernateTemplate().merge(
detachedInstance);
log.debug("merge successful");
return result;
} catch (RuntimeException re) {
log.error("merge failed", re);
throw re;
}
}
public void attachDirty(UsersInfo instance) {
log.debug("attaching dirty UsersInfo instance");
try {
getHibernateTemplate().saveOrUpdate(instance);
log.debug("attach successful");
} catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
public void attachClean(UsersInfo instance) {
log.debug("attaching clean UsersInfo instance");
try {
getHibernateTemplate().lock(instance, LockMode.NONE);
log.debug("attach successful");
} catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
public static IUsersInfoDAO getFromApplicationContext(ApplicationContext ctx) {
return (IUsersInfoDAO) ctx.getBean("UsersInfoDAO");
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
J2EE-SSH实现数据增删改查示例
共109个文件
jar:64个
java:8个
class:8个
5星 · 超过95%的资源 需积分: 9 59 下载量 130 浏览量
2010-07-22
02:38:10
上传
评论 2
收藏 13.4MB RAR 举报
温馨提示
这是一个J2EE-SSH实现数据增删改查示例,采用现比较流行的一些技术(struts+hibernate+spring)
资源推荐
资源详情
资源评论
收起资源包目录
J2EE-SSH实现数据增删改查示例 (109个子文件)
UsersInfoDAO.class 5KB
UsersAction.class 3KB
UsersInfoService.class 2KB
SetEncodingFilter.class 1KB
UsersForm.class 1KB
UsersInfo.class 1KB
IUsersInfoDAO.class 825B
IUsersInfoService.class 435B
.classpath 5KB
hibernate3.jar 1.38MB
itext-1.3.jar 1.08MB
xerces-2.6.2.jar 966KB
db-ojb-1.0.4.jar 905KB
jasperreports-1.0.3.jar 751KB
freemarker.jar 690KB
poi-2.5.1.jar 682KB
jxl.jar 520KB
commons-collections.jar 480KB
struts.jar 474KB
c3p0-0.9.0.4.jar 423KB
antlr-2.7.5H3.jar 417KB
antlr.jar 344KB
log4j-1.2.13.jar 312KB
velocity-1.4.jar 309KB
log4j-1.2.9.jar 303KB
cglib-nodep-2.1_3.jar 284KB
sqljdbc.jar 275KB
ibatis-sqlmap-2.jar 257KB
dom4j-1.6.jar 256KB
cglib-2.1.jar 243KB
commons-httpclient.jar 238KB
jaxen-1.1-beta-4.jar 202KB
spring-beans.jar 200KB
spring-webmvc.jar 181KB
commons-lang.jar 176KB
spring-hibernate.jar 170KB
commons-collections-2.1.1.jar 169KB
spring-jdbc.jar 163KB
commons-beanutils.jar 160KB
spring-orm.jar 160KB
commons-digester.jar 147KB
spring-aop.jar 139KB
spring-web.jar 124KB
xml-apis.jar 117KB
ibatis-sqlmap.jar 113KB
hibernate-annotations.jar 110KB
jotm.jar 107KB
spring-core.jar 104KB
jaas.jar 99KB
spring-context.jar 95KB
commons-dbcp.jar 90KB
spring-dao.jar 82KB
xapool.jar 77KB
commons-validator.jar 74KB
ibatis-common-2.jar 72KB
jdo2.jar 66KB
velocity-tools-view-1.2.jar 65KB
jakarta-oro.jar 62KB
jakarta-oro-2.0.8.jar 62KB
cos.jar 47KB
toplink-api.jar 43KB
ehcache-1.1.jar 41KB
commons-pool.jar 36KB
commons-logging.jar 33KB
commons-logging-1.0.4.jar 33KB
commons-attributes-api.jar 31KB
asm.jar 25KB
commons-attributes-compiler.jar 25KB
commons-fileupload.jar 19KB
velocity-tools-generic-1.2.jar 17KB
asm-attrs.jar 16KB
jta.jar 8KB
jdbc2_0-stdext.jar 6KB
UsersInfoDAO.java 4KB
UsersAction.java 4KB
UsersForm.java 2KB
UsersInfoService.java 1KB
SetEncodingFilter.java 978B
UsersInfo.java 970B
IUsersInfoDAO.java 941B
IUsersInfoService.java 547B
list.jsp 2KB
delete.jsp 1KB
update.jsp 1KB
add.jsp 1KB
index.jsp 861B
users_log.ldf 1024KB
users.mdf 3MB
.struts-config.mex 2KB
MANIFEST.MF 39B
.myhibernatedata 501B
.mymetadata 288B
.mystrutsdata 261B
.project 2KB
ApplicationResources.properties 87B
ApplicationResources.properties 87B
.springBeans 332B
struts-html.tld 72KB
struts-nested.tld 70KB
struts-logic.tld 14KB
共 109 条
- 1
- 2
资源评论
- d5841156292014-04-08可以使用,适合新手学习
「已注销」
- 粉丝: 19
- 资源: 125
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- VSc++编程助手1.0 - 1
- 基于matlab的说话人语音识别源码+PPT+报告(优质项目).zip
- 语音识别基于matlab说话人识别系统源码+报告PPT(高分优质项目).zip
- 毕业设计: 校园失物招领小程序的设计与实现论文(源码 + 数据库 + 说明文档)
- 美易ME-DUI自绘模块3.3-易语言模块
- 毕业设计:小程序消防知识每天学(源码 + 数据库 + 说明文档)
- 2024-NEW.zip
- 软件.zip
- 华为FPGA设计技巧FPGA设计规范设计经验设计流程指南华为面经硬件工程师手册等资料(15个).zip
- 毕业设计:基于微信小程序大学校园二手教材与书籍拍卖系统(源码 + 数据库 + 说明文档)
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功