ordermodel.java

来自「一个优秀的供应商管理系统」· Java 代码 · 共 159 行

JAVA
159
字号
package apusic.myshop.order.model;import java.util.Collection;import java.util.Iterator;import apusic.myshop.util.Calendar;import apusic.myshop.util.CreditCard;public class OrderModel implements java.io.Serializable {    private int orderId;    private String userId;    private java.sql.Date orderDate;    private String shipName;    private String shipAddr;    private String shipProvince;    private String shipCity;    private String shipZip;    private String shipCountry;    private String billName;    private String billAddr;    private String billProvince;    private String billCity;    private String billZip;    private String billCountry;    private CreditCard chargeCard;    private double totalPrice;    private Collection lineItems;    public OrderModel(int orderId, String userId, java.sql.Date orderDate,      String shipName, String shipAddr, String shipProvince,      String shipCity, String shipZip, String shipCountry,      String billName, String billAddr, String billProvince,      String billCity, String billZip, String billCountry,      CreditCard chargeCard, double totalPrice, Collection lineItems) {      this.orderId = orderId;      this.userId = userId;      this.orderDate = orderDate;      this.shipName = shipName;      this.shipAddr = shipAddr;      this.shipProvince = shipProvince;      this.shipCity = shipCity;      this.shipZip = shipZip;      this.shipCountry = shipCountry;      this.billName = billName;      this.billAddr = billAddr;      this.billProvince = billProvince;      this.billCity = billCity;      this.billZip = billZip;      this.billCountry = billCountry;      this.chargeCard = chargeCard;      this.totalPrice = totalPrice;      this.lineItems = lineItems;    }    protected OrderModel() {	    // do nothing. use copy instead.    }    /** shallow copy */    public void copy(OrderModel other) {      this.orderId = other.orderId;      this.userId = other.userId;      this.orderDate = other.orderDate;      this.shipName = other.shipName;      this.shipAddr = other.shipAddr;      this.shipProvince = other.shipProvince;      this.shipCity = other.shipCity;      this.shipZip = other.shipZip;      this.shipCountry = other.shipCountry;      this.billName = other.billName;      this.billAddr = other.billAddr;      this.billProvince = other.billProvince;      this.billCity = other.billCity;      this.billZip = other.billZip;      this.billCountry = other.billCountry;      this.chargeCard = other.chargeCard;      this.totalPrice = other.totalPrice;      this.lineItems = other.lineItems;    }    //    // get methods for the instance variables    //    public int getOrderId() {        return orderId;    }    public String getUserId() {      return userId;    }    public java.sql.Date getOrderDate() {      return orderDate;    }    public String getShipName() {      return shipName;    }    public String getShipAddr() {      return shipAddr;    }    public String getShipProvince() {      return shipProvince;    }    public String getShipCity() {      return shipCity;    }    public String getShipZip() {      return shipZip;    }    public String getShipCountry() {      return shipCountry;    }    public String getBillName() {      return billName;    }    public String getBillAddr() {      return billAddr;    }    public String getBillProvince() {      return billProvince;    }    public String getBillCity() {      return billCity;    }    public String getBillZip() {      return billZip;    }    public String getBillCountry() {      return billCountry;    }    public CreditCard getCreditCard() {        return chargeCard;    }    public double getTotalPrice() {        return totalPrice;    }    public Collection getLineItems() {        return lineItems;    }}

⌨️ 快捷键说明

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