Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: com/clra/rowing/IParticipantHome.java


1   /*
2    * Copyright (c) Carnegie Lake Rowing Association 2002. All rights reserved.
3    * Distributed under the GPL license. See doc/COPYING.
4    * $RCSfile: IParticipantHome.java,v $
5    * $Date: 2003/02/26 03:38:45 $
6    * $Revision: 1.4 $
7    */
8   
9   package com.clra.rowing;
10  
11  import com.clra.member.MemberSnapshot;
12  import java.util.Collection;
13  import java.rmi.RemoteException;
14  import javax.ejb.EJBHome;
15  import javax.ejb.CreateException;
16  import javax.ejb.FinderException;
17  
18  /**
19   * Factory class for IParticipant instances.
20   *
21   * @version $Id: IParticipantHome.java,v 1.4 2003/02/26 03:38:45 rphall Exp $
22   * @author <a href="mailto:rphall@pluto.njcc.com">Rick Hall</a>
23   */
24  public interface IParticipantHome extends EJBHome {
25  
26    /**
27     * @param memberId the primary key of the member who is signing up.
28     * @param rowingId the primary key of the session for which the member
29     * is signing up.
30     * @param preferred the seating requested by the member for the
31     * rowing session.
32     * @exception CreateException if the rowing session is not OPEN.
33     */
34    IParticipant create( Integer memberId, Integer rowingId,
35      SeatPreference preferred ) throws CreateException, RemoteException;
36  
37    /**
38     * Creates an "extra" participant; that is, a participant who is
39     * present at a rowing session without signing up and who isn't
40     * substituting for another member. The participant is constructed in
41     * the PRESENT state.
42     * @param member the member who is signing up.
43     * @param rowing the session for which the member is signing up.
44     * @exception CreateException if the rowing session is not in the
45     * BOATING1 state (during which attendance if marked).
46     */
47    IParticipant create( MemberSnapshot member, RowingSessionSnapshot rowing )
48        throws CreateException, RemoteException;
49  
50    /**
51     * Creates a "substitute" participant; that is, a participant who is
52     * present at a rowing session as a substitute for another, signed-up
53     * participant. The substitute is constructed in the PRESENT state,
54     * and the signed-up participant transitions to the ABSENT state.
55     * @param member the member who is signing up.
56     * @param replaces the participant who is being replaced.
57     * @exception CreateException if the rowing session is not in the
58     * BOATING1 state (during which attendance if marked).
59     */
60    IParticipant create( MemberSnapshot member, ParticipantSnapshot replaces )
61        throws CreateException, RemoteException;
62  
63    IParticipant findByPrimaryKey( Integer participantId )
64        throws FinderException, RemoteException;
65  
66    /**
67     * The memberId and rowingId of a participant form an alternate key
68     * to the Participant table, so the collection that is returned has
69     * at most one IParticipant element.
70     */
71    Collection findByMemberIdRowingId( Integer memberId, Integer rowingId )
72        throws FinderException, RemoteException;
73  
74    Collection findByRowingId( Integer rowingId )
75        throws FinderException, RemoteException;
76  
77    Collection findAll()
78        throws FinderException, RemoteException;
79  
80  } // IParticipantHome
81  
82  /*
83   * $Log: IParticipantHome.java,v $
84   * Revision 1.4  2003/02/26 03:38:45  rphall
85   * Added copyright and GPL license
86   *
87   * Revision 1.3  2003/02/19 22:09:16  rphall
88   * Removed gratuitous use of CLRA acronym
89   *
90   */
91