Jadex 0.96

jadex.examples.booktrading.common
Class Order

java.lang.Object
  extended by jadex.examples.booktrading.common.Order

public class Order
extends Object

The order for purchasing or selling books.


Field Summary
static String DONE
          The state done.
static String FAILED
          The state failed.
static String OPEN
          The state open.
 SimplePropertyChangeSupport pcs
          The helper object for bean events.
 
Constructor Summary
Order(String title, Date deadline, int start, int limit, boolean buyorder)
          Create a new order.
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener listener)
          Add a PropertyChangeListener to the listener list.
 Date getDeadline()
          Get the deadline.
 Date getExecutionDate()
          Get the execution date.
 Integer getExecutionPrice()
          Get the execution price.
 int getLimit()
          Get the limit.
 int getStartPrice()
          Getter for startprice
 long getStartTime()
          Get the start time.
 String getState()
          Get the order state.
 String getTitle()
          Get the title.
 boolean isBuyOrder()
          Test if it is a buyorder.
 void removePropertyChangeListener(PropertyChangeListener listener)
          Remove a PropertyChangeListener from the listener list.
 void setBuyOrder(boolean buyorder)
          Set the order type.
 void setDeadline(Date deadline)
          Set the deadline.
 void setExecutionDate(Date exedate)
          Set the execution date.
 void setExecutionPrice(Integer exeprice)
          Set the execution price.
 void setLimit(int limit)
          Set the limit.
 void setStartPrice(int startprice)
          Setter for startprice.
 void setStartTime(long starttime)
          Set the start time.
 void setTitle(String title)
          Set the title.
 String toString()
          Get a string representation of the order.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

OPEN

public static final String OPEN
The state open.

See Also:
Constant Field Values

DONE

public static final String DONE
The state done.

See Also:
Constant Field Values

FAILED

public static final String FAILED
The state failed.

See Also:
Constant Field Values

pcs

public SimplePropertyChangeSupport pcs
The helper object for bean events.

Constructor Detail

Order

public Order(String title,
             Date deadline,
             int start,
             int limit,
             boolean buyorder)
Create a new order.

Parameters:
title - The title.
deadline - The deadline.
limit - The limit.
start - The start price
Method Detail

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)
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.

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.

Jadex 0.96

Submit a bug or feature
For further API reference and developer documentation, see the Jadex User Guide and the Jadex Tutorial. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, and working code examples.

Copyright (C) 2002-2007 Lars Braubach, Alexander Pokahr - University of Hamburg. Use is subject to license terms.