Package StockTradeBusinessClasses

Source Code of StockTradeBusinessClasses.Order

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;

/**
* Order<p>
* <p>
* @author Generated from Forte
* @since  24-Aug-2010
*/
@RuntimeProperties(isDistributed=false, isAnchored=false, isShared=false, isTransactional=false)
@SuppressWarnings("serial")
public class Order
        implements Cloneable, Serializable, Observable
{

    // ----------
    // Attributes
    // ----------
    public PropertyChangeSupport qq_Listeners = null;
    private int orderID;
    private TextData customerName;
    private String stockName;
    private String type;
    private int quantity;
    private float price;
    private boolean selectedForTrade;

    // ------------
    // Constructors
    // ------------
    public Order() {
        // Explicitly call the superclass constructor to prevent the implicit call
        super();

        this.setCustomerName(new TextData());

    }

    // ----------------------
    // Accessors and Mutators
    // ----------------------
    public void setOrderID(int orderID) {
        int oldValue = this.orderID;
        this.orderID = orderID;
        this.firePropertyChange("orderID", oldValue, this.orderID);
    }

    /**
     * Getter for the attribute OrderID
    */
    public int getOrderID() {
        return this.orderID;
    }

    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 setType(String type) {
        String oldValue = this.type;
        this.type = type;
        this.firePropertyChange("type", oldValue, this.type);
    }

    /**
     * Getter for the attribute Type
    */
    public String getType() {
        return this.type;
    }

    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;
    }

    public void setSelectedForTrade(boolean selectedForTrade) {
        boolean oldValue = this.selectedForTrade;
        this.selectedForTrade = selectedForTrade;
        this.firePropertyChange("selectedForTrade", oldValue, this.selectedForTrade);
    }

    /**
     * Getter for the attribute SelectedForTrade
    */
    public boolean getSelectedForTrade() {
        return this.selectedForTrade;
    }

    // -------
    // 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 Order
// c Pass 2 Conversion Time: 63 milliseconds
TOP

Related Classes of StockTradeBusinessClasses.Order

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.