KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > polepos > teams > hibernate > data > HibernateIndexedPilot


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.hibernate.data;
21
22 import org.polepos.framework.*;
23
24 /**
25  * @author Herkules
26  */

27 public class HibernateIndexedPilot 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 HibernateIndexedPilot()
39     {
40     }
41     
42     
43     /**
44      * Creates a new instance of Pilot.
45      */

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

55     public HibernateIndexedPilot( String JavaDoc name, String JavaDoc firstname, int points, int licenseID )
56     {
57         mName = name;
58         mFirstName = firstname;
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 getFirstName()
90     {
91         return mFirstName;
92     }
93     
94     public void setFirstName( 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         mLicenseID = id;
106     }
107
108     public String JavaDoc toString(){
109         return mName+"/"+mPoints;
110     }
111     
112     public long checkSum() {
113         return getPoints();
114     }
115
116 }
117
Popular Tags