Source code: com/clra/web/Participant2View.java
1 /*
2 * Copyright (c) Carnegie Lake Rowing Association 2002. All rights reserved.
3 * Distributed under the GPL license. See doc/COPYING.
4 * $RCSfile: Participant2View.java,v $
5 * $Date: 2003/02/26 03:38:46 $
6 * $Revision: 1.3 $
7 */
8
9 package com.clra.web;
10
11 import com.clra.member.MemberName;
12 import com.clra.rowing.ParticipantSnapshot;
13 import com.clra.rowing.Participant2Snapshot;
14
15 /**
16 * Read-only information about a member's participation in rowing session.
17 * Extends ParticipantView by caching the name of a participant.
18 *
19 * @version $Revision: 1.3 $ $Date: 2003/02/26 03:38:46 $
20 * @author <a href="mailto:rphall@pluto.njcc.com">Rick Hall</a>
21 */
22 public class Participant2View extends ParticipantView {
23
24 private MemberName memberName;
25
26 /**
27 * Constructs an invalid instance. Use this constructor only for JSP beans
28 * and immediately set valid values via setXxx(..).
29 */
30 public Participant2View() {
31 this.memberName = null;
32 }
33
34 public Participant2View( ParticipantSnapshot data, MemberName memberName ) {
35 super( data );
36 setMemberName( memberName );
37 }
38
39 public Participant2View( Participant2Snapshot ps2 ) {
40 super( ps2.getData() );
41 setMemberName( ps2.getMemberName() );
42 }
43
44 public void setMemberName( MemberName memberName ) {
45 if ( memberName == null ) {
46 throw new IllegalArgumentException( "null member name" );
47 }
48 this.memberName = memberName;
49 }
50
51 public MemberName getMemberName() {
52 if ( memberName == null ) {
53 throw new IllegalStateException( "null member name" );
54 }
55 return this.memberName;
56 }
57
58 } // ParticipantView
59
60 /*
61 * $Log: Participant2View.java,v $
62 * Revision 1.3 2003/02/26 03:38:46 rphall
63 * Added copyright and GPL license
64 *
65 * Revision 1.2 2002/02/18 18:06:47 rphall
66 * Ran dos2unix to remove ^M (carriage return) from end of lines
67 *
68 * Revision 1.1.1.1 2002/01/03 21:57:28 rphall
69 * Initial load, 5th try, Jan-03-2002 4:57 PM
70 *
71 * Revision 1.2 2001/12/31 14:32:58 rphall
72 * Renamed 'member.Name' to 'member.MemberName'
73 *
74 * Revision 1.1 2001/12/15 02:21:49 rphall
75 * Participant data plus member name
76 *
77 */
78