|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This is the LocalHome interface of the Item Bean
Method Summary | |
ItemLocal |
create(java.lang.String itemName,
java.lang.String itemDescription,
float itemInitialPrice,
int itemQuantity,
float itemReservePrice,
float itemBuyNow,
int duration,
java.lang.Integer itemSellerId,
java.lang.Integer itemCategoryId)
This method is used to create a new Item Bean. |
java.util.Collection |
findAllItems()
This method is used to retrieve all items from the database! |
java.util.Collection |
findByCategory(java.lang.Integer id)
This method is used to retrieve all Item Beans belonging to a specific category. |
ItemLocal |
findByPrimaryKey(ItemPK id)
This method is used to retrieve an Item Bean from its primary key, that is to say its id. |
java.util.Collection |
findBySeller(java.lang.Integer id)
This method is used to retrieve all Item Beans belonging to a seller. |
java.util.Collection |
findCurrentByCategory(java.lang.Integer id)
This method is used to retrieve Item Beans belonging to a specific category that are still to sell (auction end date is not passed). |
java.util.Collection |
findUserCurrentSellings(java.lang.Integer userId)
Get all the items the user is currently selling. |
java.util.Collection |
findUserPastSellings(java.lang.Integer userId)
Get all the items the user sold in the last 30 days. |
Methods inherited from interface javax.ejb.EJBLocalHome |
remove |
Method Detail |
public ItemLocal create(java.lang.String itemName, java.lang.String itemDescription, float itemInitialPrice, int itemQuantity, float itemReservePrice, float itemBuyNow, int duration, java.lang.Integer itemSellerId, java.lang.Integer itemCategoryId) throws javax.ejb.CreateException, javax.ejb.RemoveException
itemName
- short item designationitemDescription
- long item description, usually an HTML fileitemInitialPrice
- initial price fixed by the selleritemQuantity
- number to sell (of this item)itemReservePrice
- reserve price (minimum price the seller really wants to sell)itemBuyNow
- price if a user wants to buy the item immediatlyduration
- duration of the auction in days (start date is when the method is called and end date is computed according to the duration)itemSellerId
- seller id, must match the primary key of table usersitemCategoryId
- category id, must match the primary key of table categoriespublic ItemLocal findByPrimaryKey(ItemPK id) throws javax.ejb.FinderException
id
- Item id (primary key)public java.util.Collection findBySeller(java.lang.Integer id) throws javax.ejb.FinderException
id
- User id of the sellerpublic java.util.Collection findByCategory(java.lang.Integer id) throws javax.ejb.FinderException
id
- Category idpublic java.util.Collection findCurrentByCategory(java.lang.Integer id) throws javax.ejb.FinderException
id
- Category idpublic java.util.Collection findUserCurrentSellings(java.lang.Integer userId) throws javax.ejb.FinderException
userId
- user idpublic java.util.Collection findUserPastSellings(java.lang.Integer userId) throws javax.ejb.FinderException
userId
- user idpublic java.util.Collection findAllItems() throws javax.ejb.FinderException
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |