⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 productsendtypedaohibernate.java

📁 一个简易的网上购物系统。具有普遍的购物功能。还有一个小型的论坛
💻 JAVA
字号:
package com.longHua.dao.hibernate;

import java.util.List;

import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

import com.longHua.dao.ProductSendTypeDao;
import com.longHua.domain.ProductSendType;

public class ProductSendTypeDaoHibernate extends HibernateDaoSupport implements ProductSendTypeDao {

	public void addProductSendType(ProductSendType productSendType) {
		
           getHibernateTemplate().save(productSendType);
	}

	public void deleteProductSendType(int ID) {
		getHibernateTemplate().delete(getOneProductSendType(ID));

	}

	public ProductSendType getOneProductSendType(int ID) {
		
		return (ProductSendType)getHibernateTemplate().get(com.longHua.domain.ProductSendType.class, ID);
	}

	@SuppressWarnings("unchecked")
	public List<ProductSendType> showAllProductSendType() {
		return getHibernateTemplate().find("from ProductSendType order by ID desc");
	}

	@SuppressWarnings("unchecked")
	public List<ProductSendType> checkThisProductSendType(String typeName) {
		return getHibernateTemplate().find("from ProductSendType as ProductSendType where ProductSendType.typeName='"+typeName+"'");
	}

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -