|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.rice.rubis.beans.QueryBean
MySQL version of Query Bean: QueryBean is a stateless session bean used to perform requests on the RUBiS database as described in rubis.sql.
Field Summary | |
protected javax.sql.DataSource |
dataSource
|
protected javax.ejb.SessionContext |
sessionContext
|
Constructor Summary | |
QueryBean()
|
Method Summary | |
void |
ejbActivate()
This method is empty for a stateless session bean |
void |
ejbCreate()
This method is empty for a stateless session bean |
void |
ejbPassivate()
This method is empty for a stateless session bean |
void |
ejbRemove()
This method is empty for a stateless session bean |
java.util.Vector |
getCurrentItemsInCategory(java.lang.Integer categoryId,
int startingRow,
int nbOfRows)
Get all the items that match a specific category and that are still to sell (auction end date is not passed). |
java.util.Vector |
getCurrentItemsInCategoryAndRegion(java.lang.Integer categoryId,
java.lang.Integer regionId,
int startingRow,
int nbOfRows)
Get all the items that match a specific category and region and that are still to sell (auction end date is not passed). |
java.util.Vector |
getItemBidHistory(java.lang.Integer itemId)
Get the bid history for an item sorted from the last bid to the first bid (oldest one). |
float |
getItemMaxBid(java.lang.Integer itemId)
Get the maximum bid (winning bid) for an item. |
int |
getItemNbOfBids(java.lang.Integer itemId)
Get the number of bids for an item. |
java.util.Vector |
getItemQtyMaxBid(int maxToCollect,
java.lang.Integer itemId)
Get the first maxToCollect bids for an item sorted from the maximum to the minimum. |
java.util.Vector |
getUserBids(java.lang.Integer userId)
Get all the maximum bids for each item the user has bid on in the last 30 days. |
java.util.Vector |
getUserWonItems(java.lang.Integer userId)
Get all the items the user won in the last 30 days. |
void |
setSessionContext(javax.ejb.SessionContext sessionContext)
Sets the associated session context. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected javax.ejb.SessionContext sessionContext
protected javax.sql.DataSource dataSource
Constructor Detail |
public QueryBean()
Method Detail |
public java.util.Vector getCurrentItemsInCategory(java.lang.Integer categoryId, int startingRow, int nbOfRows) throws java.rmi.RemoteException
categoryId
- id of the category you are looking forregionId
- id of the region you are looking forstartingRow
- row where result starts (0 if beginning)nbOfRows
- number of rows to getpublic java.util.Vector getCurrentItemsInCategoryAndRegion(java.lang.Integer categoryId, java.lang.Integer regionId, int startingRow, int nbOfRows) throws java.rmi.RemoteException
categoryId
- id of the category you are looking forregionId
- id of the region you are looking forstartingRow
- row where result starts (0 if beginning)nbOfRows
- number of rows to getpublic float getItemMaxBid(java.lang.Integer itemId) throws java.rmi.RemoteException
itemId
- item idjava.rmi.RemoteException
- if an error occurspublic java.util.Vector getItemQtyMaxBid(int maxToCollect, java.lang.Integer itemId) throws java.rmi.RemoteException
maxToCollect
- number of bids to collectitemId
- item idjava.rmi.RemoteException
- if an error occurspublic int getItemNbOfBids(java.lang.Integer itemId) throws java.rmi.RemoteException
itemId
- item idjava.rmi.RemoteException
- if an error occurspublic java.util.Vector getItemBidHistory(java.lang.Integer itemId) throws java.rmi.RemoteException
itemId
- item idjava.rmi.RemoteException
- if an error occurspublic java.util.Vector getUserWonItems(java.lang.Integer userId) throws java.rmi.RemoteException
userId
- user idjava.rmi.RemoteException
- if an error occurspublic java.util.Vector getUserBids(java.lang.Integer userId) throws java.rmi.RemoteException
userId
- user idjava.rmi.RemoteException
- if an error occurspublic void ejbCreate() throws javax.ejb.CreateException, java.rmi.RemoteException
public void ejbActivate() throws java.rmi.RemoteException
ejbActivate
in interface javax.ejb.SessionBean
public void ejbPassivate() throws java.rmi.RemoteException
ejbPassivate
in interface javax.ejb.SessionBean
public void ejbRemove() throws java.rmi.RemoteException
ejbRemove
in interface javax.ejb.SessionBean
public void setSessionContext(javax.ejb.SessionContext sessionContext) throws java.rmi.RemoteException
setSessionContext
in interface javax.ejb.SessionBean
sessionContext
- - A SessionContext interface for the instance.java.rmi.RemoteException
- - Thrown if the instance could not perform the function
requested by the container because of a system-level error.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |