CLRA 0.1.2

com.clra.rowing
Class EnrollmentSnapshot

java.lang.Object
  |
  +--com.clra.rowing.EnrollmentSnapshot
All Implemented Interfaces:
Serializable

public class EnrollmentSnapshot
extends Object
implements Serializable

Read-only information about enrollment of a member in a rowing session. Unlike a Participant entity, which is non-null only if a member is signed up for a rowing session, an enrollment instance is guaranteed to be non-null regardless of whether a member is signed up in a rowing session. An enrollment instance is a derived view that doesn't correspond to a persistent object in the database.

An enrollment is composed of a member_id, a rowing_id, and a participant_id. The member_id and rowing_id must be non-null. The participant_id is non-null only if the member has signed up for the rowing session. In addition to these primary keys, an enrollment object caches some frequently needed data from the member, rowing session and participant entities.

Version:
$Revision: 1.2 $ $Date: 2002/01/30 14:41:52 $
Author:
Rick Hall
See Also:
Serialized Form

Constructor Summary
EnrollmentSnapshot()
          Produces an invalid EnrollmentSnapshot.
EnrollmentSnapshot(Integer memberId, RowingSessionSnapshot rs, ParticipantSnapshot ps)
           
 
Method Summary
 Integer getMemberId()
          Returns the id of the member associated with this enrollment
 Integer getParticipantId()
          Returns the id of the participant associated with this enrollment.
 ParticipantSnapshot getParticipantSnapshot()
          Returns a snapshot of participant data in a rowing session.
 Integer getRowingId()
          Returns the id of the rowing session associated with this enrollment
 RowingSessionSnapshot getRowingSessionSnapshot()
          Returns a snapshot of data about the rowing session
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnrollmentSnapshot

public EnrollmentSnapshot()
Produces an invalid EnrollmentSnapshot. Used during deserialization

EnrollmentSnapshot

public EnrollmentSnapshot(Integer memberId,
                          RowingSessionSnapshot rs,
                          ParticipantSnapshot ps)
Parameters:
memberId - a non-null primary key for a member
rs - a non-null snapshot of a rowing session
ps - a snapshot of a participant, possibly null. If non-null, then the member and rowing id's associated with the participant must match the id's of the preceding parameters.
Method Detail

getRowingId

public Integer getRowingId()
Returns the id of the rowing session associated with this enrollment

getMemberId

public Integer getMemberId()
Returns the id of the member associated with this enrollment

getParticipantId

public Integer getParticipantId()
Returns the id of the participant associated with this enrollment. May be null.

getRowingSessionSnapshot

public RowingSessionSnapshot getRowingSessionSnapshot()
Returns a snapshot of data about the rowing session

getParticipantSnapshot

public ParticipantSnapshot getParticipantSnapshot()
Returns a snapshot of participant data in a rowing session. May be null.

CLRA 0.1.2