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.jdo.data;
021:
022: import org.polepos.framework.*;
023:
024: /**
025: * @author Herkules
026: */
027: public class JdoPilot implements CheckSummable {
028: private String mName;
029: private String mFirstName;
030: private int mPoints;
031: private int mLicenseID;
032:
033: /**
034: * Default.
035: */
036: public JdoPilot() {
037: }
038:
039: /**
040: * Creates a new instance of Pilot.
041: */
042: public JdoPilot(String name, int points) {
043: this .mName = name;
044: this .mPoints = points;
045: }
046:
047: /**
048: * Full ctor.
049: */
050: public JdoPilot(String name, String frontname, int points,
051: int licenseID) {
052: mName = name;
053: mFirstName = frontname;
054: mPoints = points;
055: mLicenseID = licenseID;
056: }
057:
058: public int getPoints() {
059: return mPoints;
060: }
061:
062: public void setPoints(int points) {
063: mPoints = points;
064: }
065:
066: public void addPoints(int points) {
067: this .mPoints += points;
068: }
069:
070: public String getName() {
071: return mName;
072: }
073:
074: public void setName(String name) {
075: mName = name;
076: }
077:
078: public String getFrontName() {
079: return mFirstName;
080: }
081:
082: public void setFrontName(String firstname) {
083: mFirstName = firstname;
084: }
085:
086: public int getLicenseID() {
087: return mLicenseID;
088: }
089:
090: public void setLicenseID(int id) {
091: mLicenseID = id;
092: }
093:
094: public String toString() {
095: return mName + "/" + mPoints;
096: }
097:
098: public long checkSum() {
099: return getPoints();
100: }
101:
102: }
|