package com.t49.xt.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.t49.xt.bean.S2shtest;
import com.t49.xt.dao.S2shtestDAO;
/**
* A data access object (DAO) providing persistence and search support for
* S2shtest entities. Transaction control of the save(), update() and delete()
* operations can directly support Spring container-managed transactions or they
* can be augmented to handle user-managed Spring transactions. Each of these
* methods provides additional information for how to configure it for the
* desired type of transaction control.
*
* @see com.t49.xt.bean.S2shtest
* @author MyEclipse Persistence Tools
*/
public class S2shtestDAOImpl extends HibernateDaoSupport implements S2shtestDAO{
private static final Log log = LogFactory.getLog(S2shtestDAOImpl.class);
// property constants
public static final String SNAME = "sname";
protected void initDao() {
// do nothing
}
public void save(S2shtest transientInstance) {
log.debug("saving S2shtest instance");
try {
getHibernateTemplate().save(transientInstance);
log.debug("save successful");
} catch (RuntimeException re) {
log.error("save failed", re);
throw re;
}
}
public void delete(S2shtest persistentInstance) {
log.debug("deleting S2shtest instance");
try {
getHibernateTemplate().delete(persistentInstance);
log.debug("delete successful");
} catch (RuntimeException re) {
log.error("delete failed", re);
throw re;
}
}
public S2shtest findById(java.math.BigDecimal id) {
log.debug("getting S2shtest instance with id: " + id);
try {
S2shtest instance = (S2shtest) getHibernateTemplate().get(
"com.t49.xt.bean.S2shtest", id);
return instance;
} catch (RuntimeException re) {
log.error("get failed", re);
throw re;
}
}
public List findByExample(S2shtest instance) {
log.debug("finding S2shtest 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 S2shtest instance with property: " + propertyName
+ ", value: " + value);
try {
String queryString = "from S2shtest 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 findBySname(Object sname) {
return findByProperty(SNAME, sname);
}
public List findAll() {
log.debug("finding all S2shtest instances");
try {
String queryString = "from S2shtest";
return getHibernateTemplate().find(queryString);
} catch (RuntimeException re) {
log.error("find all failed", re);
throw re;
}
}
public S2shtest merge(S2shtest detachedInstance) {
log.debug("merging S2shtest instance");
try {
S2shtest result = (S2shtest) getHibernateTemplate().merge(
detachedInstance);
log.debug("merge successful");
return result;
} catch (RuntimeException re) {
log.error("merge failed", re);
throw re;
}
}
public void attachDirty(S2shtest instance) {
log.debug("attaching dirty S2shtest instance");
try {
getHibernateTemplate().saveOrUpdate(instance);
log.debug("attach successful");
} catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
public void attachClean(S2shtest instance) {
log.debug("attaching clean S2shtest instance");
try {
getHibernateTemplate().lock(instance, LockMode.NONE);
log.debug("attach successful");
} catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
public static S2shtestDAOImpl getFromApplicationContext(ApplicationContext ctx) {
return (S2shtestDAOImpl) ctx.getBean("S2shtestDAO");
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
Struts2SH.zip (62个子文件)
Struts2SH
S2SHTest.sql 135B
.springBeans 450B
src
com
t49
xt
biz
S2shtestService.java 309B
dao
S2shtestDAO.java 286B
action
S2shtestAction.java 1KB
impl
S2shtestServiceImpl.java 678B
S2shtestDAOImpl.java 4KB
bean
S2shtest.java 655B
S2shtest.hbm.xml 706B
struts.xml 416B
spring.xml 2KB
hibernate.cfg.xml 924B
.classpath 2KB
.mymetadata 300B
.settings
org.eclipse.wst.jsdt.ui.superType.container 49B
org.eclipse.wst.common.project.facet.core.xml 252B
org.eclipse.wst.jsdt.ui.superType.name 6B
org.eclipse.wst.common.component 465B
.jsdtscope 493B
org.eclipse.jdt.core.prefs 395B
.myeclipse
.project 2KB
WebRoot
META-INF
MANIFEST.MF 36B
ok.jsp 1KB
index.jsp 1KB
WEB-INF
classes
com
t49
xt
biz
S2shtestService.class 215B
dao
S2shtestDAO.class 204B
action
S2shtestAction.class 2KB
impl
S2shtestServiceImpl.class 1KB
S2shtestDAOImpl.class 5KB
bean
S2shtest.hbm.xml 706B
S2shtest.class 890B
struts.xml 416B
spring.xml 2KB
hibernate.cfg.xml 924B
spring.tld 13KB
lib
struts2-spring-plugin-2.1.8.1.jar 16KB
jta.jar 9KB
classes12.jar 1.14MB
xwork-core-2.1.6.jar 1.49MB
commons-fileupload-1.2.1.jar 56KB
dom4j-1.6.1.jar 307KB
antlr-2.7.2.jar 350KB
commons-logging-1.0.4.jar 37KB
ant.jar 1.23MB
hibernate3.jar 2.17MB
log4j-1.2.11.jar 342KB
commons-collections-2.1.1.jar 171KB
asm-attrs.jar 16KB
freemarker-2.3.15.jar 859KB
spring.jar 2.78MB
struts2-core-2.1.8.1.jar 738KB
axis-ant.jar 37KB
commons-beanutils.jar 184KB
spring-webmvc-struts.jar 36KB
ojdbc14.jar 1.47MB
ognl-2.7.3.jar 234KB
asm.jar 26KB
cglib-2.1.3.jar 276KB
axis.jar 1.56MB
spring-form.tld 69KB
web.xml 1007B
.myhibernatedata 536B
共 62 条
- 1
资源评论
- sh66uai2013-06-04水平有限,看的有点不太懂
- nixuezhe2013-09-03要是能更完整点就好了
- jjy5332013-02-26东西有点不完整呢
xuting799272167
- 粉丝: 0
- 资源: 6
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- xshell7免更新版
- 基于 C 实现一个类似unix的文件系统【操作系统课程设计】
- 基于 python+Mysql 实现的学生宿舍管理系统
- 作业二(2).docx
- yscan是一款基于go写的端口扫描工具,集masscan+nmap+wappalyzer+证书于一体
- 智能网联汽车车路云一体化规模建设与应用参考指南(1.0版).pdf
- 基于c++11 异步多线程跨平台(linux + windows)网络库,适用于网络游戏
- 2024生成式AI产业落地路径研究报告.pdf
- 主要基于ORB特征匹配算法的图像拼接demo,使用OpenCV4 C++版本开发
- Navicat的下载、安装、配置连接与使用教程.docx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功