View Javadoc

1   /***
2   Copyright (C) 2005 The Java Community
3   
4   This program is free software; you can redistribute it and/or modify  it under
5   the terms of the GNU General Public License as published by  the Free Software
6   Foundation; either version 2 of the License, or  (at your option) any later
7   version.
8   
9   This program is distributed in the hope that it will be useful,  but WITHOUT
10  ANY WARRANTY; without even the implied warranty of  MERCHANTABILITY or FITNESS
11  FOR A PARTICULAR PURPOSE. See the  GNU General Public License for more details.
12  
13  You should have received a copy of the GNU General Public License  along with
14  this program; if not, write to the Free Software  Foundation, Inc., 59 Temple
15  Place, Suite 330, Boston, MA 02111-1307 USA.
16  
17  */
18  package org.bejug.javacareers.jobs.model;
19  
20  import java.util.List;
21  
22  import org.apache.commons.lang.builder.CompareToBuilder;
23  import org.apache.commons.lang.builder.EqualsBuilder;
24  import org.apache.commons.lang.builder.HashCodeBuilder;
25  import org.apache.commons.lang.builder.ToStringBuilder;
26  
27  /***
28   *
29   * @author Bart Meyers (Last modified by $Author: shally $)
30   * @version $Revision: 1.6 $ - $Date: 2005/12/20 15:36:45 $
31   */
32  public class CommercialEducationOffer extends EducationOffer {
33  
34      /***
35       * numberOfDays
36       */
37      private Integer numberOfDays = null;
38  
39       /***
40       * goals
41       */
42      private String goals ;
43  
44       /***
45       * prerequisite
46       */
47      private String prerequisite;
48  
49      /***
50       * startdates
51       */
52      private List startDates;
53  
54      /***
55       * default constructor
56       */
57      public CommercialEducationOffer() {
58      }
59  
60      /***
61       *
62       * @return number of days Integer
63       */
64      public Integer getNumberOfDays() {
65          return numberOfDays;
66      }
67  
68      /***
69       * 
70       * @param numberOfDays Integer
71       */
72      public void setNumberOfDays(Integer numberOfDays) {
73          this.numberOfDays = numberOfDays;
74      }
75      
76      /***
77       * {@inheritDoc}
78       */
79      public boolean equals(Object o) {
80      	if (!(o instanceof CommercialEducationOffer)) {
81      	     return false;
82      	   }
83      	   if (this == o) {
84      	     return true;
85      	   }
86      	   CommercialEducationOffer ceo = (CommercialEducationOffer) o;
87      	   return new EqualsBuilder()
88      	   		.appendSuper(super.equals(o))
89      	   		.append(this.numberOfDays, ceo.getNumberOfDays())
90      	        .isEquals();
91      }
92  
93      /***
94       * @return goals
95       */
96      public String getGoals() {
97          return goals;
98      }
99  
100     /***
101      * @param goals is goals to be set
102      */
103     public void setGoals(String goals) {
104         this.goals = goals;
105     }
106     /***
107      * @return prerequisite
108      */
109     public String getPrerequisite() {
110         return prerequisite;
111     }
112     /***
113      * @param prerequisite is prerequisite to be set
114      */
115     public void setPrerequisite(String prerequisite) {
116         this.prerequisite = prerequisite;
117     }
118     /***
119      * @return list of start dates
120      */
121     public List getStartDates() {
122         return startDates;
123     }
124     /***
125      * 
126      * @param startDates to be set
127      */
128     public void setStartDates(List startDates) {
129         this.startDates = startDates;
130     }
131 
132 
133     /***
134      * {@inheritDoc}
135      */
136     public int hashCode() {
137         return new HashCodeBuilder(33, 15).
138           append(this.numberOfDays).
139           toHashCode();
140     }
141     
142     
143     /***
144      * {@inheritDoc}
145      */
146     public int compareTo(Object o) {
147         CommercialEducationOffer ceo = (CommercialEducationOffer) o;
148         return new CompareToBuilder()
149           .appendSuper(super.compareTo(ceo))
150           .append(this.numberOfDays, ceo.getNumberOfDays())
151           .toComparison();
152     }
153     
154     
155     /***
156      * {@inheritDoc}
157      */
158     public String toString() {
159     	return new ToStringBuilder(this)
160     		.appendSuper(super.toString())
161     		.append("numberOfDays", this.numberOfDays)    		
162     		.toString();
163     }
164 }
165 /***
166  * $Log: CommercialEducationOffer.java,v $
167  * Revision 1.6  2005/12/20 15:36:45  shally
168  * CheckStyle and PMD changes.
169  *
170  * Revision 1.5  2005/09/12 09:51:54  schauwvliege
171  * checkstyle
172  *
173  * Revision 1.4  2005/09/09 15:11:51  bavo_jcs
174  * Added CommercialEducationOffer
175  *
176  * Revision 1.3  2005/09/09 10:54:03  bavo_jcs
177  * Added CommercialEducationOffer
178  *
179  * Revision 1.2  2005/08/31 12:15:09  bme_jcs
180  * refactoring and introduction of apache builders
181  *
182  * Revision 1.1  2005/08/26 07:58:26  ge0ffrey
183  * split up the sources in service, serviceimpl and webclient
184  *
185  * Revision 1.2  2005/06/09 08:18:52  bejug_cc
186  * Fix initial import
187  *
188  * Revision 1.3  2005/05/09 13:42:10  ssc
189  * checkstyle
190  *
191  * Revision 1.2  2005/04/29 18:17:34  sja
192  * General cleanup (naming conv., javadoc and CVS tags)
193  *
194  * Revision 1.1  2005/04/29 05:59:53  bme
195  * first release
196  *
197  */