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 boolean
The flag indicating if it is a buy (or sell) order.protected Date
The deadline.static final String
The state done.protected Date
The execution date.protected Integer
The execution price.static final String
The state failed.protected int
The limit price.static final String
The state open.The helper object for bean events.protected int
The startprice.protected long
The starttime.protected String
The state.protected String
The book title. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a PropertyChangeListener to the listener list.Get the deadline.Get the execution date.Get the execution price.int
getLimit()
Get the limit.int
Getter for startpricelong
Get the start time.getState()
Get the order state.getTitle()
Get the title.boolean
Test if it is a buyorder.void
Remove a PropertyChangeListener from the listener list.void
setBuyOrder
(boolean buyorder) Set the order type.void
setDeadline
(Date deadline, jadex.execution.IExecutionFeature exe) 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
Set the state.void
Set 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.
-