📄 product.java
字号:
package oracle.otnsamples.AQ.Helper;
/**
* @author Rajat Gupta
* @version 1.0
*
* Name of the Application : Product.java
* Development Environment : Oracle 9i JDeveloper
* Creation/Modification History :
*
* Rajat Gupta 15-Jan-2001 Created
*
*/
/**
* This is a Java Bean with private fields and get/set methods for accessing them.
* This object maps directly to a product to be sold by the Retail Shop.
*/
public class Product{
/**
* ID of the product
*/
private String m_productID;
/**
* ID of the manufacturer who developed this product
*/
private String m_manufactureID;
/**
* Name of the Product
*/
private String m_productName;
/**
* Description about the Product
*/
private String m_productDesc;
/**
* Price of the Product
*/
private String m_productPrice;
/**
* Category to which this product belongs
*/
private String m_categoryDesc;
/**
* Quantity of the Product that Retail Shop has
*/
private String m_quantityOnHand;
/**
* Name of the manufacturer who developed this product
*/
private String m_manufacturerName;
/**
* Default Constructor
*/
public Product(){
}
/**
* This Constructor can be used if we know the attributes of the product beforehand
*
* @param p_productID ID of the Product
* @param p_productName Name of the Product
* @param p_productDesc Description of the Product
* @param p_manufacturerName Name of the manufacturer who developed
* this product
* @param p_manufactureID ID of the manufacturer who developed this
* Product
* @param p_productPrice Price of the Product
* @param p_categoryDesc Category to which this product belongs
* @param p_quantityOnHand Quantity available
* @exception Exception In case of some unreported Exception
*/
public Product(String p_productID, String p_productName, String p_productDesc,
String p_manufacturerName, String p_manufactureID,
String p_productPrice, String p_categoryDesc,
String p_quantityOnHand ) throws Exception{
setProductID(p_productID);
setManufactureID(p_manufactureID);
setProductName(p_productName);
setProductDesc(p_productDesc);
setProductPrice(p_productPrice);
setCategoryDesc(p_categoryDesc);
setQuantityOnHand(p_quantityOnHand);
setManufacturerName(p_manufacturerName);
}
/**
* Gets the Product ID
*
* @exception Exception In case of some unreported Exception
* @return Product ID
*/
public String getProductID() throws Exception{
return m_productID;
}
/**
* Sets the Product ID
*
* @param p_productID Value of the Product ID to be set
* @exception Exception In case of some unreported Exception
*/
public void setProductID(String p_productID) throws Exception{
m_productID = p_productID;
}
/**
* Gets the Manufacturer's Name
*
* @exception Exception In case of some unreported Exception
* @return Manufacturer's Name
*/
public String getManufactureID() throws Exception{
return m_manufactureID;
}
/**
* Sets the Manufacturer ID to the specified value
*
* @param p_manufactureID Value of the manufacture ID to be set
* @exception Exception In case of some unreported Exception
*/
public void setManufactureID(String p_manufactureID) throws Exception{
m_manufactureID = p_manufactureID;
}
/**
* Gets the Product Name
*
* @exception Exception In case of some unreported Exception
* @return Product Name
*/
public String getProductName() throws Exception{
return m_productName;
}
/**
* Sets the Product Name to the Specified value
*
* @param p_productName Name of Product to be set
* @exception Exception In case of some unreported Exception
*/
public void setProductName(String p_productName) throws Exception{
m_productName = p_productName;
}
/**
* Get Product Description
*
* @exception Exception In case of some unreported Exception
* @return Description of the Product
*/
public String getProductDesc() throws Exception{
return m_productDesc;
}
/**
* Sets Product Description
*
* @param p_productDesc Product Description to be set
* @exception Exception In case of some unreported Exception
*/
public void setProductDesc(String p_productDesc) throws Exception{
m_productDesc = p_productDesc;
}
/**
* Gets the Price of the Product
*
* @exception Exception In case of some unreported Exception
* @return Product Price
*/
public String getProductPrice() throws Exception{
return m_productPrice;
}
/**
* Sets the Product Price
*
* @param p_productPrice Price to be set
* @exception Exception In case of some unreported Exception
*/
public void setProductPrice(String p_productPrice) throws Exception{
m_productPrice = p_productPrice;
}
/**
* Gets the Name of the category to which this product belongs
*
* @exception Exception In case of some unreported Exception
* @return Category Name
*/
public String getCategoryDesc() throws Exception{
return m_categoryDesc;
}
/**
* Sets the Category to which this product belongs
*
* @param p_categoryDesc Name of the Category
* @exception Exception In case of some unreported Exception
*/
public void setCategoryDesc(String p_categoryDesc) throws Exception{
m_categoryDesc = p_categoryDesc;
}
/**
* Gets the available quantity
*
* @exception Exception In case of some unreported Exception
* @return Available Quantity
*/
public String getQuantityOnHand() throws Exception{
return m_quantityOnHand;
}
/**
* Sets the Available Quantity
*
* @param p_quantityOnHand Available Quantity to be set
* @exception Exception In case of some unreported Exception
*/
public void setQuantityOnHand(String p_quantityOnHand) throws Exception{
m_quantityOnHand = p_quantityOnHand;
}
/**
* Gets the Name of the Manufacturer who develops this product
*
* @exception Exception In case of some unreported Exception
* @return Name of the Manufacturer
*/
public String getManufacturerName() throws Exception{
return m_manufacturerName;
}
/**
* Sets the Name of the Manufacturer
*
* @param p_manufacturerName Manufacturer Name
* @exception Exception In case of some unreported Exception
*/
public void setManufacturerName(String p_manufacturerName) throws Exception{
m_manufacturerName = p_manufacturerName;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -