CLRA 0.1.2

com.clra.rowing
Interface IParticipantHome

All Superinterfaces:
javax.ejb.EJBHome, java.rmi.Remote

public interface IParticipantHome
extends javax.ejb.EJBHome

Factory class for IParticipant instances.

Version:
$Id: IParticipantHome.java,v 1.2 2002/02/18 18:04:29 rphall Exp $
Author:
Rick Hall

Method Summary
 IParticipant create(Integer memberId, Integer rowingId, SeatPreference preferred)
           
 IParticipant create(MemberSnapshot member, ParticipantSnapshot replaces)
          Creates a "substitute" participant; that is, a participant who is present at a rowing session as a substitute for another, signed-up participant.
 IParticipant create(MemberSnapshot member, RowingSessionSnapshot rowing)
          Creates an "extra" participant; that is, a participant who is present at a rowing session without signing up and who isn't substituting for another member.
 Collection findAll()
           
 Collection findByMemberIdRowingId(Integer memberId, Integer rowingId)
          The memberId and rowingId of a participant form an alternate key to the Participant table, so the collection that is returned has at most one IParticipant element.
 IParticipant findByPrimaryKey(Integer participantId)
           
 Collection findByRowingId(Integer rowingId)
           
 
Methods inherited from interface javax.ejb.EJBHome
getEJBMetaData, getHomeHandle, remove, remove
 

Method Detail

create

public IParticipant create(Integer memberId,
                           Integer rowingId,
                           SeatPreference preferred)
                    throws javax.ejb.CreateException,
                           java.rmi.RemoteException
Parameters:
memberId - the primary key of the member who is signing up.
rowingId - the primary key of the session for which the member is signing up.
preferred - the seating requested by the member for the rowing session.
Throws:
javax.ejb.CreateException - if the rowing session is not OPEN.

create

public IParticipant create(MemberSnapshot member,
                           RowingSessionSnapshot rowing)
                    throws javax.ejb.CreateException,
                           java.rmi.RemoteException
Creates an "extra" participant; that is, a participant who is present at a rowing session without signing up and who isn't substituting for another member. The participant is constructed in the PRESENT state.
Parameters:
member - the member who is signing up.
rowing - the session for which the member is signing up.
Throws:
javax.ejb.CreateException - if the rowing session is not in the BOATING1 state (during which attendance if marked).

create

public IParticipant create(MemberSnapshot member,
                           ParticipantSnapshot replaces)
                    throws javax.ejb.CreateException,
                           java.rmi.RemoteException
Creates a "substitute" participant; that is, a participant who is present at a rowing session as a substitute for another, signed-up participant. The substitute is constructed in the PRESENT state, and the signed-up participant transitions to the ABSENT state.
Parameters:
member - the member who is signing up.
replaces - the participant who is being replaced.
Throws:
javax.ejb.CreateException - if the rowing session is not in the BOATING1 state (during which attendance if marked).

findByPrimaryKey

public IParticipant findByPrimaryKey(Integer participantId)
                              throws javax.ejb.FinderException,
                                     java.rmi.RemoteException

findByMemberIdRowingId

public Collection findByMemberIdRowingId(Integer memberId,
                                         Integer rowingId)
                                  throws javax.ejb.FinderException,
                                         java.rmi.RemoteException
The memberId and rowingId of a participant form an alternate key to the Participant table, so the collection that is returned has at most one IParticipant element.

findByRowingId

public Collection findByRowingId(Integer rowingId)
                          throws javax.ejb.FinderException,
                                 java.rmi.RemoteException

findAll

public Collection findAll()
                   throws javax.ejb.FinderException,
                          java.rmi.RemoteException

CLRA 0.1.2