001/*
002 * Copyright 2006-2007 the original author or authors.
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 *      https://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016
017package org.springframework.batch.core.test.football;
018
019import java.io.Serializable;
020
021@SuppressWarnings("serial")
022public class Game implements Serializable {
023
024        private String id;
025
026        private int year;
027
028        private String team;
029
030        private int week;
031
032        private String opponent;
033
034        private int completes;
035
036        private int attempts;
037
038        private int passingYards;
039
040        private int passingTd;
041
042        private int interceptions;
043
044        private int rushes;
045
046        private int rushYards;
047
048        private int receptions;
049
050        private int receptionYards;
051
052        private int totalTd;
053
054        /**
055         * @return the id
056         */
057        public String getId() {
058                return id;
059        }
060
061        /**
062         * @return the year
063         */
064        public int getYear() {
065                return year;
066        }
067
068        /**
069         * @return the team
070         */
071        public String getTeam() {
072                return team;
073        }
074
075        /**
076         * @return the week
077         */
078        public int getWeek() {
079                return week;
080        }
081
082        /**
083         * @return the opponent
084         */
085        public String getOpponent() {
086                return opponent;
087        }
088
089        /**
090         * @return the completes
091         */
092        public int getCompletes() {
093                return completes;
094        }
095
096        /**
097         * @return the attempts
098         */
099        public int getAttempts() {
100                return attempts;
101        }
102
103        /**
104         * @return the passingYards
105         */
106        public int getPassingYards() {
107                return passingYards;
108        }
109
110        /**
111         * @return the passingTd
112         */
113        public int getPassingTd() {
114                return passingTd;
115        }
116
117        /**
118         * @return the interceptions
119         */
120        public int getInterceptions() {
121                return interceptions;
122        }
123
124        /**
125         * @return the rushes
126         */
127        public int getRushes() {
128                return rushes;
129        }
130
131        /**
132         * @return the rushYards
133         */
134        public int getRushYards() {
135                return rushYards;
136        }
137
138        /**
139         * @return the receptions
140         */
141        public int getReceptions() {
142                return receptions;
143        }
144
145        /**
146         * @return the receptionYards
147         */
148        public int getReceptionYards() {
149                return receptionYards;
150        }
151
152        /**
153         * @return the totalTd
154         */
155        public int getTotalTd() {
156                return totalTd;
157        }
158
159        /**
160         * @param id the id to set
161         */
162        public void setId(String id) {
163                this.id = id;
164        }
165
166        /**
167         * @param year the year to set
168         */
169        public void setYear(int year) {
170                this.year = year;
171        }
172
173        /**
174         * @param team the team to set
175         */
176        public void setTeam(String team) {
177                this.team = team;
178        }
179
180        /**
181         * @param week the week to set
182         */
183        public void setWeek(int week) {
184                this.week = week;
185        }
186
187        /**
188         * @param opponent the opponent to set
189         */
190        public void setOpponent(String opponent) {
191                this.opponent = opponent;
192        }
193
194        /**
195         * @param completes the completes to set
196         */
197        public void setCompletes(int completes) {
198                this.completes = completes;
199        }
200
201        /**
202         * @param attempts the attempts to set
203         */
204        public void setAttempts(int attempts) {
205                this.attempts = attempts;
206        }
207
208        /**
209         * @param passingYards the passingYards to set
210         */
211        public void setPassingYards(int passingYards) {
212                this.passingYards = passingYards;
213        }
214
215        /**
216         * @param passingTd the passingTd to set
217         */
218        public void setPassingTd(int passingTd) {
219                this.passingTd = passingTd;
220        }
221
222        /**
223         * @param interceptions the interceptions to set
224         */
225        public void setInterceptions(int interceptions) {
226                this.interceptions = interceptions;
227        }
228
229        /**
230         * @param rushes the rushes to set
231         */
232        public void setRushes(int rushes) {
233                this.rushes = rushes;
234        }
235
236        /**
237         * @param rushYards the rushYards to set
238         */
239        public void setRushYards(int rushYards) {
240                this.rushYards = rushYards;
241        }
242
243        /**
244         * @param receptions the receptions to set
245         */
246        public void setReceptions(int receptions) {
247                this.receptions = receptions;
248        }
249
250        /**
251         * @param receptionYards the receptionYards to set
252         */
253        public void setReceptionYards(int receptionYards) {
254                this.receptionYards = receptionYards;
255        }
256
257        /**
258         * @param totalTd the totalTd to set
259         */
260        public void setTotalTd(int totalTd) {
261                this.totalTd = totalTd;
262        }
263
264        @Override
265        public String toString() {
266
267                return "Game: ID=" + id + " " + team + " vs. " + opponent + " - " + year;
268        }
269
270        @Override
271        public int hashCode() {
272                final int prime = 31;
273                int result = 1;
274                result = prime * result + ((id == null) ? 0 : id.hashCode());
275                return result;
276        }
277
278        @Override
279        public boolean equals(Object obj) {
280                if (this == obj)
281                        return true;
282                if (obj == null)
283                        return false;
284                if (getClass() != obj.getClass())
285                        return false;
286                Game other = (Game) obj;
287                if (id == null) {
288                        if (other.id != null)
289                                return false;
290                }
291                else if (!id.equals(other.id))
292                        return false;
293                return true;
294        }
295
296}