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  package org.bejug.javacareers.jobs.model;
18  
19  import org.apache.commons.lang.builder.CompareToBuilder;
20  import org.apache.commons.lang.builder.EqualsBuilder;
21  import org.apache.commons.lang.builder.HashCodeBuilder;
22  import org.apache.commons.lang.builder.ToStringBuilder;
23  
24  /***
25   *
26   * @author Sven Schauwvliege (Last modified by $Author: shally $)
27   * @version $Revision: 1.5 $ - $Date: 2005/12/20 15:36:45 $
28   */
29  
30  
31  public class Resume extends Item {
32  
33  	/***
34  	 * The PdfUrl String.
35  	 */
36  	private String pdfUrl;
37  	
38  	/***
39  	 * @return Returns the pdfUrl.
40  	 */
41  	public String getPdfUrl() {
42  		return pdfUrl;
43  	}
44  
45  	/***
46  	 * @param pdfUrl The pdfUrl to set.
47  	 */
48  	public void setPdfUrl(String pdfUrl) {
49  		this.pdfUrl = pdfUrl;
50  	}
51  	
52  	/***
53  	 * {@inheritDoc}
54  	 */
55  	public int compareTo(Object o) {
56  	     Resume resume = (Resume) o;
57  	     return new CompareToBuilder()
58  	       .appendSuper(super.compareTo(o))
59  	       .append(this.pdfUrl, resume.getPdfUrl())
60  	       .append(this.user, resume.getUser())
61  	       .toComparison();
62  	}
63  	
64  	
65  	/***
66       * {@inheritDoc}
67       */
68      public boolean equals(Object o) {
69      	if (!(o instanceof Resume)) {
70      	     return false;
71      	   }
72      	   if (this == o) {
73      	     return true;
74      	   }
75      	   Resume resume = (Resume) o;
76      	   return new EqualsBuilder()
77      	   		.appendSuper(super.equals(o))
78      	   		.append(this.pdfUrl, resume.getPdfUrl())
79      	   		.append(this.user, resume.getUser())
80      	        .isEquals();
81      }
82      
83      
84      /***
85       * {@inheritDoc}
86       */
87      public int hashCode() {
88          return new HashCodeBuilder(777, 33)
89          	.append(this.pdfUrl)
90      	   	.append(this.user)
91          	.toHashCode();
92      }
93      
94      
95      /***
96       * {@inheritDoc}
97       */
98      public String toString() {
99      	return new ToStringBuilder(this)
100     		.appendSuper(super.toString())
101     		.append("pdfUrl", this.pdfUrl)
102     		.append("user", this.user)
103     		.toString();
104     }
105   
106 	
107 }
108 /*** 
109  * $Log: Resume.java,v $
110  * Revision 1.5  2005/12/20 15:36:45  shally
111  * CheckStyle and PMD changes.
112  *
113  * Revision 1.4  2005/09/24 17:30:06  schauwvliege
114  * delete content, refactory of resume
115  *
116  * Revision 1.3  2005/09/06 08:38:07  schauwvliege
117  * JAVACAREERS-319 Moved user to Item
118  *
119  * Revision 1.2  2005/08/31 12:15:09  bme_jcs
120  * refactoring and introduction of apache builders
121  *
122  * Revision 1.1  2005/08/26 07:58:26  ge0ffrey
123  * split up the sources in service, serviceimpl and webclient
124  *
125  * Revision 1.4  2005/08/24 14:07:42  bme_jcs
126  * fixed minor bug
127  *
128  * Revision 1.3  2005/08/23 11:57:42  schauwvliege
129  * Intruduction of Resume
130  *
131  * Revision 1.2  2005/08/23 10:18:46  bme_jcs
132  * resolved checkstyle and pmd errors
133  *
134  * Revision 1.1  2005/08/22 13:39:13  schauwvliege
135  * Introduction of Item
136  * 
137  **/