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 Bart Meyers (Last modified by $Author: shally $)
29 * @version $Revision: 1.3 $ - $Date: 2005/12/20 15:36:45 $
30 */
31 public class Profile extends AbstractParameter {
32
33 /***
34 * default constructor.
35 */
36 public Profile() {
37 super();
38 }
39
40 /***
41 * Creational constructor.
42 *
43 * @param name the profile name.
44 * @param description the profile description.
45 * @param locale the locale.
46 */
47 public Profile(String name, String description, String locale) {
48 super(name, description, locale);
49 }
50
51 /***
52 * {@inheritDoc}
53 */
54 public int compareTo(Object o) {
55
56 return new CompareToBuilder()
57 .appendSuper(super.compareTo(o))
58 .toComparison();
59 }
60
61
62 /***
63 * {@inheritDoc}
64 */
65 public boolean equals(Object o) {
66 if (!(o instanceof Profile)) {
67 return false;
68 }
69 if (this == o) {
70 return true;
71 }
72
73 return new EqualsBuilder()
74 .appendSuper(super.equals(o))
75 .isEquals();
76 }
77
78
79 /***
80 * {@inheritDoc}
81 */
82 public int hashCode() {
83 return new HashCodeBuilder(525, 19)
84 .toHashCode();
85 }
86
87
88 /***
89 * {@inheritDoc}
90 */
91 public String toString() {
92 return new ToStringBuilder(this)
93 .appendSuper(super.toString())
94 .toString();
95 }
96 }
97 /***
98 * $Log: Profile.java,v $
99 * Revision 1.3 2005/12/20 15:36:45 shally
100 * CheckStyle and PMD changes.
101 *
102 * Revision 1.2 2005/08/31 12:15:09 bme_jcs
103 * refactoring and introduction of apache builders
104 *
105 * Revision 1.1 2005/08/26 07:58:26 ge0ffrey
106 * split up the sources in service, serviceimpl and webclient
107 *
108 * Revision 1.2 2005/06/09 08:18:52 bejug_cc
109 * Fix initial import
110 *
111 * Revision 1.10 2005/05/10 13:55:31 bme
112 * I18N
113 *
114 * Revision 1.9 2005/05/01 08:04:04 sja
115 * changed to super(name, description);
116 *
117 * Revision 1.8 2005/05/01 08:00:16 sja
118 * Added setName and setDescription in constructor.
119 *
120 * Revision 1.7 2005/04/29 18:17:34 sja
121 * General cleanup (naming conv., javadoc and CVS tags)
122 *
123 * Revision 1.6 2005/04/29 12:21:05 bme
124 * updated for parameter-functionality
125 *
126 * Revision 1.4 2005/04/25 13:25:57 ssc
127 * Add ParameterizedObject
128 *
129 * Revision 1.3 2005/04/25 08:07:26 bme
130 * Resembles domainmodel
131 *
132 * Revision 1.1 2005/04/22 12:10:33 bme
133 * First Release
134 *
135 */