📄 iproductdao.java
字号:
package com.tarena.shopcart.entity.dao;
import java.util.List;
import com.tarena.shopcart.entity.Category;
import com.tarena.shopcart.entity.PagesBean;
import com.tarena.shopcart.entity.Product;
public interface IProductDAO {
/**
* 根据产品名字进行模糊查询
* @param name
* @return
*/
public List getProductsLikeName(String name);
/**
* 用于分布查询
* @param pages
* @return
*/
public List getProducts(PagesBean page);
/**
* 删除一个产品
* @param pid
* @return
*/
public boolean deleteProduct(int pid);
/**
* 增加一个商品
* @param product
* @return
*/
public boolean addProduct(Product product);
/**
* 根据商品id查询高商品的信息
*
* @param 商品的id
* @return 商品的实体
*/
public Product findProductById(int pid);
/**
* 根据种类id查询高商品种类的信息
*
* @param id
* @return 种类实体
*/
public Category findCategoryById(int cid);
/**
* 获得所有的商品信息
*
* @return
*/
public List getAllProduct();
/**
* 获得所有的商品的数量
*
* @return
*/
public int getProductCount();
/**
* 获得所有的商品种类信息
* @return
*/
public List getAllCategory();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -