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

📄 productsbean.java

📁 网络商店
💻 JAVA
字号:
package model;import java.util.*;public class ProductsBean {  private static List<Product> list = null;  public static List<Product> findAll() throws Exception {    if (list == null) {      list = Products.findAll();    }    return list;  }  public static void createTable() throws Exception {    Products.createTable();    list = null;  }  public static void create(Product p) throws Exception {    Products.create(p);    list = null;  }   public static void updateRecord(int id, String price) throws Exception {        Products.updateRecord(id, price);        list = null;    }   public static List<Product> getList() throws Exception {    System.out.println("getList");    if ( list == null )       list = Products.findAll();    return list;  }  public static Product find(int id) throws Exception {    return Products.find(id);  }    public static java.math.BigDecimal findPrice(int id) throws Exception {    return Products.findPrice(id);  }  public static String findDesc(int id) throws Exception {    return Products.findDesc(id);  }}

⌨️ 快捷键说明

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