CLRA 0.1.2

com.clra.rowing
Interface IParticipant

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

public interface IParticipant
extends javax.ejb.EJBObject

Defines operations that modify a member's participation in rowing session.

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

Method Summary
 Attendance getAttendance()
          Returns the attendance of a participant at a rowing session, or null if attendance has not been marked.
 ParticipantSnapshot getData()
          Returns a snapshot of a participant
 SeatSnapshot getFinalSeat()
          Returns the final seat assignment of this participant, or null if a final seating was not made.
 SeatSnapshot getInitialSeat()
          Returns the initial seat assignment of this participant, or null if an initial seating was not made.
 Integer getMemberId()
          Returns the primary key of the member that the participant represents
 Integer getParticipantId()
          Returns the primary key of a participant
 Integer getRowingId()
          Returns the primary key of the rowing session to which the participant belongs.
 SeatPreference getSeatPreference()
          Returns the seat preference of a participant.
 IParticipant getSubstitutedParticipant()
          Returns the participant for whom this participant is substituting.
 void setAttendance(Attendance attendance, IRowingSession session)
          Marks the attendance of a participant at a rowing session.
 void setFinalSeat(SeatSnapshot seat, IBoating boating)
          Assigns a final seating to a participant at the start of a rowing session, after attendance has been taken.
 void setInitialSeat(SeatSnapshot seat, IBoating boating)
          Assigns a preliminary seating to a participant before a rowing session starts.
 void setSeatPreference(SeatPreference seatPreference)
          Sets the seat preference of a participant.
 
Methods inherited from interface javax.ejb.EJBObject
getEJBHome, getHandle, getPrimaryKey, isIdentical, remove
 

Method Detail

getData

public ParticipantSnapshot getData()
                            throws java.rmi.RemoteException
Returns a snapshot of a participant

getParticipantId

public Integer getParticipantId()
                         throws java.rmi.RemoteException
Returns the primary key of a participant

getRowingId

public Integer getRowingId()
                    throws java.rmi.RemoteException
Returns the primary key of the rowing session to which the participant belongs.

getMemberId

public Integer getMemberId()
                    throws java.rmi.RemoteException
Returns the primary key of the member that the participant represents

getSeatPreference

public SeatPreference getSeatPreference()
                                 throws java.rmi.RemoteException
Returns the seat preference of a participant.
Returns:
a non-null SeatPreference if the participant signed up in advance for the rowing session, or null if the participant joined the rowing session as an 'Extra' or as a substitute for another, signed-up participant.

setSeatPreference

public void setSeatPreference(SeatPreference seatPreference)
                       throws java.rmi.RemoteException,
                              ParticipantStateException,
                              RowingException
Sets the seat preference of a participant.
Parameters:
a - non-null seat preference
Throws:
ParticipantStateException - if a participant has already been assigned an initial or final seating for a rowing session, or if attendance has already been marked for the participant.
RowingException - if a participant is not a signed-up participant. (An 'extra' or a 'substitute' participant can not be converted into a signed-up participant by setting a seat preference.)

getSubstitutedParticipant

public IParticipant getSubstitutedParticipant()
                                       throws java.rmi.RemoteException
Returns the participant for whom this participant is substituting.
Returns:
a non-null IParticipant if this participant is a substitute, or null if this participant signed up or joined as an 'Extra'.

setInitialSeat

public void setInitialSeat(SeatSnapshot seat,
                           IBoating boating)
                    throws java.rmi.RemoteException,
                           ParticipantStateException,
                           RowingException
Assigns a preliminary seating to a participant before a rowing session starts.
Throws:
ParticipantStateException - if the participant has not signed up for the rowing session.
RowingException - if the assignment conflicts with the business rules for updating a boating; for example, if the rowing session to which the boating belongs is not locked.

getInitialSeat

public SeatSnapshot getInitialSeat()
                            throws java.rmi.RemoteException
Returns the initial seat assignment of this participant, or null if an initial seating was not made.

setFinalSeat

public void setFinalSeat(SeatSnapshot seat,
                         IBoating boating)
                  throws java.rmi.RemoteException,
                         ParticipantStateException,
                         RowingException
Assigns a final seating to a participant at the start of a rowing session, after attendance has been taken.
Parameters:
seat - the final seating of a participant, or null if a participant is not boated for the session.
Throws:
ParticipantStateException - if the state of the participant conflicts with the seating assignment; for example, the participant is not present for the rowing session.
RowingException - if the assignment conflicts with the business rules for updating a boating; for example, if the rowing session to which the boating belongs is not in the BOATING2 state.

getFinalSeat

public SeatSnapshot getFinalSeat()
                          throws java.rmi.RemoteException
Returns the final seat assignment of this participant, or null if a final seating was not made.

setAttendance

public void setAttendance(Attendance attendance,
                          IRowingSession session)
                   throws java.rmi.RemoteException,
                          ParticipantStateException,
                          RowingException
Marks the attendance of a participant at a rowing session.
Throws:
ParticipantStateException - if the instance data of the participant conflicts with marking attendance; for example, if the participant has already been assigned a final seating assignment, or if an "extra" participant is marked absent.
RowingException - if marking attendance conflicts with the business rules for updating a rowing session; for example, if the rowing session is not in the BOATING1 state.

getAttendance

public Attendance getAttendance()
                         throws java.rmi.RemoteException
Returns the attendance of a participant at a rowing session, or null if attendance has not been marked.

CLRA 0.1.2