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

📄 commodityorder.java

📁 java EJB 编程源代码。
💻 JAVA
字号:
package NetCommodityOrder.ejbtools;

import java.io.Serializable;

//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
//这是一个辅助的类文件,用于建立商品订购的类对象。
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

public class CommodityOrder implements Serializable
  {
   String commodityname = null;
   String orderid = null;
   String commodityid = null;
   int unitprice = -1;
   int quantity = -1;
   int totalprice = -1;

   //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
   //建立两个包含不同参数的CommodityOrder对象构造器
   //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

   public CommodityOrder(String orderid,String commodityid,int quantity)
     {
      this.orderid = orderid;
      this.commodityid = commodityid;
      this.quantity = quantity;
     }

   public CommodityOrder(String orderid,String commodityid,int quantity,String commodityname,int unitprice,int totalprice)
     {
      this.orderid = orderid;
      this.commodityid = commodityid;
      this.quantity = quantity;
      this.commodityname = commodityname;
      this.unitprice = unitprice;
      this.totalprice = totalprice;
     }

   //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
   //定义一些属性方法
   //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

   public String getOrderid()
     {
      return orderid;
     }

   public String getCommodityid()
     {
      return commodityid;
     }

   public int getQuantity()
     {
      return quantity;
     }

   public String getCommodityname()
     {
      return commodityname;
     }

   public int getUnitprice()
     {
      return unitprice;
     }

   public int getTotalprice()
     {
      return totalprice;
     }
  }

⌨️ 快捷键说明

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