org.apache.geronimo.samples.daytrader.session
Class TradeJDBCBean
java.lang.Object
org.apache.geronimo.samples.daytrader.session.TradeJDBCBean
- All Implemented Interfaces:
- Serializable, EnterpriseBean, SessionBean
public class TradeJDBCBean
- extends Object
- implements SessionBean
- See Also:
- Serialized Form
Method Summary |
OrderDataBean |
buy(String userID,
String symbol,
double quantity,
int orderProcessingMode)
|
void |
cancelOrder(Integer orderID,
boolean twoPhase)
|
OrderDataBean |
completeOrder(Integer orderID,
boolean twoPhase)
|
QuoteDataBean |
createQuote(String symbol,
String companyName,
BigDecimal price)
|
void |
ejbActivate()
|
void |
ejbCreate()
|
void |
ejbPassivate()
|
void |
ejbRemove()
|
AccountDataBean |
getAccountData(String userID)
|
AccountProfileDataBean |
getAccountProfileData(String userID)
|
Collection |
getAllQuotes()
|
Collection |
getClosedOrders(String userID)
|
HoldingDataBean |
getHolding(Integer holdingID)
|
Collection |
getHoldings(String userID)
|
MarketSummaryDataBean |
getMarketSummary()
|
Collection |
getOrders(String userID)
|
QuoteDataBean |
getQuote(String symbol)
|
AccountDataBean |
login(String userID,
String password)
|
void |
logout(String userID)
|
void |
orderCompleted(String userID,
Integer orderID)
|
void |
queueOrder(Integer orderID,
boolean twoPhase)
|
AccountDataBean |
register(String userID,
String password,
String fullname,
String address,
String email,
String creditcard,
BigDecimal openBalance)
|
RunStatsDataBean |
resetTrade(boolean deleteAll)
|
OrderDataBean |
sell(String userID,
Integer holdingID,
int orderProcessingMode)
|
void |
setSessionContext(SessionContext sc)
|
AccountProfileDataBean |
updateAccountProfile(AccountProfileDataBean profileData)
|
QuoteDataBean |
updateQuotePriceVolume(String symbol,
BigDecimal newPrice,
double sharesTraded)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TradeJDBCBean
public TradeJDBCBean()
ejbCreate
public void ejbCreate()
throws CreateException
- Throws:
CreateException
ejbRemove
public void ejbRemove()
- Specified by:
ejbRemove
in interface SessionBean
ejbActivate
public void ejbActivate()
- Specified by:
ejbActivate
in interface SessionBean
ejbPassivate
public void ejbPassivate()
- Specified by:
ejbPassivate
in interface SessionBean
setSessionContext
public void setSessionContext(SessionContext sc)
- Specified by:
setSessionContext
in interface SessionBean
getMarketSummary
public MarketSummaryDataBean getMarketSummary()
throws Exception,
RemoteException
- Throws:
Exception
RemoteException
buy
public OrderDataBean buy(String userID,
String symbol,
double quantity,
int orderProcessingMode)
throws Exception,
RemoteException
- Throws:
Exception
RemoteException
sell
public OrderDataBean sell(String userID,
Integer holdingID,
int orderProcessingMode)
throws Exception,
RemoteException
- Throws:
Exception
RemoteException
queueOrder
public void queueOrder(Integer orderID,
boolean twoPhase)
throws Exception,
RemoteException
- Throws:
Exception
RemoteException
completeOrder
public OrderDataBean completeOrder(Integer orderID,
boolean twoPhase)
throws Exception,
RemoteException
- Throws:
Exception
RemoteException
cancelOrder
public void cancelOrder(Integer orderID,
boolean twoPhase)
throws Exception,
RemoteException
- Throws:
Exception
RemoteException
orderCompleted
public void orderCompleted(String userID,
Integer orderID)
throws Exception,
RemoteException
- Throws:
Exception
RemoteException
getOrders
public Collection getOrders(String userID)
throws Exception,
RemoteException
- Throws:
Exception
RemoteException
getClosedOrders
public Collection getClosedOrders(String userID)
throws Exception,
RemoteException
- Throws:
Exception
RemoteException
createQuote
public QuoteDataBean createQuote(String symbol,
String companyName,
BigDecimal price)
throws Exception,
RemoteException
- Throws:
Exception
RemoteException
getQuote
public QuoteDataBean getQuote(String symbol)
throws Exception,
RemoteException
- Throws:
Exception
RemoteException
getAllQuotes
public Collection getAllQuotes()
throws Exception,
RemoteException
- Throws:
Exception
RemoteException
updateQuotePriceVolume
public QuoteDataBean updateQuotePriceVolume(String symbol,
BigDecimal newPrice,
double sharesTraded)
throws Exception,
RemoteException
- Throws:
Exception
RemoteException
getHoldings
public Collection getHoldings(String userID)
throws Exception,
RemoteException
- Throws:
Exception
RemoteException
getHolding
public HoldingDataBean getHolding(Integer holdingID)
throws Exception,
RemoteException
- Throws:
Exception
RemoteException
getAccountData
public AccountDataBean getAccountData(String userID)
throws FinderException,
Exception
- Throws:
FinderException
Exception
getAccountProfileData
public AccountProfileDataBean getAccountProfileData(String userID)
throws Exception,
RemoteException
- Throws:
Exception
RemoteException
updateAccountProfile
public AccountProfileDataBean updateAccountProfile(AccountProfileDataBean profileData)
throws Exception,
RemoteException
- Throws:
Exception
RemoteException
login
public AccountDataBean login(String userID,
String password)
throws Exception,
RemoteException
- Throws:
Exception
RemoteException
logout
public void logout(String userID)
throws Exception,
RemoteException
- Throws:
Exception
RemoteException
register
public AccountDataBean register(String userID,
String password,
String fullname,
String address,
String email,
String creditcard,
BigDecimal openBalance)
throws Exception,
RemoteException
- Throws:
Exception
RemoteException
resetTrade
public RunStatsDataBean resetTrade(boolean deleteAll)
throws Exception,
RemoteException
- Throws:
Exception
RemoteException
Copyright © 2005-2007 Apache Software Foundation. All Rights Reserved.