Class Order

java.lang.Object
jadex.bdi.booktrading.Order

public class Order extends Object
The order for purchasing or selling books.
  • Field Details

    • OPEN

      public static final String OPEN
      The state open.
      See Also:
    • DONE

      public static final String DONE
      The state done.
      See Also:
    • FAILED

      public static final String FAILED
      The state failed.
      See Also:
    • title

      protected String title
      The book title.
    • deadline

      protected Date deadline
      The deadline.
    • limit

      protected int limit
      The limit price.
    • startprice

      protected int startprice
      The startprice.
    • starttime

      protected long starttime
      The starttime.
    • exeprice

      protected Integer exeprice
      The execution price.
    • exedate

      protected Date exedate
      The execution date.
    • buyorder

      protected boolean buyorder
      The flag indicating if it is a buy (or sell) order.
    • state

      protected String state
      The state.
    • pcs

      The helper object for bean events.
  • Constructor Details

    • Order

      public Order(String title, long starttime, int start, int limit, boolean buyorder)
      Create a new order.
      Parameters:
      title - The title.
      start - The start price
      limit - The limit.
      deadline - The deadline.
  • Method Details

    • getTitle

      public String getTitle()
      Get the title.
      Returns:
      The title.
    • setTitle

      public void setTitle(String title)
      Set the title.
      Parameters:
      title - The title.
    • getDeadline

      public Date getDeadline()
      Get the deadline.
      Returns:
      The deadline.
    • setDeadline

      public void setDeadline(Date deadline, jadex.execution.IExecutionFeature exe)
      Set the deadline.
      Parameters:
      deadline - The deadline.
    • getLimit

      public int getLimit()
      Get the limit.
      Returns:
      The limit.
    • setLimit

      public void setLimit(int limit)
      Set the limit.
      Parameters:
      limit - The limit.
    • getStartPrice

      public int getStartPrice()
      Getter for startprice
      Returns:
      Returns startprice.
    • setStartPrice

      public void setStartPrice(int startprice)
      Setter for startprice.
      Parameters:
      startprice - The Order.java value to set
    • getStartTime

      public long getStartTime()
      Get the start time.
      Returns:
      The start time.
    • setStartTime

      public void setStartTime(long starttime)
      Set the start time.
      Parameters:
      starttime - The start time.
    • getExecutionPrice

      public Integer getExecutionPrice()
      Get the execution price.
      Returns:
      The execution price.
    • setExecutionPrice

      public void setExecutionPrice(Integer exeprice)
      Set the execution price.
      Parameters:
      exeprice - The execution price.
    • getExecutionDate

      public Date getExecutionDate()
      Get the execution date.
      Returns:
      The execution date.
    • setExecutionDate

      public void setExecutionDate(Date exedate)
      Set the execution date.
      Parameters:
      exedate - The execution date.
    • isBuyOrder

      public boolean isBuyOrder()
      Test if it is a buyorder.
      Returns:
      True, if buy order.
    • setBuyOrder

      public void setBuyOrder(boolean buyorder)
      Set the order type.
      Parameters:
      buyorder - True for buyorder.
    • getState

      public String getState()
      Get the order state.
      Returns:
      The order state.
    • setState

      public void setState(String state)
      Set the state.
      Parameters:
      state - The state.
    • toString

      public String toString()
      Get a string representation of the order.
      Overrides:
      toString in class Object
    • addPropertyChangeListener

      public void addPropertyChangeListener(PropertyChangeListener listener)
      Add a PropertyChangeListener to the listener list. The listener is registered for all properties.
      Parameters:
      listener - The PropertyChangeListener to be added.
    • removePropertyChangeListener

      public void removePropertyChangeListener(PropertyChangeListener listener)
      Remove a PropertyChangeListener from the listener list. This removes a PropertyChangeListener that was registered for all properties.
      Parameters:
      listener - The PropertyChangeListener to be removed.