CLRA 0.1.2

com.clra.rowing
Class RowingUtils

java.lang.Object
  |
  +--com.clra.rowing.RowingUtils

public final class RowingUtils
extends Object

Utilities for finding and creating "base" entities: Member, RowingSession, Boat, and Oarset. Other entities are created by operations on these base entities.

These utilities are implemented by calls to EJB's. They are appropriate where entities should be cached in memory, perhaps because the entities will be modified shortly.

The class RowingDBRead defines utilities with similar signatures that are implemented by directly reading from the database. These operations are faster if objects are not already in memory, and if the objects are not anticipated to require modification.

Version:
$Revision: 1.2 $ $Date: 2002/02/18 18:05:07 $
Author:
Rick Hall

Constructor Summary
RowingUtils()
           
 
Method Summary
static IParticipant createParticipant(Integer memberId, Integer rowingId, SeatPreference seatPreference)
          Creates a participant
static IRowingSession createRowingSession(Date date, RowingSessionLevel level, RowingSessionType type)
          Creates a rowing session
static RowingSessionSnapshot createRowingSessionDefaults()
          Returns a "fake" rowing session, one which is neither persistent nor managed by the EJB container.
static IParticipant findParticipant(Integer participantId)
          Returns the participant specified by the participant id
static IRowingSession findRowingSession(Integer rowingId)
          Returns the rowing session specified by the rowing id
static IParticipantHome getParticipantHome()
          Returns the factory for Participant instances.
static IRowingSessionHome getRowingSessionHome()
          Returns the factory for RowingSession instances.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RowingUtils

public RowingUtils()
Method Detail

getRowingSessionHome

public static IRowingSessionHome getRowingSessionHome()
                                               throws javax.naming.NamingException
Returns the factory for RowingSession instances.

Note: this operation should be used only by this class, unit tests, and the implementation class for IRowingSession


getParticipantHome

public static IParticipantHome getParticipantHome()
                                           throws javax.naming.NamingException
Returns the factory for Participant instances.

Note: this operation should be used only by this class, unit tests, and the implementation class for IParticipant


findRowingSession

public static IRowingSession findRowingSession(Integer rowingId)
                                        throws java.rmi.RemoteException,
                                               javax.ejb.FinderException,
                                               javax.naming.NamingException
Returns the rowing session specified by the rowing id

createRowingSession

public static IRowingSession createRowingSession(Date date,
                                                 RowingSessionLevel level,
                                                 RowingSessionType type)
                                          throws java.rmi.RemoteException,
                                                 javax.ejb.CreateException,
                                                 javax.naming.NamingException
Creates a rowing session

findParticipant

public static IParticipant findParticipant(Integer participantId)
                                    throws java.rmi.RemoteException,
                                           javax.ejb.FinderException,
                                           javax.naming.NamingException
Returns the participant specified by the participant id

createParticipant

public static IParticipant createParticipant(Integer memberId,
                                             Integer rowingId,
                                             SeatPreference seatPreference)
                                      throws java.rmi.RemoteException,
                                             javax.ejb.CreateException,
                                             javax.naming.NamingException
Creates a participant

createRowingSessionDefaults

public static RowingSessionSnapshot createRowingSessionDefaults()
Returns a "fake" rowing session, one which is neither persistent nor managed by the EJB container. The primary key of the session (the session id) is null. Other session accessors return valid default values.

CLRA 0.1.2