edu.rice.rubis.beans
Interface ItemLocal

All Superinterfaces:
javax.ejb.EJBLocalObject

public interface ItemLocal
extends javax.ejb.EJBLocalObject

This is the Local Interface of the Item Bean.

Version:
1.1
Author:
Emmanuel Cecchet and Julie Marguerite

Method Summary
 void addOneBid()
          Add one bid for this item
 float getBuyNow()
          Get item Buy Now price set by the seller.
 java.lang.Integer getCategoryId()
          Give the category id of the item
 java.lang.String getCategoryName()
          Get the category name by finding the Bean corresponding to the category Id.
 java.lang.String getDescription()
          Get item description .
 java.lang.String getEndDate()
          End date of the auction in the format 'YYYY-MM-DD hh:mm:ss'
 java.lang.Integer getId()
          Get item id.
 float getInitialPrice()
          Get item initial price set by the seller.
 float getMaxBid()
          Get item maximum bid (if any) for this item.
 java.lang.String getName()
          Get item name.
 int getNbOfBids()
          Get number of bids for this item.
 int getQuantity()
          Get how many of this item are to be sold.
 float getReservePrice()
          Get item reserve price set by the seller.
 java.lang.Integer getSellerId()
          Give the user id of the seller
 java.lang.String getSellerNickname()
          Get the seller's nickname by finding the Bean corresponding to the user.
 java.lang.String getStartDate()
          Start date of the auction in the format 'YYYY-MM-DD hh:mm:ss'
 java.lang.String printItem()
          Display item information as an HTML table row
 java.lang.String printItemDescriptionToBuyNow(int userId)
          Display item information for the Buy Now servlet
 java.lang.String printItemUserHasBidOn(float bidMaxBid)
          Display item information for the AboutMe servlet
 java.lang.String printSell()
          Display item information as an HTML table row
 java.lang.String printUserBoughtItem(int qty)
          Display item information for the AboutMe servlet
 java.lang.String printUserWonItem()
          Display item information for the AboutMe servlet
 void setBuyNow(float newBuyNow)
          Set a new Buy Now price for the item
 void setCategoryId(java.lang.Integer id)
          Set a new category identifier.
 void setDescription(java.lang.String newDescription)
          Set a new item description
 void setEndDate(java.lang.String newDate)
          Set a new ending date for the auction
 void setInitialPrice(float newInitialPrice)
          Set a new initial price for the item
 void setMaxBid(float newMaxBid)
          Set item maximum bid
 void setName(java.lang.String newName)
          Set a new item name
 void setNbOfBids(int newNbOfBids)
          Set the number of bids for this item
 void setQuantity(int qty)
          Set a new item quantity
 void setReservePrice(float newReservePrice)
          Set a new reserve price for the item
 void setSellerId(java.lang.Integer id)
          Set a new seller identifier.
 void setStartDate(java.lang.String newDate)
          Set a new beginning date for the auction
 
Methods inherited from interface javax.ejb.EJBLocalObject
getEJBLocalHome, getPrimaryKey, isIdentical, remove
 

Method Detail

getId

public java.lang.Integer getId()
Get item id.
Returns:
item id
Since:
1.0

getName

public java.lang.String getName()
Get item name. This description is usually a short description of the item.
Returns:
item name
Since:
1.0

getDescription

public java.lang.String getDescription()
Get item description . This is usually an HTML file describing the item.
Returns:
item description
Since:
1.0

getInitialPrice

public float getInitialPrice()
Get item initial price set by the seller.
Returns:
item initial price
Since:
1.0

getQuantity

public int getQuantity()
Get how many of this item are to be sold.
Returns:
item quantity
Since:
1.0

getReservePrice

public float getReservePrice()
Get item reserve price set by the seller. The seller can refuse to sell if reserve price is not reached.
Returns:
item reserve price
Since:
1.0

getBuyNow

public float getBuyNow()
Get item Buy Now price set by the seller. A user can directly by the item at this price (no auction).
Returns:
item Buy Now price
Since:
1.0

getMaxBid

public float getMaxBid()
Get item maximum bid (if any) for this item. This value should be the same as doing
SELECT MAX(bid) FROM bids WHERE item_id=?
Returns:
current maximum bid or 0 if no bid
Since:
1.1

getNbOfBids

public int getNbOfBids()
Get number of bids for this item. This value should be the same as doing
SELECT COUNT(*) FROM bids WHERE item_id=?
Returns:
number of bids
Since:
1.1

getStartDate

public java.lang.String getStartDate()
Start date of the auction in the format 'YYYY-MM-DD hh:mm:ss'
Returns:
start date of the auction
Since:
1.0

getEndDate

public java.lang.String getEndDate()
End date of the auction in the format 'YYYY-MM-DD hh:mm:ss'
Returns:
end date of the auction
Since:
1.0

getSellerId

public java.lang.Integer getSellerId()
Give the user id of the seller
Returns:
seller's user id
Since:
1.0

getCategoryId

public java.lang.Integer getCategoryId()
Give the category id of the item
Returns:
item's category id
Since:
1.0

getSellerNickname

public java.lang.String getSellerNickname()
Get the seller's nickname by finding the Bean corresponding to the user.
Returns:
nickname
Since:
1.0

getCategoryName

public java.lang.String getCategoryName()
Get the category name by finding the Bean corresponding to the category Id.
Returns:
category name
Since:
1.0

setName

public void setName(java.lang.String newName)
Set a new item name
Parameters:
newName - item name
Since:
1.0

setDescription

public void setDescription(java.lang.String newDescription)
Set a new item description
Parameters:
newDescription - item description
Since:
1.0

setInitialPrice

public void setInitialPrice(float newInitialPrice)
Set a new initial price for the item
Parameters:
newInitialPrice - item initial price
Since:
1.0

setQuantity

public void setQuantity(int qty)
Set a new item quantity
Parameters:
qty - item quantity
Since:
1.0

setReservePrice

public void setReservePrice(float newReservePrice)
Set a new reserve price for the item
Parameters:
newReservePrice - item reserve price
Since:
1.0

setBuyNow

public void setBuyNow(float newBuyNow)
Set a new Buy Now price for the item
Parameters:
newBuyNow - item Buy Now price
Since:
1.0

setMaxBid

public void setMaxBid(float newMaxBid)
Set item maximum bid
Parameters:
newMaxBid - new maximum bid
Since:
1.1

setNbOfBids

public void setNbOfBids(int newNbOfBids)
Set the number of bids for this item
Parameters:
newNbOfBids - new number of bids
Since:
1.1

addOneBid

public void addOneBid()
Add one bid for this item
Since:
1.1

setStartDate

public void setStartDate(java.lang.String newDate)
Set a new beginning date for the auction
Parameters:
newDate - auction new beginning date
Since:
1.0

setEndDate

public void setEndDate(java.lang.String newDate)
Set a new ending date for the auction
Parameters:
newDate - auction new ending date
Since:
1.0

setSellerId

public void setSellerId(java.lang.Integer id)
Set a new seller identifier. This id must match the primary key of the users table.
Parameters:
id - seller id
Since:
1.0

setCategoryId

public void setCategoryId(java.lang.Integer id)
Set a new category identifier. This id must match the primary key of the category table.
Parameters:
id - category id
Since:
1.0

printItem

public java.lang.String printItem()
Display item information as an HTML table row
Returns:
a String containing HTML code
Since:
1.0

printUserBoughtItem

public java.lang.String printUserBoughtItem(int qty)
Display item information for the AboutMe servlet
Returns:
a String containing HTML code
Since:
1.0

printItemUserHasBidOn

public java.lang.String printItemUserHasBidOn(float bidMaxBid)
Display item information for the AboutMe servlet
Returns:
a String containing HTML code (Warning last link must be completed by servlet)
Since:
1.0

printSell

public java.lang.String printSell()
Display item information as an HTML table row
Returns:
a String containing HTML code
Since:
1.0

printUserWonItem

public java.lang.String printUserWonItem()
Display item information for the AboutMe servlet
Returns:
a String containing HTML code
Since:
1.0

printItemDescriptionToBuyNow

public java.lang.String printItemDescriptionToBuyNow(int userId)
Display item information for the Buy Now servlet
Returns:
a String containing HTML code
Since:
1.0


Copyright © 2003 - ObjectWeb Consortium - All Rights Reserved.