com.ibm.websphere.samples.plantsbywebsphereejb
Class ReportGeneratorBean

java.lang.Object
  extended by com.ibm.websphere.samples.plantsbywebsphereejb.ReportGeneratorBean
All Implemented Interfaces:
java.io.Serializable, javax.ejb.EnterpriseBean, javax.ejb.SessionBean

public class ReportGeneratorBean
extends java.lang.Object
implements javax.ejb.SessionBean

ReportGeneratorBean is the implementation class for the ReportGenerator stateless session EJB. ReportGeneratorBean implements each of the business methods in the ReportGenerator EJB remote interface and each of the EJB lifecycle methods in the javax.ejb.SessionBean interface.

See Also:
Report, ReportFormat, ReportGenerator, ReportGeneratorHome, Serialized Form

Constructor Summary
ReportGeneratorBean()
           
 
Method Summary
 void ejbActivate()
          ejbActivate Session EJB lifecycle callback method.
 void ejbCreate()
          ejbCreate Session EJB lifecycle callback method.
 void ejbPassivate()
          ejbPassivate Session EJB lifecycle callback method.
 void ejbRemove()
          ejbRemove Session EJB lifecycle callback method.
 Report getTopSellersForDates(java.util.Date startdate, java.util.Date enddate, int quantity, ReportFormat reportFormat)
          Run the report to get the top selling items for a range of dates.
 Report getTopSellingZipsForDates(java.util.Date startdate, java.util.Date enddate, int quantity, ReportFormat reportFormat)
          Run the report to get the top zip codes for a range of dates.
 void setSessionContext(javax.ejb.SessionContext ctx)
          setSessionContext Session EJB lifecycle callback method to set the EJB sessionContext for this EJB.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReportGeneratorBean

public ReportGeneratorBean()
Method Detail

getTopSellersForDates

public Report getTopSellersForDates(java.util.Date startdate,
                                    java.util.Date enddate,
                                    int quantity,
                                    ReportFormat reportFormat)
Run the report to get the top selling items for a range of dates.

Parameters:
startdate - Start of date range.
enddate - End of date range.
quantity - Number of items to return in report.
reportFormat - - Report format information.
Returns:
Report containing results.

getTopSellingZipsForDates

public Report getTopSellingZipsForDates(java.util.Date startdate,
                                        java.util.Date enddate,
                                        int quantity,
                                        ReportFormat reportFormat)
Run the report to get the top zip codes for a range of dates.

Parameters:
startdate - Start of date range.
enddate - End of date range.
quantity - Number of items to return in report.
reportFormat - - Report format information.
Returns:
Report containing results.

ejbCreate

public void ejbCreate()
               throws javax.ejb.CreateException
ejbCreate Session EJB lifecycle callback method. This method is empty for Stateless EJB. This method corresponds to the create method in the home interface.

Throws:
javax.ejb.CreateException

ejbRemove

public void ejbRemove()
ejbRemove Session EJB lifecycle callback method. This method is empty for Stateless EJB. Called just before the end of life for this object.

Specified by:
ejbRemove in interface javax.ejb.SessionBean

ejbActivate

public void ejbActivate()
ejbActivate Session EJB lifecycle callback method. This method is empty for Stateless EJB.

Specified by:
ejbActivate in interface javax.ejb.SessionBean

ejbPassivate

public void ejbPassivate()
ejbPassivate Session EJB lifecycle callback method. This method is empty for Stateless EJB. Called when the instance is passivated from its "active" state, and releases.

Specified by:
ejbPassivate in interface javax.ejb.SessionBean

setSessionContext

public void setSessionContext(javax.ejb.SessionContext ctx)
setSessionContext Session EJB lifecycle callback method to set the EJB sessionContext for this EJB.

Specified by:
setSessionContext in interface javax.ejb.SessionBean
Parameters:
ctx - javax.ejb.SessionContext The context for this session EJB.