KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > test > interfaces > PersonData


1 /*
2  * Generated by XDoclet - Do not edit!
3  */

4 package test.interfaces;
5
6 /**
7  * Data object for Person.
8  * @xdoclet-generated at 16-04-05
9  * @copyright The XDoclet Team
10  * @author XDoclet
11  * @version 1.2.3
12  */

13 public class PersonData
14    extends java.lang.Object JavaDoc
15    implements java.io.Serializable JavaDoc, test.interfaces.Identifiable
16 {
17    private java.lang.String JavaDoc id;
18    private java.lang.String JavaDoc name;
19    private java.lang.String JavaDoc firstName;
20    private java.lang.String JavaDoc phone;
21    private java.lang.String JavaDoc fax;
22    private java.util.Date JavaDoc creationDate;
23
24   /* begin value object */
25
26   /* end value object */
27
28    public PersonData()
29    {
30    }
31
32    public PersonData( java.lang.String JavaDoc id,java.lang.String JavaDoc name,java.lang.String JavaDoc firstName,java.lang.String JavaDoc phone,java.lang.String JavaDoc fax,java.util.Date JavaDoc creationDate )
33    {
34       setId(id);
35       setName(name);
36       setFirstName(firstName);
37       setPhone(phone);
38       setFax(fax);
39       setCreationDate(creationDate);
40    }
41
42    public PersonData( PersonData otherData )
43    {
44       setId(otherData.getId());
45       setName(otherData.getName());
46       setFirstName(otherData.getFirstName());
47       setPhone(otherData.getPhone());
48       setFax(otherData.getFax());
49       setCreationDate(otherData.getCreationDate());
50
51    }
52
53    public java.lang.String JavaDoc getId()
54    {
55       return this.id;
56    }
57    public void setId( java.lang.String JavaDoc id )
58    {
59       this.id = id;
60    }
61
62    public java.lang.String JavaDoc getName()
63    {
64       return this.name;
65    }
66    public void setName( java.lang.String JavaDoc name )
67    {
68       this.name = name;
69    }
70
71    public java.lang.String JavaDoc getFirstName()
72    {
73       return this.firstName;
74    }
75    public void setFirstName( java.lang.String JavaDoc firstName )
76    {
77       this.firstName = firstName;
78    }
79
80    public java.lang.String JavaDoc getPhone()
81    {
82       return this.phone;
83    }
84    public void setPhone( java.lang.String JavaDoc phone )
85    {
86       this.phone = phone;
87    }
88
89    public java.lang.String JavaDoc getFax()
90    {
91       return this.fax;
92    }
93    public void setFax( java.lang.String JavaDoc fax )
94    {
95       this.fax = fax;
96    }
97
98    public java.util.Date JavaDoc getCreationDate()
99    {
100       return this.creationDate;
101    }
102    public void setCreationDate( java.util.Date JavaDoc creationDate )
103    {
104       this.creationDate = creationDate;
105    }
106
107    public String JavaDoc toString()
108    {
109       StringBuffer JavaDoc str = new StringBuffer JavaDoc("{");
110
111       str.append("id=" + getId() + " " + "name=" + getName() + " " + "firstName=" + getFirstName() + " " + "phone=" + getPhone() + " " + "fax=" + getFax() + " " + "creationDate=" + getCreationDate());
112       str.append('}');
113
114       return(str.toString());
115    }
116
117    public boolean equals( Object JavaDoc pOther )
118    {
119       if( pOther instanceof PersonData )
120       {
121          PersonData lTest = (PersonData) pOther;
122          boolean lEquals = true;
123
124          if( this.id == null )
125          {
126             lEquals = lEquals && ( lTest.id == null );
127          }
128          else
129          {
130             lEquals = lEquals && this.id.equals( lTest.id );
131          }
132          if( this.name == null )
133          {
134             lEquals = lEquals && ( lTest.name == null );
135          }
136          else
137          {
138             lEquals = lEquals && this.name.equals( lTest.name );
139          }
140          if( this.firstName == null )
141          {
142             lEquals = lEquals && ( lTest.firstName == null );
143          }
144          else
145          {
146             lEquals = lEquals && this.firstName.equals( lTest.firstName );
147          }
148          if( this.phone == null )
149          {
150             lEquals = lEquals && ( lTest.phone == null );
151          }
152          else
153          {
154             lEquals = lEquals && this.phone.equals( lTest.phone );
155          }
156          if( this.fax == null )
157          {
158             lEquals = lEquals && ( lTest.fax == null );
159          }
160          else
161          {
162             lEquals = lEquals && this.fax.equals( lTest.fax );
163          }
164          if( this.creationDate == null )
165          {
166             lEquals = lEquals && ( lTest.creationDate == null );
167          }
168          else
169          {
170             lEquals = lEquals && this.creationDate.equals( lTest.creationDate );
171          }
172
173          return lEquals;
174       }
175       else
176       {
177          return false;
178       }
179    }
180
181    public int hashCode()
182    {
183       int result = 17;
184
185       result = 37*result + ((this.id != null) ? this.id.hashCode() : 0);
186
187       result = 37*result + ((this.name != null) ? this.name.hashCode() : 0);
188
189       result = 37*result + ((this.firstName != null) ? this.firstName.hashCode() : 0);
190
191       result = 37*result + ((this.phone != null) ? this.phone.hashCode() : 0);
192
193       result = 37*result + ((this.fax != null) ? this.fax.hashCode() : 0);
194
195       result = 37*result + ((this.creationDate != null) ? this.creationDate.hashCode() : 0);
196
197       return result;
198    }
199
200 }
201
Popular Tags