CLRA 0.1.2

com.clra.member
Class MemberDBRead

java.lang.Object
  |
  +--com.clra.member.MemberDBRead

public final class MemberDBRead
extends Object

This utility class defines common routines for reading snapshots from the database. In cases where read-only lists are presented to a user, these routines are faster than their ejbFind counterparts. However, data should never be written directly back to the database, otherwise in-memory caches maintained by EJB's will be out of synch and data will be corrupted.

Version:
$Revision: 1.2 $ $Date: 2002/01/30 14:31:41 $
Author:
Rick Hall

Method Summary
static Collection findAllMembersByLastName()
          Finds all active members of the CLRA.
static MemberSnapshot findMemberByAccountName(String accountName)
          Finds the member that has the given CLRA account name.
static Collection findMembersWithLastNamesGTE(String lower)
          Finds all active members of the CLRA with last names greater than or equal to the specified String.
static Collection findMembersWithLastNamesInRange(String lower, String upper)
          Finds all active members of the CLRA with last names greater than or equal to the specified lower bound, and less than the specified upper bound.
static Collection findMembersWithLastNamesLT(String upper)
          Finds all active members of the CLRA with last names less than the specified String.
static Collection loadMemberCollection(java.sql.PreparedStatement stmt)
           
static MemberSnapshot mapResultSetToMemberSnapshot(java.sql.ResultSet rs)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

findAllMembersByLastName

public static Collection findAllMembersByLastName()
                                           throws MemberException
Finds all active members of the CLRA. Members are sorted by lastname-firstname.

findMembersWithLastNamesGTE

public static Collection findMembersWithLastNamesGTE(String lower)
                                              throws MemberException
Finds all active members of the CLRA with last names greater than or equal to the specified String. Selection is case-insensitive. Members are sorted by lastname-firstname.

findMembersWithLastNamesLT

public static Collection findMembersWithLastNamesLT(String upper)
                                             throws MemberException
Finds all active members of the CLRA with last names less than the specified String. Selection is case-insensitive. Members are sorted by lastname-firstname.

findMembersWithLastNamesInRange

public static Collection findMembersWithLastNamesInRange(String lower,
                                                         String upper)
                                                  throws MemberException
Finds all active members of the CLRA with last names greater than or equal to the specified lower bound, and less than the specified upper bound. Selection is case-insensitive. Members are sorted by lastname-firstname.

findMemberByAccountName

public static MemberSnapshot findMemberByAccountName(String accountName)
                                              throws MemberException,
                                                     javax.ejb.NoSuchEntityException
Finds the member that has the given CLRA account name. Account names are unique, so this "finder" returns at most one member.

loadMemberCollection

public static Collection loadMemberCollection(java.sql.PreparedStatement stmt)
                                       throws java.sql.SQLException,
                                              MemberException,
                                              javax.ejb.NoSuchEntityException,
                                              javax.ejb.EJBException

mapResultSetToMemberSnapshot

public static MemberSnapshot mapResultSetToMemberSnapshot(java.sql.ResultSet rs)
                                                   throws java.sql.SQLException,
                                                          MemberException

CLRA 0.1.2