com.ibm.commerce.me.datatype
Class RequisitionerSessionTable

java.lang.Object
  |
  +--com.ibm.commerce.me.datatype.RequisitionerSessionTable

public class RequisitionerSessionTable
extends java.lang.Object

A table stores the RequistionerSessionData based on user ID


Field Summary
protected  java.util.Hashtable cache
          A table containing all the requisitioner session data
protected  int cacheSize
          The size of the cache (table contaiing session data)
static java.lang.String COPYRIGHT
          IBM Copyright field
protected static  RequisitionerSessionTable singleton
          A singleton instance of the current class
 
Method Summary
 void addElement(java.lang.Long userId, java.lang.Object reqSession)
          Adds an instance of RequisitionerSessionData to the table
  RequisitionerSessionData find(java.lang.Long userId)
          Finds and returns an instance of RequisitionerSessionData based on user ID
 void removeAllElements()
          Removes all stored instances of RequisitionerSessionData from the table
 void removeElement(java.lang.Long userId)
          Removes an instance of RequisitionerSessionData based on user ID (as a key)
static  RequisitionerSessionTable singleton()
          Creates a singleton instance of the RequisitionerSessoinTable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail
public static final java.lang.String COPYRIGHT
IBM Copyright field
See Also:
Constant Field Values

cache

protected java.util.Hashtable cache
A table containing all the requisitioner session data

cacheSize

protected int cacheSize
The size of the cache (table contaiing session data)

singleton

protected static RequisitionerSessionTable singleton
A singleton instance of the current class
Method Detail

addElement

public void addElement(java.lang.Long userId,
                       java.lang.Object reqSession)
Adds an instance of RequisitionerSessionData to the table
Parameters:
userId - the user ID used as a key for the RequistionerSessionData
reqSession - the RequistionerSessionData to be added to the table

find

public RequisitionerSessionData find(java.lang.Long userId)
Finds and returns an instance of RequisitionerSessionData based on user ID
Parameters:
userId - the user ID used to identify an instance of RequisitionerSessionData
Returns:
the session data for a requisitioner

removeAllElements

public void removeAllElements()
Removes all stored instances of RequisitionerSessionData from the table

removeElement

public void removeElement(java.lang.Long userId)
Removes an instance of RequisitionerSessionData based on user ID (as a key)
Parameters:
userId - the user ID used as a key to identify an instance of ReuqisitionerSessionData to be removed

singleton

public static RequisitionerSessionTable singleton()
Creates a singleton instance of the RequisitionerSessoinTable
Returns:
a singleton instance of this class