Class Order
- java.lang.Object
- 
- jadex.bdiv3.examples.booktrading.common.Order
 
- 
 public class Order extends java.lang.ObjectThe order for purchasing or selling books.
- 
- 
Field SummaryFields Modifier and Type Field Description protected booleanbuyorderThe flag indicating if it is a buy (or sell) order.protected IClockServiceclockThe clock.protected java.util.DatedeadlineThe deadline.static java.lang.StringDONEThe state done.protected java.util.DateexedateThe execution date.protected java.lang.IntegerexepriceThe execution price.static java.lang.StringFAILEDThe state failed.protected intlimitThe limit price.static java.lang.StringOPENThe state open.SimplePropertyChangeSupportpcsThe helper object for bean events.protected intstartpriceThe startprice.protected longstarttimeThe starttime.protected java.lang.StringstateThe state.protected java.lang.StringtitleThe book title.
 - 
Constructor SummaryConstructors Constructor Description Order(java.lang.String title, java.util.Date deadline, int start, int limit, boolean buyorder, IClockService clock)Create a new order.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddPropertyChangeListener(PropertyChangeListener listener)Add a PropertyChangeListener to the listener list.java.util.DategetDeadline()Get the deadline.java.util.DategetExecutionDate()Get the execution date.java.lang.IntegergetExecutionPrice()Get the execution price.intgetLimit()Get the limit.intgetStartPrice()Getter for startpricelonggetStartTime()Get the start time.java.lang.StringgetState()Get the order state.java.lang.StringgetTitle()Get the title.booleanisBuyOrder()Test if it is a buyorder.voidremovePropertyChangeListener(PropertyChangeListener listener)Remove a PropertyChangeListener from the listener list.voidsetBuyOrder(boolean buyorder)Set the order type.voidsetDeadline(java.util.Date deadline)Set the deadline.voidsetExecutionDate(java.util.Date exedate)Set the execution date.voidsetExecutionPrice(java.lang.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.voidsetState(java.lang.String state)Set the state.voidsetTitle(java.lang.String title)Set the title.java.lang.StringtoString()Get a string representation of the order.
 
- 
- 
- 
Field Detail- 
OPENpublic static final java.lang.String OPEN The state open.- See Also:
- Constant Field Values
 
 - 
DONEpublic static final java.lang.String DONE The state done.- See Also:
- Constant Field Values
 
 - 
FAILEDpublic static final java.lang.String FAILED The state failed.- See Also:
- Constant Field Values
 
 - 
titleprotected java.lang.String title The book title.
 - 
deadlineprotected java.util.Date deadline The deadline.
 - 
limitprotected int limit The limit price.
 - 
startpriceprotected int startprice The startprice.
 - 
starttimeprotected long starttime The starttime.
 - 
exepriceprotected java.lang.Integer exeprice The execution price.
 - 
exedateprotected java.util.Date exedate The execution date.
 - 
buyorderprotected boolean buyorder The flag indicating if it is a buy (or sell) order.
 - 
stateprotected java.lang.String state The state.
 - 
clockprotected IClockService clock The clock.
 - 
pcspublic SimplePropertyChangeSupport pcs The helper object for bean events.
 
- 
 - 
Constructor Detail- 
Orderpublic Order(java.lang.String title, java.util.Date deadline, int start, int limit, boolean buyorder, IClockService clock)Create a new order.- Parameters:
- title- The title.
- deadline- The deadline.
- limit- The limit.
- start- The start price
 
 
- 
 - 
Method Detail- 
getTitlepublic java.lang.String getTitle() Get the title.- Returns:
- The title.
 
 - 
setTitlepublic void setTitle(java.lang.String title) Set the title.- Parameters:
- title- The title.
 
 - 
getDeadlinepublic java.util.Date getDeadline() Get the deadline.- Returns:
- The deadline.
 
 - 
setDeadlinepublic void setDeadline(java.util.Date deadline) Set the deadline.- Parameters:
- deadline- The deadline.
 
 - 
getLimitpublic int getLimit() Get the limit.- Returns:
- The limit.
 
 - 
setLimitpublic void setLimit(int limit) Set the limit.- Parameters:
- limit- The limit.
 
 - 
getStartPricepublic int getStartPrice() Getter for startprice- Returns:
- Returns startprice.
 
 - 
setStartPricepublic void setStartPrice(int startprice) Setter for startprice.- Parameters:
- startprice- The Order.java value to set
 
 - 
getStartTimepublic long getStartTime() Get the start time.- Returns:
- The start time.
 
 - 
setStartTimepublic void setStartTime(long starttime) Set the start time.- Parameters:
- starttime- The start time.
 
 - 
getExecutionPricepublic java.lang.Integer getExecutionPrice() Get the execution price.- Returns:
- The execution price.
 
 - 
setExecutionPricepublic void setExecutionPrice(java.lang.Integer exeprice) Set the execution price.- Parameters:
- exeprice- The execution price.
 
 - 
getExecutionDatepublic java.util.Date getExecutionDate() Get the execution date.- Returns:
- The execution date.
 
 - 
setExecutionDatepublic void setExecutionDate(java.util.Date exedate) Set the execution date.- Parameters:
- exedate- The execution date.
 
 - 
isBuyOrderpublic boolean isBuyOrder() Test if it is a buyorder.- Returns:
- True, if buy order.
 
 - 
setBuyOrderpublic void setBuyOrder(boolean buyorder) Set the order type.- Parameters:
- buyorder- True for buyorder.
 
 - 
getStatepublic java.lang.String getState() Get the order state.- Returns:
- The order state.
 
 - 
setStatepublic void setState(java.lang.String state) Set the state.- Parameters:
- state- The state.
 
 - 
toStringpublic java.lang.String toString() Get a string representation of the order.- Overrides:
- toStringin class- java.lang.Object
 
 - 
addPropertyChangeListenerpublic 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.
 
 - 
removePropertyChangeListenerpublic 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.
 
 
- 
 
-