ProductDAO.java
资源名称:JAVAshop.rar [点击查看]
上传用户:sxychgz
上传日期:2019-04-21
资源大小:4772k
文件大小:1k
源码类别:
电子政务应用
开发平台:
Java
- package com.bjsxt.shopping.product;
- import java.util.List;
- public interface ProductDAO {
- public List<Product> getProducts();
- public int getProducts(List<Product> products, int pageNo, int pageSize, boolean lazy);
- public void add(Product p);
- public void delete(int id);
- public void update(Product p);
- public Product loadById(int id);
- public void delete(String conditionStr);
- public int find(List<Product> products, int pageNo, int pageSize, String queryStr);
- }
- //UserDAO
- //MySQL Oracle
- //CategoryDAO
- //MySQL Oracle
- //ProductDAO
- //MySQL Oracle
- /*
- class DAOFactory {
- UserDAO getUserDAO() {
- return mysqlDao
- }
- CategoryDAO getCategoryDAO() {
- }
- }
- */
- //abstract factory
- /*
- interface DAOFactory {
- UserDAO getUserDAO() ;
- CategoryDAO getCategoryDAO() ;
- }
- class MySQLDAOFactory implements DAOFactory {
- UserDAO getUserDAO() { return mysqlDao };
- CategoryDAO getCategoryDAO() ;
- }
- interface SkinFactory {
- MenuBar getMenuBar();
- }
- */
- //factory method
- //simple factory
- //abstract factory