Coverage Report - com.buckosoft.fibs.domain.FinishedMatch
 
Classes in this File Line Coverage Branch Coverage Complexity
FinishedMatch
100%
36/36
N/A
1
 
 1  
 /******************************************************************************
 2  
  * FinishedMatch.java - Describe one match that you've played
 3  
  * $Id$
 4  
  * 
 5  
  * BuckoFIBS - Backgammon by BuckoSoft
 6  
  * Copyright© 2009,2010 - Dick Balaska - BuckoSoft, Corp.
 7  
  * 
 8  
  * $Log$
 9  
  * Revision 1.5  2011/05/07 05:42:48  dick
 10  
  * Default values for attributes.
 11  
  *
 12  
  * Revision 1.4  2011/01/01 06:10:12  dick
 13  
  * Javadoc.
 14  
  *
 15  
  * Revision 1.3  2010/03/03 13:12:21  inim
 16  
  * Replaced (c) sign in comment mangled by CVS default encoding back to UTF-8
 17  
  *
 18  
  * Revision 1.2  2010/03/03 12:19:48  inim
 19  
  * Moved source to UTF8 encoding from CP1252 encoding. To this end all source files' (c) message was updated to "Copyright© 2009,2010 - Dick Balaska - BuckoSoft, Corp.". This replaces the (c) sign to UTF8, and adds the new year 2010.
 20  
  *
 21  
  * Revision 1.1  2010/02/04 05:57:53  inim
 22  
  * Mavenized project folder layout
 23  
  *
 24  
  * Revision 1.2  2009/02/25 07:49:23  dick
 25  
  * Store the duration of the match.
 26  
  *
 27  
  * Revision 1.1  2009/02/20 10:25:58  dick
 28  
  * Describe one match that you've played.
 29  
  *
 30  
  */
 31  
 
 32  
 /* 
 33  
  * This program is free software: you can redistribute it and/or modify
 34  
  * it under the terms of the GNU General Public License as published by
 35  
  * the Free Software Foundation, either version 3 of the License, or
 36  
  * (at your option) any later version.
 37  
  *
 38  
  * This program is distributed in the hope that it will be useful,
 39  
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
 40  
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 41  
  * GNU General Public License for more details.
 42  
  *
 43  
  * You should have received a copy of the GNU General Public License
 44  
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 45  
  *
 46  
  * The Original Code is BuckoFIBS, <http://www.buckosoft.com/BuckoFIBS/>.
 47  
  * The Initial Developer of the Original Code is Dick Balaska and BuckoSoft, Corp.
 48  
  * 
 49  
  */
 50  
 package com.buckosoft.fibs.domain;
 51  
 
 52  
 import java.util.Date;
 53  
 
 54  
 /** Describe one match that you've played.
 55  
  * @author Dick Balaska
 56  
  * @since 2009/02/19
 57  
  * @version $Revision$ <br> $Date$
 58  
  * @see <a href="http://cvs.buckosoft.com/Projects/BuckoFIBS/BuckoFIBS/src/com/buckosoft/fibs/domain/FinishedMatch.java">cvs FinishedMatch.java</a>
 59  
  */
 60  34
 public class FinishedMatch {
 61  34
         private        int                matchId = 0;
 62  34
         private        int                profileId = 0;
 63  34
         private int                opponentId = 0;
 64  34
         private        int                matchPoints = 0;
 65  34
         private        int                yourScore = 0;
 66  34
         private        int                opponentScore = 0;
 67  34
         private        double        ratingAfterMatch = 0.0;
 68  34
         private        int                duration = 0;
 69  
         private        Date        date;
 70  
 
 71  
         /**
 72  
          * @return the id
 73  
          */
 74  
         public int getMatchId() {
 75  20
                 return matchId;
 76  
         }
 77  
         /** Set the database unique Id for this record.
 78  
          * @param matchId the matchIid to set
 79  
          */
 80  
         public void setMatchId(int matchId) {
 81  16
                 this.matchId = matchId;
 82  16
         }
 83  
 
 84  
         /** Get the user profile used for this match
 85  
          * @return the profileId
 86  
          */
 87  
         public int getProfileId() {
 88  19
                 return profileId;
 89  
         }
 90  
         /** Get the user profile used for this match
 91  
          * @param profileId the profileId to set
 92  
          */
 93  
         public void setProfileId(int profileId) {
 94  14
                 this.profileId = profileId;
 95  14
         }
 96  
         /**
 97  
          * @return the opponentId
 98  
          */
 99  
         public int getOpponentId() {
 100  29
                 return opponentId;
 101  
         }
 102  
         /**
 103  
          * @param opponentId the opponentId to set
 104  
          */
 105  
         public void setOpponentId(int opponentId) {
 106  16
                 this.opponentId = opponentId;
 107  16
         }
 108  
         /**
 109  
          * @return the matchPoints
 110  
          */
 111  
         public int getMatchPoints() {
 112  21
                 return matchPoints;
 113  
         }
 114  
         /**
 115  
          * @param matchPoints the matchPoints to set
 116  
          */
 117  
         public void setMatchPoints(int matchPoints) {
 118  16
                 this.matchPoints = matchPoints;
 119  16
         }
 120  
         /**
 121  
          * @return the yourScore
 122  
          */
 123  
         public int getYourScore() {
 124  25
                 return yourScore;
 125  
         }
 126  
         /**
 127  
          * @param yourScore the yourScore to set
 128  
          */
 129  
         public void setYourScore(int yourScore) {
 130  16
                 this.yourScore = yourScore;
 131  16
         }
 132  
         /**
 133  
          * @return the opponentScore
 134  
          */
 135  
         public int getOpponentScore() {
 136  25
                 return opponentScore;
 137  
         }
 138  
         /**
 139  
          * @param opponentScore the opponentScore to set
 140  
          */
 141  
         public void setOpponentScore(int opponentScore) {
 142  16
                 this.opponentScore = opponentScore;
 143  16
         }
 144  
         /**
 145  
          * @return the ratingAfterMatch
 146  
          */
 147  
         public double getRatingAfterMatch() {
 148  24
                 return ratingAfterMatch;
 149  
         }
 150  
         /**
 151  
          * @param ratingAfterMatch the ratingAfterMatch to set
 152  
          */
 153  
         public void setRatingAfterMatch(double ratingAfterMatch) {
 154  16
                 this.ratingAfterMatch = ratingAfterMatch;
 155  16
         }
 156  
         /** Get the number of seconds it took you to play this match
 157  
          * @return the duration
 158  
          */
 159  
         public int getDuration() {
 160  21
                 return duration;
 161  
         }
 162  
         /**
 163  
          * @param duration the duration to set
 164  
          */
 165  
         public void setDuration(int duration) {
 166  16
                 this.duration = duration;
 167  16
         }
 168  
 
 169  
         /** Fetch the timestamp that you finished the match
 170  
          * @return the date
 171  
          */
 172  
         public Date getDate() {
 173  20
                 return date;
 174  
         }
 175  
         /** Set the timestamp of when you finished this match
 176  
          * @param date the date to set
 177  
          */
 178  
         public void setDate(Date date) {
 179  16
                 this.date = date;
 180  16
         }
 181  
 
 182  
 }