KickJava   Java API By Example, From Geeks To Geeks.

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


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

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

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