KickJava   Java API By Example, From Geeks To Geeks.

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


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

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

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