KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > polepos > teams > jdo > data > JdoIndexedPilot


1 /*
2 This file is part of the PolePosition database benchmark
3 http://www.polepos.org
4
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License
7 as published by the Free Software Foundation; either version 2
8 of the License, or (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public
16 License along with this program; if not, write to the Free
17 Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
18 MA 02111-1307, USA. */

19
20 package org.polepos.teams.jdo.data;
21
22 import org.polepos.framework.*;
23
24 /**
25  * @author Herkules
26  */

27 public class JdoIndexedPilot implements CheckSummable
28 {
29     private String JavaDoc mName;
30     private String JavaDoc mFirstName;
31     private int mPoints;
32     private int mLicenseID;
33
34     
35     /**
36      * Default.
37      */

38     public JdoIndexedPilot()
39     {
40     }
41     
42     
43     /**
44      * Creates a new instance of Pilot.
45      */

46     public JdoIndexedPilot(String JavaDoc name, int points)
47     {
48         this.mName=name;
49         this.mPoints=points;
50     }
51     
52     /**
53      * Full ctor.
54      */

55     public JdoIndexedPilot( String JavaDoc name, String JavaDoc frontname, int points, int licenseID )
56     {
57         mName = name;
58         mFirstName = frontname;
59         mPoints = points;
60         mLicenseID = licenseID;
61     }
62     
63     
64     public int getPoints()
65     {
66         return mPoints;
67     }
68     
69     public void setPoints( int points )
70     {
71         mPoints = points;
72     }
73
74     public void addPoints(int points)
75     {
76         this.mPoints+=points;
77     }
78     
79     public String JavaDoc getName()
80     {
81         return mName;
82     }
83
84     public void setName( String JavaDoc name )
85     {
86         mName = name;
87     }
88
89     public String JavaDoc getFrontName()
90     {
91         return mFirstName;
92     }
93     
94     public void setFrontName( String JavaDoc firstname )
95     {
96         mFirstName = firstname;
97     }
98     
99     public int getLicenseID()
100     {
101         return mLicenseID;
102     }
103     
104     public void setLicenseID( int id )
105     {
106         mLicenseID = id;
107     }
108
109     public String JavaDoc toString()
110     {
111         return mName+"/"+mPoints;
112     }
113     
114     public long checkSum() {
115         return getPoints();
116     }
117
118 }
119
Popular Tags