📄 orderdetail.java
字号:
/*
* @author : Sujatha
* @Version : 1.0
*
* Development Environment : Oracle9i JDeveloper
* Name of the File : OrderDetail.java
* Creation/Modification History :
*
* Sujatha 11-Dec-2002 Created
*
*/
package oracle.otnsamples.vsm.services.data;
/**
* This class defines member variables which represent all the information of
* an order item associated with an order. This class is used to pass order
* item related data to the clients from the services layer and vice versa.
*
* @author Sujatha
* @version 1.0
*/
public class OrderDetail implements java.io.Serializable {
private String itemID;
private String orderID;
private String shopID;
private String status;
private double amount;
private int quantity;
/**
* Default constructor, takes no arguments
*/
public OrderDetail() {
}
/**
* The constructor creates a profile with the specified values
*
* @param <b>orderID</b> id of the order
* @param <b>itemID</b> id of the item which has been ordered
* @param <b>quantity</b> quantity of the item ordered
* @param <b>amount</b> unit price of the item
* @param <b>status</b> status of the order - possible values are Pending,
* Shipped and Cancelled
*/
public OrderDetail(
String orderID, String itemID, String shopID, int quantity,
double amount, String status) {
this.orderID = orderID;
this.itemID = itemID;
this.shopID = shopID;
this.quantity = quantity;
this.amount = amount;
this.status = status;
}
/**
* Gets the order id
*
* @return <b>String</b> id of the order
*/
public String getOrderID() {
return orderID;
}
/**
* Sets the order id
*
* @param <b>orderID</b> id of the order
*/
public void setOrderID(String orderID) {
this.orderID = orderID;
}
/**
* Gets the item id
*
* @return <b>String</b> id of the item
*/
public String getItemID() {
return itemID;
}
/**
* Sets the item id
*
* @param <b>itemId</b> id of the item
*/
public void setItemID(String itemID) {
this.itemID = itemID;
}
/**
* Gets the shop id
*
* @return <b>String</b> id of the shop from which the item has been ordered
*/
public String getShopID() {
return shopID;
}
/**
* Sets the shop id
*
* @param <b>shopId</b> id of the shop from which the item has been ordered
*/
public void setShopID(String shopID) {
this.shopID = shopID;
}
/**
* Gets the quantity of the item ordered
*
* @return <b>int</b> quantity of the item ordered
*/
public int getQuantity() {
return quantity;
}
/**
* Sets the quantity of the item ordered
*
* @param <b>newQuantity</b> quantity of the item ordered
*/
public void setQuantity(int newQuantity) {
quantity = newQuantity;
}
/**
* Gets the unit price of the item
*
* @return <b>double</b> unit price of the item
*/
public double getUnitPrice() {
return amount;
}
/**
* Sets the unit price of the item
*
* @param <b>unitPrice</b> unit price of the item
*/
public void setUnitPrice(double unitPrice) {
amount = unitPrice;
}
/**
* Gets the order status - possible values are Pending, Shipped and Cancelled
*
* @return <b>String</b> status of the order
*/
public String getStatus() {
return status;
}
/**
* Sets the order status - possible values are Pending, Shipped and Cancelled
*
* @param <b>newStatus</b> status of the order
*/
public void setStatus(String newStatus) {
status = newStatus;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -