Rakesh API

biz.wedoit4u
Class Session

java.lang.Object
  extended by biz.wedoit4u.Session
Direct Known Subclasses:
AdminSession, CDASession, CMASession

public class Session
extends java.lang.Object

The parent class that is used to support the CMA and CDA applications. This class holds the common code between the CMASession and PartnerSession classes.

Copyright 2003, Rakesh Vidyadharan and wedoit4u.biz

Version:
$Id: Session.java,v 1.3 2004/05/26 11:42:30 rakesh Exp $
Author:
Rakesh Vidyadharan 24th November 2003

Constructor Summary
Session()
           
 
Method Summary
(package private)  CategoryBean[] getCategoryBeans(java.util.Collection collection)
          Iterate through the Collection of entity bean instances of type Category and create an array of java beans.
 CategoryBean[] getCategoryList(int customerId)
          Return an Array of java bean instances of type CategoryBean that represents all the records in the categories table that are associated with the specified customer_id.
private  ContentBean[] getContentBeans(java.util.Collection collection)
          Iterate through the Collection of entity bean instances of type Content and create an array of java beans.
 ContentBean[] getContentList()
          Return an Array of java bean instances of type ContentBean that represents all the records in the contents table.
 ContentBean[] getContentList(int categoryId)
          Return an Array of java bean instances of type ContentBean that represents all the records in the contents table that are associated with the specified category_id.
 long getUniqueNumber()
          Return a unique number that can be used to generate unique URL's.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Session

public Session()
Method Detail

getCategoryList

public CategoryBean[] getCategoryList(int customerId)
                               throws CMAException
Return an Array of java bean instances of type CategoryBean that represents all the records in the categories table that are associated with the specified customer_id.

Returns:
CategoryBean[] - The array of java bean instances.
Throws:
CMAException - - If Naming or Finder exceptions are encoutered while fetching the collection of entity beans.
See Also:
CategoryBean.findByCustomer( int ), getCategoryBeans( Collection )

getCategoryBeans

CategoryBean[] getCategoryBeans(java.util.Collection collection)
                          throws CMAException
Iterate through the Collection of entity bean instances of type Category and create an array of java beans.

Parameters:
collection - - The collection of entity bean instances.
Returns:
CategoryBean[] - The array of java bean.
Throws:
CMAException - - If errors are encountered while fetching the java bean instances.

getContentList

public ContentBean[] getContentList()
                             throws CMAException
Return an Array of java bean instances of type ContentBean that represents all the records in the contents table.

Returns:
ContentBean[] - The array of java bean instances.
Throws:
CMAException - - If Naming or Finder exceptions are encoutered while fetching the collection of entity beans.
See Also:
ContentBean.findAll(), getContentBeans( Collection )

getContentList

public ContentBean[] getContentList(int categoryId)
                             throws CMAException
Return an Array of java bean instances of type ContentBean that represents all the records in the contents table that are associated with the specified category_id.

Returns:
ContentBean[] - The array of java bean instances.
Throws:
CMAException - - If Naming or Finder exceptions are encoutered while fetching the collection of entity beans.
See Also:
ContentBean.findByCategory( int ), getContentBeans( Collection )

getContentBeans

private ContentBean[] getContentBeans(java.util.Collection collection)
                               throws CMAException
Iterate through the Collection of entity bean instances of type Content and create an array of java beans.

Parameters:
collection - - The collection of entity bean instances.
Returns:
ContentBean[] - The array of java bean.
Throws:
CMAException - - If errors are encountered while fetching the java bean instances.

getUniqueNumber

public final long getUniqueNumber()
Return a unique number that can be used to generate unique URL's. This seems to be the only way to ensure that browsers do not cache pages that we do not want cached. At present this method just returns System.currentTimeMillis().


Rakesh API

Copyright © 2002-2005 - Rakesh Vidyadharan