/*
 * Created on Sep 4, 2003
 *
 * To change the template for this generated file go to
 * Window>Preferences>Java>Code Generation>Code and Comments
 */
package DataClasses;

/**
 * @author student
 *
 * To change the template for this generated type comment go to
 * 
 */
import java.sql.*;
/**
 * @author student
 *
 * This class is being used for holding details pertaining to ownership of stocks.
 * 
 */
public class StockOwnership_Data {
	private String stockCode;
	private String stockName;
	private String quantityOwned;
	private String totalCost;
	private Timestamp lastPurchasedDate;
	private String lastPurchaseAmount;
	private String lastPurchaseQty;

	/**
	 * This is the constructor for StockOwnership_Data.java
	 */
	public StockOwnership_Data(
		String code,
		String name,
		String qty,
		String totalCost,
		Timestamp lastdate,
		String lastAmt,
		String lastQty) {
		this.stockCode = code;
		this.stockName = name;
		this.quantityOwned = qty;
		this.totalCost = totalCost;
		this.lastPurchasedDate = lastdate;
		this.lastPurchaseAmount = lastAmt;
		this.lastPurchaseQty = lastQty;
	}
	/**
	 * This method is being used for getting the stock code.
	 * @return String The stock code
	 */
	public String getStockCode() {
		return this.stockCode;
	}
	
	/**
	 * This method is being used for setting the stock code.
	 * @param code The stock code
	 * @return void
	 */
	public void setStockCode(String code) {
		this.stockCode = code;
	}
	/**
	 * This method is being used for getting the quantity of stocks owned.
	 * @return String The quantity of owned stocks.
	 */
	public String getQuantityOwned() {
		return this.quantityOwned;
	}
	/**
	 * This method is being used for setting the quantity of stocks owned.
	 * @param qty The quantity of owned stocks.
	 * @return void
	 */
	public void setQuantityOwned(String qty) {
		this.quantityOwned = qty;
	}
	/**
	 * This method is being used for getting the total cost of stocks.
	 * @return String The total cost of stocks.
	 */
	public String getTotalCost() {
		return this.totalCost;
	}
	
	/**
	 * This method is being used for setting the total cost of stocks.
	 * @param d The total cost of stocks.
	 * @return void
	 */
	public void setTotalCost(String d) {
		this.totalCost = d;
	}
	/**
	 * This method is being used for getting the time when the last 
	 * purchase was made.
	 * @return Timestamp Time when the last purchase was made.
	 */
	public Timestamp getLastPurchasedDate() {
		return this.lastPurchasedDate;
	}

	/**
	 * This method is being used for setting the time when the last
	 * purchase was made.
	 * @param d Time when the last purchase was made.
	 * @return void
	 */
	public void setLastPurchasedDate(Timestamp d) {
		this.lastPurchasedDate = d;
	}
	/**
	 * This method is being used for getting the amount spent on the last
	 * purchase.
	 * @return String The amount spent on the last purchase.
	 */
	public String getLastPurchaseAmount() {
		return this.lastPurchaseAmount;
	}
	/**
	 * Method: setLastPurchaseAmount
	 * This method is being used for setting the amount spent on the last
	 * purchase.
	 * @param amt The amount spent on the last purchase.
	 * @return void
	 */
	public void setLastPurchaseAmount(String amt) {
		this.lastPurchaseAmount = amt;
	}
	/**
	 * This method is being used for getting the last purchase quantity.
	 * @return String The last quantity purchased.
	 */
	public String getLastPurchaseQty() {
		return this.lastPurchaseQty;
	}
	/**
	 * Method: setLastPurchaseQty
	 * This method is being used for setting the last purchase quantity.
	 * @param qty The quantity of stocks last purchased. 
	 * @return void
	 */
	public void setLastPurchaseQty(String qty) {
		this.lastPurchaseQty = qty;
	}
	/**
	 * This method is being used for setting the stock name.
	 * @param name The name of the stock 
	 * @return void
	 */
	public void setStockName(String name) {
		this.stockName = name;
	}
	/**
	 * Method: getStockName
	 * This method is being used for getting the stock name.
	 * @return String The name of stock.
	 */
	public String getStockName() {
		return this.stockName;
	}
	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	public String toString() {
		return this.stockCode + "," + this.stockName;
	}
}
