KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > test > ejb > cmr > EmployeeAddressData


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

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

13 public class EmployeeAddressData
14    extends java.lang.Object JavaDoc
15    implements java.io.Serializable JavaDoc
16 {
17    private java.lang.Integer JavaDoc id;
18    private java.lang.String JavaDoc description;
19
20   /* begin value object */
21    private test.ejb.cmr.EmployeeAddressValue EmployeeAddressValue = null;
22
23    public test.ejb.cmr.EmployeeAddressValue getEmployeeAddressValue()
24    {
25       if( EmployeeAddressValue == null )
26       {
27           EmployeeAddressValue = new test.ejb.cmr.EmployeeAddressValue();
28       }
29       try
30          {
31             EmployeeAddressValue.setId( getId() );
32             EmployeeAddressValue.setDescription( getDescription() );
33                    }
34          catch (Exception JavaDoc e)
35          {
36             throw new javax.ejb.EJBException JavaDoc(e);
37          }
38
39       return EmployeeAddressValue;
40    }
41
42    public void setEmployeeAddressValue( test.ejb.cmr.EmployeeAddressValue valueHolder )
43    {
44
45       try
46       {
47          setDescription( valueHolder.getDescription() );
48       }
49       catch (Exception JavaDoc e)
50       {
51          throw new javax.ejb.EJBException JavaDoc(e);
52       }
53    }
54
55   /* end value object */
56
57    public EmployeeAddressData()
58    {
59    }
60
61    public EmployeeAddressData( java.lang.Integer JavaDoc id,java.lang.String JavaDoc description )
62    {
63       setId(id);
64       setDescription(description);
65    }
66
67    public EmployeeAddressData( EmployeeAddressData otherData )
68    {
69       setId(otherData.getId());
70       setDescription(otherData.getDescription());
71
72    }
73
74    public java.lang.Integer JavaDoc getPrimaryKey() {
75      return getId();
76    }
77
78    public java.lang.Integer JavaDoc getId()
79    {
80       return this.id;
81    }
82    public void setId( java.lang.Integer JavaDoc id )
83    {
84       this.id = id;
85    }
86
87    public java.lang.String JavaDoc getDescription()
88    {
89       return this.description;
90    }
91    public void setDescription( java.lang.String JavaDoc description )
92    {
93       this.description = description;
94    }
95
96    public String JavaDoc toString()
97    {
98       StringBuffer JavaDoc str = new StringBuffer JavaDoc("{");
99
100       str.append("id=" + getId() + " " + "description=" + getDescription());
101       str.append('}');
102
103       return(str.toString());
104    }
105
106    public boolean equals( Object JavaDoc pOther )
107    {
108       if( pOther instanceof EmployeeAddressData )
109       {
110          EmployeeAddressData lTest = (EmployeeAddressData) pOther;
111          boolean lEquals = true;
112
113          if( this.id == null )
114          {
115             lEquals = lEquals && ( lTest.id == null );
116          }
117          else
118          {
119             lEquals = lEquals && this.id.equals( lTest.id );
120          }
121          if( this.description == null )
122          {
123             lEquals = lEquals && ( lTest.description == null );
124          }
125          else
126          {
127             lEquals = lEquals && this.description.equals( lTest.description );
128          }
129
130          return lEquals;
131       }
132       else
133       {
134          return false;
135       }
136    }
137
138    public int hashCode()
139    {
140       int result = 17;
141
142       result = 37*result + ((this.id != null) ? this.id.hashCode() : 0);
143
144       result = 37*result + ((this.description != null) ? this.description.hashCode() : 0);
145
146       return result;
147    }
148
149 }
150
Popular Tags