package Com.Fjzy.Dao.Pc.Imp;
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.aspectj.weaver.patterns.ThisOrTargetAnnotationPointcut;
import org.hibernate.LockMode;
import org.springframework.context.ApplicationContext;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
import Com.Fjzy.Dao.Pc.PcListDao;
import Com.Fjzy.Model.Pc.PcList;
/**
* Data access object (DAO) for domain model class PcList.
*
* @see Com.Fjzy.Dao.Pc.Imp.PcList
* @author MyEclipse Persistence Tools
*/
public class PcList_Imp extends HibernateDaoSupport implements PcListDao {
private static final Log log = LogFactory.getLog(PcList_Imp.class);
protected void initDao() {
// do nothing
}
/* (non-Javadoc)
* @see Com.Fjzy.Dao.Pc.Imp.PcListDao#save(Com.Fjzy.Model.Pc.PcList)
*/
public String save(PcList transientInstance) {
log.debug("saving PcList instance");
try {
getHibernateTemplate().save(transientInstance);
log.debug("save successful");
return "1";
} catch (RuntimeException re) {
log.error("save failed", re);
throw re;
}
}
/* (non-Javadoc)
* @see Com.Fjzy.Dao.Pc.Imp.PcListDao#delete(Com.Fjzy.Model.Pc.PcList)
*/
public String deletes(int id) {
PcList model = new PcList();
if(findById(id)!= null){
model = findById(id);
System.out.println("对象");
}
System.out.println("对象:::" + model.getGroups());
log.debug("deleting PcList instance");
try {
getHibernateTemplate().delete(model);
log.debug("delete successful");
return "1";
} catch (RuntimeException re) {
log.error("delete failed", re);
throw re;
}
}
/* (non-Javadoc)
* @see Com.Fjzy.Dao.Pc.Imp.PcListDao#findById(java.lang.Integer)
*/
public PcList findById(java.lang.Integer id) {
log.debug("getting PcList instance with id: " + id);
try {
PcList instance = (PcList) getHibernateTemplate().get(
"Com.Fjzy.Model.Pc.PcList", id);
return instance;
} catch (RuntimeException re) {
log.error("get failed", re);
throw re;
}
}
/* (non-Javadoc)
* @see Com.Fjzy.Dao.Pc.Imp.PcListDao#findByExample(Com.Fjzy.Model.Pc.PcList)
*/
public List findByExample(PcList instance) {
log.debug("finding PcList 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;
}
}
/* (non-Javadoc)
* @see Com.Fjzy.Dao.Pc.Imp.PcListDao#findByProperty(java.lang.String, java.lang.Object)
*/
public List findByProperty(String propertyName, Object value) {
log.debug("finding PcList instance with property: " + propertyName
+ ", value: " + value);
try {
String queryString = "from PcList as model where model."
+ propertyName + "= ?";
return getHibernateTemplate().find(queryString, value);
} catch (RuntimeException re) {
log.error("find by property name failed", re);
throw re;
}
}
/* (non-Javadoc)
* @see Com.Fjzy.Dao.Pc.Imp.PcListDao#findByName(java.lang.Object)
*/
public List findByName(Object name) {
return findByProperty(NAME, name);
}
/* (non-Javadoc)
* @see Com.Fjzy.Dao.Pc.Imp.PcListDao#findByIp(java.lang.Object)
*/
public List findByIp(Object ip) {
return findByProperty(IP, ip);
}
/* (non-Javadoc)
* @see Com.Fjzy.Dao.Pc.Imp.PcListDao#findByServer(java.lang.Object)
*/
public List findByServer(Object server) {
return findByProperty(SERVER, server);
}
/* (non-Javadoc)
* @see Com.Fjzy.Dao.Pc.Imp.PcListDao#findByTypes(java.lang.Object)
*/
public List findByTypes(Object types) {
return findByProperty(TYPES, types);
}
/* (non-Javadoc)
* @see Com.Fjzy.Dao.Pc.Imp.PcListDao#findByGroups(java.lang.Object)
*/
public List findByGroups(Object groups) {
return findByProperty(GROUPS, groups);
}
/* (non-Javadoc)
* @see Com.Fjzy.Dao.Pc.Imp.PcListDao#findByBios(java.lang.Object)
*/
public List findByBios(Object bios) {
return findByProperty(BIOS, bios);
}
/* (non-Javadoc)
* @see Com.Fjzy.Dao.Pc.Imp.PcListDao#findByIsbak(java.lang.Object)
*/
public List findByIsbak(Object isbak) {
return findByProperty(ISBAK, isbak);
}
/* (non-Javadoc)
* @see Com.Fjzy.Dao.Pc.Imp.PcListDao#findAll()
*/
public List findAll(String where) {
log.debug("finding all PcList instances");
try {
String queryString = "from PcList where "+ where;
return getHibernateTemplate().find(queryString);
} catch (RuntimeException re) {
log.error("find all failed", re);
throw re;
}
}
/* (non-Javadoc)
* @see Com.Fjzy.Dao.Pc.Imp.PcListDao#merge(Com.Fjzy.Model.Pc.PcList)
*/
public PcList merge(PcList detachedInstance) {
log.debug("merging PcList instance");
try {
PcList result = (PcList) getHibernateTemplate().merge(
detachedInstance);
log.debug("merge successful");
return result;
} catch (RuntimeException re) {
log.error("merge failed", re);
throw re;
}
}
/* (non-Javadoc)
* @see Com.Fjzy.Dao.Pc.Imp.PcListDao#attachDirty(Com.Fjzy.Model.Pc.PcList)
*/
public void attachDirty(PcList instance) {
log.debug("attaching dirty PcList instance");
try {
getHibernateTemplate().saveOrUpdate(instance);
log.debug("attach successful");
} catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
/* (non-Javadoc)
* @see Com.Fjzy.Dao.Pc.Imp.PcListDao#attachClean(Com.Fjzy.Model.Pc.PcList)
*/
public void attachClean(PcList instance) {
log.debug("attaching clean PcList instance");
try {
getHibernateTemplate().lock(instance, LockMode.NONE);
log.debug("attach successful");
} catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
public static PcListDao getFromApplicationContext(ApplicationContext ctx) {
return (PcListDao) ctx.getBean("PcListDAO");
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
dwrone.rar (86个子文件)
dwrone
.project 2KB
.mymetadata 291B
WebRoot
table.jsp 2KB
css
design.css 7KB
WEB-INF
dwr.xml 1KB
web.xml 2KB
spring-form.tld 51KB
applicationContext.xml 2KB
spring.tld 13KB
applicationContextBean.xml 2KB
lib
struts2-spring-plugin-2.0.10.jar 9KB
ognl-2.6.11.jar 164KB
commons-logging-1.0.4.jar 37KB
commons-pool-1.4.jar 85KB
server2005.jar 227KB
freemarker-2.3.8.jar 784KB
xwork-2.0.4.jar 445KB
commons-dbcp-1.2.2.jar 119KB
struts2-core-2.0.10.jar 2.22MB
classes
log4j.properties 0B
Com
Fjzy
Action
User
SmsAction.class 1KB
PcListAction.class 2KB
TypesAction.class 1KB
Model
User
UserList.hbm.xml 887B
UserList.class 1KB
Sms
Phone.hbm.xml 797B
Phone.class 1KB
SmsType
Types.class 1KB
Types.hbm.xml 799B
Pc
PcList.hbm.xml 1KB
PcList.class 2KB
Dao
User
Imp
UserList_Imp.class 2KB
UsetList_dao.class 346B
Sms
Imp
Phone_Imp.class 5KB
PhoneDao.class 595B
SmsType
Imp
Types_Imp.class 6KB
SmsType_dao.class 688B
Pc
Imp
PcList_Imp.class 6KB
PcListDao.class 1KB
Text
text.class 892B
struts.xml 826B
META-INF
MANIFEST.MF 39B
table2.jsp 3KB
list.jsp 1KB
select.jsp 2KB
main.jsp 678B
images
small_8.gif 319B
1111_1000.gif 151B
icn_zx.gif 346B
button_sx3_b.gif 556B
button_bc_b.gif 759B
button_sstj.gif 569B
icn_lx.gif 345B
button_sstj_b.gif 583B
small_line_bg02.gif 43B
button_bg3.gif 154B
button_sx2_a.gif 381B
button_bc_a.gif 775B
js
commonList.js 54KB
common.js 12KB
.myeclipse
src
log4j.properties 0B
Com
Fjzy
Action
User
PcListAction.java 933B
SmsAction.java 1KB
TypesAction.java 990B
Model
User
UserList.java 1012B
UserList.hbm.xml 887B
Sms
Phone.java 919B
Phone.hbm.xml 797B
SmsType
Types.java 913B
Types.hbm.xml 799B
Pc
PcList.java 2KB
PcList.hbm.xml 1KB
Dao
User
Imp
UserList_Imp.java 3KB
UsetList_dao.java 382B
Sms
Imp
Phone_Imp.java 4KB
PhoneDao.java 584B
SmsType
Imp
Types_Imp.java 4KB
SmsType_dao.java 772B
Pc
Imp
PcList_Imp.java 6KB
PcListDao.java 1KB
Text
text.java 782B
struts.xml 826B
Data.rar 2.52MB
.springBeans 332B
.classpath 2KB
.myhibernatedata 489B
共 86 条
- 1
aliuge2000
- 粉丝: 81
- 资源: 19
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
前往页