package com.dao;
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.model.TAdmin;
/**
* Data access object (DAO) for domain model class TAdmin.
*
* @see com.model.TAdmin
* @author MyEclipse Persistence Tools
*/
public class TAdminDAO extends HibernateDaoSupport {
private static final Log log = LogFactory.getLog(TAdminDAO.class);
// property constants
public static final String USER_NAME = "userName";
public static final String USER_PW = "userPw";
protected void initDao() {
// do nothing
}
public void save(TAdmin transientInstance) {
log.debug("saving TAdmin instance");
try {
getHibernateTemplate().save(transientInstance);
log.debug("save successful");
} catch (RuntimeException re) {
log.error("save failed", re);
throw re;
}
}
public void delete(TAdmin persistentInstance) {
log.debug("deleting TAdmin instance");
try {
getHibernateTemplate().delete(persistentInstance);
log.debug("delete successful");
} catch (RuntimeException re) {
log.error("delete failed", re);
throw re;
}
}
public TAdmin findById(java.lang.Integer id) {
log.debug("getting TAdmin instance with id: " + id);
try {
TAdmin instance = (TAdmin) getHibernateTemplate().get(
"com.model.TAdmin", id);
return instance;
} catch (RuntimeException re) {
log.error("get failed", re);
throw re;
}
}
public List findByExample(TAdmin instance) {
log.debug("finding TAdmin 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 TAdmin instance with property: " + propertyName
+ ", value: " + value);
try {
String queryString = "from TAdmin 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 findByUserPw(Object userPw) {
return findByProperty(USER_PW, userPw);
}
public List findAll() {
log.debug("finding all TAdmin instances");
try {
String queryString = "from TAdmin";
return getHibernateTemplate().find(queryString);
} catch (RuntimeException re) {
log.error("find all failed", re);
throw re;
}
}
public TAdmin merge(TAdmin detachedInstance) {
log.debug("merging TAdmin instance");
try {
TAdmin result = (TAdmin) getHibernateTemplate().merge(
detachedInstance);
log.debug("merge successful");
return result;
} catch (RuntimeException re) {
log.error("merge failed", re);
throw re;
}
}
public void attachDirty(TAdmin instance) {
log.debug("attaching dirty TAdmin instance");
try {
getHibernateTemplate().saveOrUpdate(instance);
log.debug("attach successful");
} catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
public void attachClean(TAdmin instance) {
log.debug("attaching clean TAdmin instance");
try {
getHibernateTemplate().lock(instance, LockMode.NONE);
log.debug("attach successful");
} catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
public static TAdminDAO getFromApplicationContext(ApplicationContext ctx) {
return (TAdminDAO) ctx.getBean("TAdminDAO");
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
基于Java+JSP的 JAVA汽车运输管理系统(毕业设计作品)毕业设计实现+源码.zip
共237个文件
gif:108个
jar:68个
class:16个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 60 浏览量
2022-04-20
22:29:21
上传
评论 1
收藏 18.38MB ZIP 举报
温馨提示
基于Java+JSP的 JAVA汽车运输管理系统(毕业设计作品)毕业设计实现+源码.zip
资源推荐
资源详情
资源评论
收起资源包目录
基于Java+JSP的 JAVA汽车运输管理系统(毕业设计作品)毕业设计实现+源码.zip (237个子文件)
TSijiDAO.class 6KB
TCheDAO.class 6KB
TChucheDAO.class 6KB
TAdminDAO.class 5KB
cheAction.class 5KB
chucheAction.class 4KB
sijiAction.class 4KB
upload.class 4KB
loginService.class 3KB
adminAction.class 3KB
Util.class 3KB
TSiji.class 2KB
TChe.class 2KB
safeFileter.class 2KB
TChuche.class 2KB
TAdmin.class 1KB
.classpath 6KB
base.css 5KB
JSP汽车运输管理系统录像.exe 1.79MB
login-content-bg.gif 20KB
login-wel.gif 9KB
login_06.gif 4KB
main_01.gif 3KB
main_21.gif 3KB
main_06.gif 3KB
loading.gif 2KB
main_066.gif 2KB
main_05.gif 2KB
left_2.gif 1KB
left_4.gif 1KB
left_3.gif 1KB
left_1.gif 1KB
top_12.gif 1KB
globe.gif 1KB
top_14.gif 1KB
top_15.gif 1KB
top_9.gif 1KB
top_13.gif 1KB
login_09.gif 1KB
trash.gif 1KB
question.gif 1KB
top_10.gif 1KB
base.gif 1KB
top_17.gif 1KB
top_11.gif 1KB
top_8.gif 1KB
top_18.gif 995B
nolines_plus.gif 870B
nolines_minus.gif 861B
main_07.gif 821B
main_09.gif 734B
musicfolder.gif 633B
imgfolder.gif 622B
head1.gif 610B
page.gif 582B
main_13.gif 580B
top_16.gif 574B
top_7.gif 561B
main_25.gif 559B
top_5.gif 523B
main_36.gif 498B
main_43.gif 493B
right_03.gif 486B
main_15.gif 441B
luck.gif 429B
main_03.gif 427B
main_38.gif 426B
folderopen.gif 376B
tab_bg.gif 376B
folder.gif 372B
qx.gif 359B
main_30.gif 354B
main_30_1.gif 354B
dl.gif 341B
main_40.gif 339B
main_11.gif 334B
top_4.gif 316B
top_3.gif 316B
wbg.gif 311B
login_03.gif 305B
right_10.gif 294B
main_18.gif 285B
cd.gif 239B
top_6.gif 214B
top_2.gif 211B
right_06.gif 211B
right_12.gif 200B
right_061.gif 195B
login-top-bg.gif 174B
Submit_bg.gif 171B
head-mark4.gif 169B
top_1.gif 146B
dialogclose.gif 114B
login-buttom-bg.gif 112B
main_29.gif 101B
main_27.gif 101B
main_32.gif 99B
mini_icons_046.gif 94B
plus.gif 89B
plusbottom.gif 88B
共 237 条
- 1
- 2
- 3
资源评论
zzzzl333
- 粉丝: 705
- 资源: 7万+
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功