package StockTradeBusinessClasses;
import DisplayProject.binding.beans.ExtendedPropertyChangeSupport;
import DisplayProject.binding.beans.Observable;
import Framework.RuntimeProperties;
import Framework.TextData;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import java.io.Serializable;
import java.lang.Cloneable;
import java.lang.Object;
import java.lang.String;
/**
* Holding<p>
* <p>
* @author Generated from Forte
* @since 24-Aug-2010
*/
@RuntimeProperties(isDistributed=false, isAnchored=false, isShared=false, isTransactional=false)
@SuppressWarnings("serial")
public class Holding
implements Cloneable, Serializable, Observable
{
// ----------
// Attributes
// ----------
public PropertyChangeSupport qq_Listeners = null;
private TextData customerName;
private String stockName;
private int quantity;
private float price;
// ------------
// Constructors
// ------------
public Holding() {
// Explicitly call the superclass constructor to prevent the implicit call
super();
this.setCustomerName(new TextData());
}
// ----------------------
// Accessors and Mutators
// ----------------------
public void setCustomerName(TextData customerName) {
TextData oldValue = this.customerName;
this.customerName = customerName;
this.firePropertyChange("customerName", oldValue, this.customerName);
}
/**
* Getter for the attribute CustomerName
*/
public TextData getCustomerName() {
return this.customerName;
}
public void setStockName(String stockName) {
String oldValue = this.stockName;
this.stockName = stockName;
this.firePropertyChange("stockName", oldValue, this.stockName);
}
/**
* Getter for the attribute StockName
*/
public String getStockName() {
return this.stockName;
}
public void setQuantity(int quantity) {
int oldValue = this.quantity;
this.quantity = quantity;
this.firePropertyChange("quantity", oldValue, this.quantity);
}
/**
* Getter for the attribute Quantity
*/
public int getQuantity() {
return this.quantity;
}
public void setPrice(float price) {
float oldValue = this.price;
this.price = price;
this.firePropertyChange("price", new Float(oldValue), new Float(this.price));
}
/**
* Getter for the attribute Price
*/
public float getPrice() {
return this.price;
}
// -------
// Methods
// -------
public void firePropertyChange(PropertyChangeEvent evt) {
if (qq_Listeners != null) {
qq_Listeners.firePropertyChange(evt);
}
}
public void firePropertyChange(String pName, boolean oldValue, boolean newValue) {
if (qq_Listeners != null) {
qq_Listeners.firePropertyChange(pName, oldValue, newValue);
}
}
public void firePropertyChange(String pName, int oldValue, int newValue) {
if (qq_Listeners != null) {
qq_Listeners.firePropertyChange(pName, oldValue, newValue);
}
}
public void firePropertyChange(String pName, Object oldValue, Object newValue) {
if (qq_Listeners != null) {
qq_Listeners.firePropertyChange(pName, oldValue, newValue);
}
}
public boolean hasListeners(String propertyName) {
if (qq_Listeners != null) {
return qq_Listeners.hasListeners(propertyName);
}
return false;
}
public PropertyChangeSupport getPropertyListeners() {
if (qq_Listeners == null)
qq_Listeners = new ExtendedPropertyChangeSupport(this, true);
return this.qq_Listeners;
}
public void setPropertyListeners(PropertyChangeSupport pcs) {
qq_Listeners = pcs;
}
public void addPropertyChangeListener(String property, PropertyChangeListener listener) {
if (qq_Listeners == null) {
qq_Listeners = new ExtendedPropertyChangeSupport(this, true);
}
qq_Listeners.addPropertyChangeListener(property, listener);
}
public void addPropertyChangeListener(PropertyChangeListener listener) {
if (qq_Listeners == null) {
qq_Listeners = new ExtendedPropertyChangeSupport(this, true);
}
qq_Listeners.addPropertyChangeListener(listener);
}
public void removePropertyChangeListener(String property, PropertyChangeListener listener) {
if (qq_Listeners != null) {
qq_Listeners.removePropertyChangeListener(property, listener);
}
}
public void removePropertyChangeListener(PropertyChangeListener listener) {
if (qq_Listeners != null) {
qq_Listeners.removePropertyChangeListener(listener);
}
}
} // end class Holding
// c Pass 2 Conversion Time: 62 milliseconds