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 org.apache.commons.lang.builder.CompareToBuilder;
21 import org.apache.commons.lang.builder.EqualsBuilder;
22 import org.apache.commons.lang.builder.HashCodeBuilder;
23 import org.apache.commons.lang.builder.ToStringBuilder;
24
25
26 /***
27 *
28 * @author Peter Symoens (last modified by $Author: shally $)
29 * @version $Revision: 1.3 $ - $Date: 2005/12/20 15:36:45 $
30 */
31 public class JobOffer extends Offer {
32
33 /***
34 * Default constructor.
35 */
36 public JobOffer() {
37 super();
38 }
39
40 /***
41 * @return returns the company name
42 */
43 public String getCompanyName() {
44 return getUser().getOrganisation().getName();
45 }
46
47 /***
48 * {@inheritDoc}
49 */
50 public String toString() {
51 return new ToStringBuilder(this)
52 .appendSuper(super.toString())
53 .toString();
54 }
55
56
57 /***
58 * {@inheritDoc}
59 */
60 public int compareTo(Object o) {
61
62 return new CompareToBuilder()
63 .appendSuper(super.compareTo(o))
64 .toComparison();
65 }
66
67 /***
68 * {@inheritDoc}
69 */
70 public boolean equals(Object o) {
71 if (!(o instanceof JobOffer)) {
72 return false;
73 }
74 if (this == o) {
75 return true;
76 }
77
78 return new EqualsBuilder()
79 .appendSuper(super.equals(o))
80 .isEquals();
81 }
82
83
84 /***
85 * {@inheritDoc}
86 */
87 public int hashCode() {
88 return new HashCodeBuilder(19637, 81)
89 .toHashCode();
90 }
91
92 }
93
94 /***
95 * $Log: JobOffer.java,v $
96 * Revision 1.3 2005/12/20 15:36:45 shally
97 * CheckStyle and PMD changes.
98 *
99 * Revision 1.2 2005/08/31 12:15:09 bme_jcs
100 * refactoring and introduction of apache builders
101 *
102 * Revision 1.1 2005/08/26 07:58:26 ge0ffrey
103 * split up the sources in service, serviceimpl and webclient
104 *
105 * Revision 1.4 2005/08/05 14:21:27 bavo_jcs
106 * Feeder smart delete fix
107 *
108 * Revision 1.3 2005/08/03 08:17:28 psong09
109 * added comments count column to jobOfferTable
110 *
111 * Revision 1.2 2005/06/09 08:18:52 bejug_cc
112 * Fix initial import
113 *
114 * Revision 1.12 2005/05/17 11:59:56 ssc
115 * Refactored User and Publisher class to User Class added cvAdded Boolean, added Address to user, Fixed test to work with this setup
116 *
117 * Revision 1.11 2005/05/11 12:49:30 ssc
118 * Checstyle errors
119 *
120 * Revision 1.10 2005/05/09 13:42:10 ssc
121 * checkstyle
122 *
123 * Revision 1.9 2005/05/03 14:52:53 PSONG09
124 * javadoc added
125 *
126 * Revision 1.8 2005/04/29 18:17:34 sja
127 * General cleanup (naming conv., javadoc and CVS tags)
128 *
129 * Revision 1.7 2005/04/29 07:01:47 PSONG09
130 * update
131 * Revision 1.6 2005/04/25 13:25:57 ssc Add
132 * ParameterizedObject
133 *
134 * Revision 1.5 2005/04/25 08:07:14 bme Resembles domainmodel
135 *
136 * Revision 1.2 2005/04/19 13:02:34 PSONG09 Changed myfaces taglib declarations
137 *
138 * Revision 1.1 2005/04/19 11:51:22 PSONG09 First release
139 *
140 * Revision 1.5 2005/04/18 13:43:51 ssc as of release 1.5, 'enum' is a keyword
141 *
142 * Revision 1.4 2005/04/15 22:19:25 sja Extends from Offer
143 *
144 * Revision 1.3 2005/04/15 20:55:23 sja cleanup
145 *
146 * Revision 1.2 2005/04/15 19:51:55 sja extends Offer added
147 *
148 * Revision 1.4 2005/04/14 15:02:17 PSONG09 JavaJobs JSF-MyFaces 0.1
149 *
150 * Revision 1.3 2005/04/14 13:08:38 PSONG09 JavaJobs JSF-MyFaces 0.1
151 *
152 * Revision 1.2 2005/04/14 12:06:13 PSONG09 JavaJobs JSF-MyFaces 0.1 Revision
153 * 1.1 2005/04/14 07:38:33 kva new source folder structure
154 *
155 * Revision 1.4 2005/04/13 15:31:14 sja corrected typeo
156 *
157 * Revision 1.3 2005/04/13 15:17:05 sja Add CVS tags and license header
158 *
159 */