package com.zshome_admin.hbm;
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.LockMode;
import org.hibernate.Query;
import org.hibernate.criterion.Example;
/**
* A data access object (DAO) providing persistence and search support for
* Secondtype 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.zshome_admin.hbm.Secondtype
* @author MyEclipse Persistence Tools
*/
public class SecondtypeDAO extends BaseHibernateDAO {
private static final Log log = LogFactory.getLog(SecondtypeDAO.class);
// property constants
public static final String TYPE_NAME = "typeName";
public static final String PARENT_ID = "parentId";
public static final String SCALE = "scale";
public static final String SECONDMODE = "secondmode";
public void save(Secondtype transientInstance) {
log.debug("saving Secondtype instance");
try {
getSession().save(transientInstance);
log.debug("save successful");
} catch (RuntimeException re) {
log.error("save failed", re);
throw re;
}
}
public void delete(Secondtype persistentInstance) {
log.debug("deleting Secondtype instance");
try {
getSession().delete(persistentInstance);
log.debug("delete successful");
} catch (RuntimeException re) {
log.error("delete failed", re);
throw re;
}
}
public Secondtype findById(java.lang.Integer id) {
log.debug("getting Secondtype instance with id: " + id);
try {
Secondtype instance = (Secondtype) getSession().get(
"com.zshome_admin.hbm.Secondtype", id);
return instance;
} catch (RuntimeException re) {
log.error("get failed", re);
throw re;
}
}
public List findByExample(Secondtype instance) {
log.debug("finding Secondtype instance by example");
try {
List results = getSession().createCriteria(
"com.zshome_admin.hbm.Secondtype").add(
Example.create(instance)).list();
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 Secondtype instance with property: " + propertyName
+ ", value: " + value);
try {
String queryString = "from Secondtype as model where model."
+ propertyName + "= ?";
Query queryObject = getSession().createQuery(queryString);
queryObject.setParameter(0, value);
return queryObject.list();
} catch (RuntimeException re) {
log.error("find by property name failed", re);
throw re;
}
}
public List findByTypeName(Object typeName) {
return findByProperty(TYPE_NAME, typeName);
}
public List findByParentId(Object parentId) {
return findByProperty(PARENT_ID, parentId);
}
public List findByScale(Object scale) {
return findByProperty(SCALE, scale);
}
public List findBySecondmode(Object secondmode) {
return findByProperty(SECONDMODE, secondmode);
}
public List findAll() {
log.debug("finding all Secondtype instances");
try {
String queryString = "from Secondtype";
Query queryObject = getSession().createQuery(queryString);
return queryObject.list();
} catch (RuntimeException re) {
log.error("find all failed", re);
throw re;
}
}
public Secondtype merge(Secondtype detachedInstance) {
log.debug("merging Secondtype instance");
try {
Secondtype result = (Secondtype) getSession().merge(
detachedInstance);
log.debug("merge successful");
return result;
} catch (RuntimeException re) {
log.error("merge failed", re);
throw re;
}
}
public void attachDirty(Secondtype instance) {
log.debug("attaching dirty Secondtype instance");
try {
getSession().saveOrUpdate(instance);
log.debug("attach successful");
} catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
public void attachClean(Secondtype instance) {
log.debug("attaching clean Secondtype instance");
try {
getSession().lock(instance, LockMode.NONE);
log.debug("attach successful");
} catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
级联显示(树形,下拉列表)
共288个文件
prefs:62个
class:29个
java:29个
4星 · 超过85%的资源 需积分: 14 56 下载量 140 浏览量
2009-07-07
09:25:57
上传
评论
收藏 1.56MB RAR 举报
温馨提示
java中使用struts和Hibernate整合用来显示两种视图效果的级联,代码很简单,
资源推荐
资源详情
资源评论
收起资源包目录
级联显示(树形,下拉列表) (288个子文件)
.#zshome.sql.1.1 14KB
.#Secondhouse.java.1.1 4KB
.#Secondhouse.java.1.1 4KB
.#Secondcard.hbm.xml.1.1 3KB
.#Secondcard.hbm.xml.1.1 3KB
.#FamilyImpl.java.1.1 352B
.#FamilyImpl.java.1.1 352B
.#YX_left_frame.html.1.2 13KB
.#Secondcard.java.1.2 5KB
.#Secondcard.java.1.2 5KB
.#Secondcard.java.1.3 5KB
.#Secondcard.java.1.3 5KB
SecondtypeDAO.class 6KB
UpdateSecondCardForm.class 5KB
AddSecondCardForm.class 5KB
UpdateSecondHouseForm.class 5KB
AddSecondHouseForm.class 5KB
SecondtypeImpl.class 4KB
Page.class 3KB
BaseImpl.class 3KB
HibernateSessionFactory.class 2KB
PageTag.class 2KB
SearchHouseForm.class 2KB
SearchCardForm.class 2KB
SecondHouseTypeListAction.class 2KB
ShowSecondType.class 2KB
AddTypeForm.class 2KB
Secondtype.class 2KB
UpdateTypeForm.class 1KB
ChangeStateForm.class 1KB
UTF8.class 1KB
Choset.class 1KB
SecondhouselistForm.class 1KB
DelSecondHouseForm.class 1KB
SecondCardListForm.class 1KB
DelSecondCardForm.class 1KB
BaseHibernateDAO.class 522B
Conmon.class 291B
IBaseImpl.class 261B
IBaseHibernateDAO.class 185B
SecondtypeInface.class 136B
.classpath 1KB
style.css 3KB
style01.css 3KB
style02.css 2KB
variablesAndContainers.dat 425B
Entries 5KB
Entries 4KB
Entries 2KB
Entries 1KB
Entries 1KB
Entries 1KB
Entries 724B
Entries 648B
Entries 567B
Entries 538B
Entries 535B
Entries 331B
Entries 288B
Entries 225B
Entries 179B
Entries 134B
Entries 133B
Entries 103B
Entries 89B
Entries 76B
Entries 66B
Entries 62B
Entries 45B
Entries 20B
Entries 0B
r_1.gif 252B
r_2.gif 252B
r_3.gif 155B
r_4.gif 155B
open1.gif 57B
empty.gif 49B
properties.index 57B
version.ini 26B
dwr.jar 491KB
mysql-connector-java-3.1.10-bin.jar 409KB
standard.jar 384KB
commons-io-1.3.2.jar 86KB
commons-fileupload-1.2.1.jar 56KB
fckeditor-java-core-2.4.1.jar 49KB
jstl.jar 20KB
FCKeditor-2.3.jar 18KB
slf4j-api-1.5.2.jar 17KB
slf4j-simple-1.5.2.jar 7KB
SecondtypeDAO.java 5KB
UpdateSecondCardForm.java 4KB
AddSecondCardForm.java 4KB
UpdateSecondHouseForm.java 4KB
AddSecondHouseForm.java 4KB
Page.java 4KB
HibernateSessionFactory.java 3KB
SecondtypeImpl.java 3KB
BaseImpl.java 2KB
SearchHouseForm.java 2KB
SearchCardForm.java 2KB
共 288 条
- 1
- 2
- 3
资源评论
- 「已注销」2014-04-21代码太简单,其实还是适合初学者学习!
- xuthus_sxs2012-08-14代码太简单,其实还是适合初学者学习!
- 佛小胖2012-08-17给的例子很具有代表性,我正好做有关这方面的项目,谢谢
- btchen2012-08-03学习了,正为项目中的树着急呢,例子还有数据库,赞两个
- BSHZHX12013-03-27看不太懂。。
spring0906
- 粉丝: 7
- 资源: 19
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 基于python开发的口红色号识别程序+源码+开发文档+源码解析(毕业设计&课程设计&项目开发)
- TP-LINK TL-WN725N V3 Linux 驱动
- 020ssm-jsp-mysql班级同学录网站.zip(可运行源码+数据库文件+文档)
- 什么是stm32f103rct6,有哪些优缺点?
- 李明哲尚能2.zip
- 019ssm-jsp-mysql奥迪维修保养服务管理系统.zip(可运行源码+数据库文件+)
- AB测试数据-增设中小店铺广告位
- YOLOv8红外场景的车辆-行人-斑马线-交通灯检测+数据集+pyqt界面
- 基于JSP毕业设计-OA办公自动化系统-毕业设计.zip
- 基于JSP毕业设计-MVC设计模式应用之游戏卡在线销售系统(论文).zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功