|
|||||||||
| Home >> All >> com >> clra >> [ web overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.clra.web
Class MemberSet

java.lang.Objectcom.clra.web.MemberSet
- All Implemented Interfaces:
- INameList
- public class MemberSet
- extends java.lang.Object
- implements INameList
- extends java.lang.Object
A JSP bean that provides ordered lists of MemberViews. This class is a thin wrapper around calls to MemberDBRead. 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.
FIXME: this class could be less tightly coupled to the GUI, by using String properties lowerBound and upperBound. If both lowerBound and upperBound are non-null, then select for lowerBound <= names < upperBound. If lowerBound is null, then select for names < upperBound. If upperBound is null, then select for lowerBound <= names. If both are null, throw an IllegalStateException.
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 name, and therefore will contain roughly 40 (==300/8) items.
- Version:
- $Revision: 1.4 $ $Date: 2003/02/26 03:38:46 $
| Field Summary | |
private static java.lang.String |
base
|
private static java.lang.Integer |
DEFAULT_GROUP_INDEX
|
private java.lang.Integer |
group
Holds the group index that specifies which names should be displayed. |
private java.lang.Boolean |
restricted
Holds the restriction flag |
private static org.apache.log4j.Category |
theLog
|
| Fields inherited from interface com.clra.web.INameList |
AN_COMPARATOR, AN_GROUP, AN_ISRESTRICTED |
| Constructor Summary | |
MemberSet()
Prepares a restricted iterator for the current group and year |
|
MemberSet(java.lang.Integer group)
Prepares a restricted iterator for the specified group of the current year |
|
| Method Summary | |
(package private) java.util.Collection |
findMemberSnapshots(java.lang.Integer group)
Returns a collection of member snapshots based on the current group. |
java.util.Iterator |
getAllActiveMembers()
Deprecated. |
com.clra.util.ISerializableComparator |
getComparator()
Stubbed method that returns null |
java.lang.Integer |
getGroup()
Returns the group used by restricted iterations |
java.util.Iterator |
getIterator()
Returns an iterator constructed to the current setting |
(package private) java.lang.String |
getLowerBound(java.lang.Integer group)
Calculates the lower bound of names in a group |
java.lang.Boolean |
getRestricted()
Returns a flag that indicates whether an iterator will be restricted to a particular group of names. |
(package private) java.lang.String |
getUpperBound(java.lang.Integer group)
Calculates the uppder bound of names in a group |
void |
setComparator(com.clra.util.ISerializableComparator comparator)
Stubbed method that does nothing |
void |
setGroup(java.lang.Integer group)
Sets the month used by restricted iterations |
void |
setRestricted(java.lang.Boolean restricted)
Sets whether an iterator will be restricted to names within a within a group. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
base
private static final java.lang.String base
theLog
private static final org.apache.log4j.Category theLog
DEFAULT_GROUP_INDEX
private static final java.lang.Integer DEFAULT_GROUP_INDEX
restricted
private java.lang.Boolean restricted
- Holds the restriction flag
group
private java.lang.Integer group
- Holds the group index that specifies which names should be displayed.
By default, this group is ABC (index 2).
| Constructor Detail |
MemberSet
public MemberSet()
throws WebException
- Prepares a restricted iterator for the current group and year
MemberSet
public MemberSet(java.lang.Integer group) throws WebException
- Prepares a restricted iterator for the specified group of the
current year
| Method Detail |
getRestricted
public java.lang.Boolean getRestricted()
- Returns a flag that indicates whether an iterator will be restricted
to a particular group of names.
- Specified by:
getRestrictedin interfaceINameList
setRestricted
public void setRestricted(java.lang.Boolean restricted)
- Sets whether an iterator will be restricted to names within a
within a group. A null values does not change the current restriction.
- Specified by:
setRestrictedin interfaceINameList
getGroup
public java.lang.Integer getGroup()
setGroup
public void setGroup(java.lang.Integer group)
getComparator
public com.clra.util.ISerializableComparator getComparator()
- Stubbed method that returns null
- Specified by:
getComparatorin interfaceINameList
setComparator
public void setComparator(com.clra.util.ISerializableComparator comparator)
- Stubbed method that does nothing
- Specified by:
setComparatorin interfaceINameList
getIterator
public java.util.Iterator getIterator() throws WebException
- Returns an iterator constructed to the current setting
- Specified by:
getIteratorin interfaceINameList
findMemberSnapshots
java.util.Collection findMemberSnapshots(java.lang.Integer group) throws com.clra.member.MemberException
- Returns a collection of member snapshots based on the current group.
getLowerBound
java.lang.String getLowerBound(java.lang.Integer group)
- Calculates the lower bound of names in a group
getUpperBound
java.lang.String getUpperBound(java.lang.Integer group)
- Calculates the uppder bound of names in a group
getAllActiveMembers
public java.util.Iterator getAllActiveMembers() throws com.clra.member.MemberException
- Deprecated.
- Finds all active members of the CLRA. Members are sorted by lastname-firstname (the natural comparator for members).
- Finds all active members of the CLRA. Members are sorted by lastname-firstname (the natural comparator for members).
|
|||||||||
| Home >> All >> com >> clra >> [ web overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
com.clra.web.MemberSet