001: /*
002: This file is part of the PolePosition database benchmark
003: http://www.polepos.org
004:
005: This program is free software; you can redistribute it and/or
006: modify it under the terms of the GNU General Public License
007: as published by the Free Software Foundation; either version 2
008: of the License, or (at your option) any later version.
009:
010: This program is distributed in the hope that it will be useful,
011: but WITHOUT ANY WARRANTY; without even the implied warranty of
012: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
013: GNU General Public License for more details.
014:
015: You should have received a copy of the GNU General Public
016: License along with this program; if not, write to the Free
017: Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
018: MA 02111-1307, USA. */
019:
020: package org.polepos.teams.hibernate.data;
021:
022: import org.polepos.framework.*;
023:
024: /**
025: *
026: * @author Herkules
027: */
028: public class HibernatePilot implements CheckSummable {
029: private String mName;
030: private String mFirstName;
031: private int mPoints;
032: private int mLicenseID;
033:
034: /**
035: * Default.
036: */
037: public HibernatePilot() {
038: }
039:
040: /**
041: * Creates a new instance of Pilot.
042: */
043: public HibernatePilot(String name, int points) {
044: this .mName = name;
045: this .mPoints = points;
046: }
047:
048: /**
049: * Full ctor.
050: */
051: public HibernatePilot(String name, String firstname, int points,
052: int licenseID) {
053: mName = name;
054: mFirstName = firstname;
055: mPoints = points;
056: mLicenseID = licenseID;
057: }
058:
059: public int getPoints() {
060: return mPoints;
061: }
062:
063: public void setPoints(int points) {
064: mPoints = points;
065: }
066:
067: public void addPoints(int points) {
068: this .mPoints += points;
069: }
070:
071: public String getName() {
072: return mName;
073: }
074:
075: public void setName(String name) {
076: mName = name;
077: }
078:
079: public String getFirstName() {
080: return mFirstName;
081: }
082:
083: public void setFirstName(String firstname) {
084: mFirstName = firstname;
085: }
086:
087: public int getLicenseID() {
088: return mLicenseID;
089: }
090:
091: public void setLicenseID(int id) {
092: mLicenseID = id;
093: }
094:
095: public String toString() {
096: return mName + "/" + mPoints;
097: }
098:
099: public long checkSum() {
100: return getPoints();
101: }
102:
103: }
|