|
||||||||
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)
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)
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)
itemId
- item idpublic java.util.Vector getItemQtyMaxBid(int maxToCollect, java.lang.Integer itemId)
maxToCollect
- number of bids to collectitemId
- item idpublic int getItemNbOfBids(java.lang.Integer itemId)
itemId
- item idpublic java.util.Vector getItemBidHistory(java.lang.Integer itemId)
itemId
- item idpublic java.util.Vector getUserWonItems(java.lang.Integer userId)
userId
- user idpublic java.util.Vector getUserBids(java.lang.Integer userId)
userId
- user idpublic void ejbCreate() throws javax.ejb.CreateException
public void ejbActivate()
ejbActivate
in interface javax.ejb.SessionBean
public void ejbPassivate()
ejbPassivate
in interface javax.ejb.SessionBean
public void ejbRemove()
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 |