CLRA 0.1.2

com.clra.web
Class EnrollmentSet

java.lang.Object
  |
  +--com.clra.web.EnrollmentSet
All Implemented Interfaces:
IEventList

public class EnrollmentSet
extends Object
implements IEventList

A JSP bean that provides ordered lists of EnrollmentViews. This class is a thin wrapper around calls to RowingUtils. In the future, it might add further value by caching and sorting views on the client side.

FIXME: this class is basically a list, not a set. A set hides duplicates, whereas a list does not. Rename this class.

In the current implementation, a list is created on the fly whenever a JSP is displayed, and the list is tossed after the page is written. For lists of 60 or so items, a page will update in 2 - 3 seconds when the app and web servers are lightly loaded. This is adequate performance, since most lists will be restricted by month, and therefore will contain roughly 30 items.

Version:
$Revision: 1.2 $ $Date: 2002/01/30 15:17:30 $
Author:
Rick Hall

Fields inherited from interface com.clra.web.IEventList
AN_COMPARATOR, AN_ISRESTRICTED, AN_MONTH, AN_YEAR
 
Constructor Summary
EnrollmentSet()
          Creates an invalid EnrollmentSet, but required by Bean contract
EnrollmentSet(Integer memberId, Integer month)
          Prepares a restricted iterator for the specified month of the current year.
EnrollmentSet(Integer memberId, Integer month, Integer year)
          Prepares a restricted iterator for the specified month and year
 
Method Summary
 ISerializableComparator getComparator()
          Stubbed method that returns null
 Iterator getIterator()
          Returns an iterator constructed to the current setting
 Integer getMemberId()
          Returns the primary key of the member to whom this enrollment applies
 Integer getMonth()
          Returns the month used by restricted iterations
 Boolean getRestricted()
          Returns a flag that indicates whether an iterator will be restricted to events that are scheduled to start within a particular month and year.
 Integer getYear()
          Returns the year used by restricted iterations
 void setComparator(ISerializableComparator comparator)
          Stubbed method that does nothing
 void setMemberId(Integer memberId)
          Sets the member to whom this enrollment applies
 void setMonth(Integer month)
          Sets the month used by restricted iterations
 void setRestricted(Boolean restricted)
          Sets whether an iterator will be restricted to events that start within a particular month and year.
 void setYear(Integer year)
          Sets the year used by restricted iterations
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnrollmentSet

public EnrollmentSet()
              throws WebException
Creates an invalid EnrollmentSet, but required by Bean contract

EnrollmentSet

public EnrollmentSet(Integer memberId,
                     Integer month)
              throws WebException
Prepares a restricted iterator for the specified month of the current year.
Parameters:
memberId - the member to whom this enrollment applies

EnrollmentSet

public EnrollmentSet(Integer memberId,
                     Integer month,
                     Integer year)
              throws WebException
Prepares a restricted iterator for the specified month and year
Method Detail

getMemberId

public Integer getMemberId()
Returns the primary key of the member to whom this enrollment applies

setMemberId

public void setMemberId(Integer memberId)
Sets the member to whom this enrollment applies

getRestricted

public Boolean getRestricted()
Returns a flag that indicates whether an iterator will be restricted to events that are scheduled to start within a particular month and year.
Specified by:
getRestricted in interface IEventList

setRestricted

public void setRestricted(Boolean restricted)
Sets whether an iterator will be restricted to events that start within a particular month and year. A null values does not change the current restriction.
Specified by:
setRestricted in interface IEventList

getMonth

public Integer getMonth()
Returns the month used by restricted iterations
Specified by:
getMonth in interface IEventList

setMonth

public void setMonth(Integer month)
Sets the month used by restricted iterations
Specified by:
setMonth in interface IEventList

getYear

public Integer getYear()
Returns the year used by restricted iterations
Specified by:
getYear in interface IEventList

setYear

public void setYear(Integer year)
Sets the year used by restricted iterations
Specified by:
setYear in interface IEventList

getComparator

public ISerializableComparator getComparator()
Stubbed method that returns null
Specified by:
getComparator in interface IEventList

setComparator

public void setComparator(ISerializableComparator comparator)
Stubbed method that does nothing
Specified by:
setComparator in interface IEventList

getIterator

public Iterator getIterator()
                     throws WebException
Returns an iterator constructed to the current setting
Specified by:
getIterator in interface IEventList

CLRA 0.1.2