📄 productsendtypedaohibernate.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 + -