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

📄 productsbean.java

📁 网络商店源代码用NetBeans6.1Beta开发
💻 JAVA
字号:
package model;import java.util.*;public class ProductsBean {    private List<Product> list = null;    private boolean listCurrent = false;    public List<Product> findAll() throws Exception {        System.out.println("getList");        if (list == null || !listCurrent) {            list = Products.findAll();            listCurrent = true;        }        return list;    }    public void createTable() throws Exception {        Products.createTable();        listCurrent = false;    }    public void create(Product p) throws Exception {        Products.create(p);        listCurrent = false;    }    public Product find(int id) throws Exception {        System.out.println("getBook");        return Products.find(id);    }    public void updateRecord(int id, String price) throws Exception {        Products.updateRecord(id, price);        listCurrent = false;    }}

⌨️ 快捷键说明

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