Package jadex.bdi.booktrading
Class Order
java.lang.Object
jadex.bdi.booktrading.Order
The order for purchasing or selling books.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanThe flag indicating if it is a buy (or sell) order.protected DateThe deadline.static final StringThe state done.protected DateThe execution date.protected IntegerThe execution price.static final StringThe state failed.protected intThe limit price.static final StringThe state open.The helper object for bean events.protected intThe startprice.protected longThe starttime.protected StringThe state.protected StringThe book title. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a PropertyChangeListener to the listener list.Get the deadline.Get the execution date.Get the execution price.intgetLimit()Get the limit.intGetter for startpricelongGet the start time.getState()Get the order state.getTitle()Get the title.booleanTest if it is a buyorder.voidRemove a PropertyChangeListener from the listener list.voidsetBuyOrder(boolean buyorder) Set the order type.voidsetDeadline(Date deadline, jadex.execution.IExecutionFeature exe) Set the deadline.voidsetExecutionDate(Date exedate) Set the execution date.voidsetExecutionPrice(Integer exeprice) Set the execution price.voidsetLimit(int limit) Set the limit.voidsetStartPrice(int startprice) Setter for startprice.voidsetStartTime(long starttime) Set the start time.voidSet the state.voidSet the title.toString()Get a string representation of the order.
-
Field Details
-
OPEN
The state open.- See Also:
-
DONE
The state done.- See Also:
-
FAILED
The state failed.- See Also:
-
title
The book title. -
deadline
The deadline. -
limit
protected int limitThe limit price. -
startprice
protected int startpriceThe startprice. -
starttime
protected long starttimeThe starttime. -
exeprice
The execution price. -
exedate
The execution date. -
buyorder
protected boolean buyorderThe flag indicating if it is a buy (or sell) order. -
state
The state. -
pcs
The helper object for bean events.
-
-
Constructor Details
-
Order
Create a new order.- Parameters:
title- The title.start- The start pricelimit- The limit.deadline- The deadline.
-
-
Method Details
-
getTitle
Get the title.- Returns:
- The title.
-
setTitle
Set the title.- Parameters:
title- The title.
-
getDeadline
Get the deadline.- Returns:
- The deadline.
-
setDeadline
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
Get the execution price.- Returns:
- The execution price.
-
setExecutionPrice
Set the execution price.- Parameters:
exeprice- The execution price.
-
getExecutionDate
Get the execution date.- Returns:
- The execution date.
-
setExecutionDate
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
Get the order state.- Returns:
- The order state.
-
setState
Set the state.- Parameters:
state- The state.
-
toString
Get a string representation of the order. -
addPropertyChangeListener
Add a PropertyChangeListener to the listener list. The listener is registered for all properties.- Parameters:
listener- The PropertyChangeListener to be added.
-
removePropertyChangeListener
Remove a PropertyChangeListener from the listener list. This removes a PropertyChangeListener that was registered for all properties.- Parameters:
listener- The PropertyChangeListener to be removed.
-