DaoSupport.java
资源名称:Appjxc.rar [点击查看]
上传用户:whbcdz
上传日期:2008-08-04
资源大小:7683k
文件大小:3k
源码类别:
JavaScript
开发平台:
Java
- package appjxc.dao;
- import appjxc.model.*;
- import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
- import org.springframework.orm.hibernate3.HibernateTemplate;
- import java.util.List;
- public class DaoSupport extends HibernateDaoSupport{
- public DaoSupport() {
- }
- /*---------添加一条数据到数据表中----------*/
- public boolean InsertMedicine(obj_medicine medicine){
- //hibernateTemplate = this.getHibernateTemplate();
- getHibernateTemplate().saveOrUpdate(medicine);
- return true;
- }
- public boolean InsertClient(Obj_client objclient){
- //hibernateTemplate = this.getHibernateTemplate();
- getHibernateTemplate().saveOrUpdate(objclient);
- return true;
- }
- public boolean InsertMedicine(Obj_gys objgys){
- //hibernateTemplate = this.getHibernateTemplate();
- getHibernateTemplate().saveOrUpdate(objgys);
- return true;
- }
- public boolean InsertSellMain(Obj_SellMain obj){
- //hibernateTemplate = this.getHibernateTemplate();
- getHibernateTemplate().saveOrUpdate(obj);
- return true;
- }
- public boolean InsertSellDetaile(Obj_SellDetaile obj){
- //hibernateTemplate = this.getHibernateTemplate();
- getHibernateTemplate().saveOrUpdate(obj);
- return true;
- }
- public boolean InsertBuyMain(Obj_BuyMain obj){
- //hibernateTemplate = this.getHibernateTemplate();
- getHibernateTemplate().saveOrUpdate(obj);
- return true;
- }
- public boolean InsertBuyDetaile(Obj_BuyDetaile obj){
- //hibernateTemplate = this.getHibernateTemplate();
- getHibernateTemplate().saveOrUpdate(obj);
- return true;
- }
- public boolean InsertStock(Obj_Stock obj){
- //hibernateTemplate = this.getHibernateTemplate();
- getHibernateTemplate().saveOrUpdate(obj);
- return true;
- }
- public boolean InsertObj_SellDetaileTh(Obj_SellDetaileTh obj){
- //hibernateTemplate = this.getHibernateTemplate();
- getHibernateTemplate().saveOrUpdate(obj);
- return true;
- }
- public boolean InsertObj_UserName(Obj_UserName username){
- getHibernateTemplate().saveOrUpdate(username);
- return true;
- }
- /*----------查询所有数据表中的满足条件的数据集合-------*/
- public List getAllMedicine(){
- return getHibernateTemplate().find("from obj_medicine ");
- }
- public List QueryObject(String QueryStr){
- return getHibernateTemplate().find(QueryStr);
- }
- /*---------------删除对应的表数据-----------*/
- public void DeleteUser(Obj_UserName user){
- getHibernateTemplate().delete(user);
- }
- }