edu.rice.rubis.beans
Interface BidHome

All Superinterfaces:
javax.ejb.EJBHome, java.rmi.Remote

public interface BidHome
extends javax.ejb.EJBHome

This is the Home interface of the Bid Bean

Version:
1.0
Author:
Emmanuel Cecchet and Julie Marguerite

Method Summary
 Bid create(java.lang.Integer bidUserId, java.lang.Integer bidItemId, float userBid, float userMaxBid, int quantity)
          This method is used to create a new Bid Bean.
 java.util.Collection findAllBids()
          This method is used to retrieve all bids from the database!
 java.util.Collection findByItem(java.lang.Integer id)
          This method is used to retrieve all Bid Beans related to one item.
 Bid findByPrimaryKey(BidPK id)
          This method is used to retrieve a Bid Bean from its primary key, that is to say its id.
 java.util.Collection findByUser(java.lang.Integer id)
          This method is used to retrieve all Bid Beans belonging to a specific user.
 
Methods inherited from interface javax.ejb.EJBHome
getEJBMetaData, getHomeHandle, remove, remove
 

Method Detail

create

public Bid create(java.lang.Integer bidUserId,
                  java.lang.Integer bidItemId,
                  float userBid,
                  float userMaxBid,
                  int quantity)
           throws javax.ejb.CreateException,
                  java.rmi.RemoteException,
                  javax.ejb.RemoveException
This method is used to create a new Bid Bean. The date is automatically set to the current date when the method is called.
Parameters:
bidUserId - user id of the bidder, must match the primary key of table users
bidItemId - item id, must match the primary key of table items
userBid - the amount of the user bid
userMaxBid - the maximum amount the user wants to bid
quantity - number of items the user wants to buy
Returns:
pk primary key set to null
Throws:
javax.ejb.CreateException - if an error occurs
java.rmi.RemoteException - if an error occurs
javax.ejb.RemoveException - if an error occurs

findByPrimaryKey

public Bid findByPrimaryKey(BidPK id)
                     throws javax.ejb.FinderException,
                            java.rmi.RemoteException
This method is used to retrieve a Bid Bean from its primary key, that is to say its id.
Parameters:
id - Bid id (primary key)
Returns:
the Bid if found else null
Throws:
javax.ejb.FinderException - if an error occurs
java.rmi.RemoteException - if an error occurs

findByItem

public java.util.Collection findByItem(java.lang.Integer id)
                                throws javax.ejb.FinderException,
                                       java.rmi.RemoteException
This method is used to retrieve all Bid Beans related to one item. You must provide the item id.
Parameters:
id - item id
Returns:
List of Bids found (eventually empty)
Throws:
javax.ejb.FinderException - if an error occurs
java.rmi.RemoteException - if an error occurs

findByUser

public java.util.Collection findByUser(java.lang.Integer id)
                                throws javax.ejb.FinderException,
                                       java.rmi.RemoteException
This method is used to retrieve all Bid Beans belonging to a specific user. You must provide the user id.
Parameters:
id - user id
Returns:
List of Bids found (eventually empty)
Throws:
javax.ejb.FinderException - if an error occurs
java.rmi.RemoteException - if an error occurs

findAllBids

public java.util.Collection findAllBids()
                                 throws java.rmi.RemoteException,
                                        javax.ejb.FinderException
This method is used to retrieve all bids from the database!
Returns:
List of all bids (eventually empty)
Throws:
java.rmi.RemoteException - if an error occurs
javax.ejb.FinderException - if an error occurs


Copyright © 2003 - ObjectWeb Consortium - All Rights Reserved.