KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > test > bea > cmr > MagazineData


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

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

13 public class MagazineData
14    extends java.lang.Object JavaDoc
15    implements java.io.Serializable JavaDoc
16 {
17    private java.lang.String JavaDoc title;
18    private java.lang.String JavaDoc boid;
19
20   /* begin value object */
21
22   /* end value object */
23
24    public MagazineData()
25    {
26    }
27
28    public MagazineData( java.lang.String JavaDoc title,java.lang.String JavaDoc boid )
29    {
30       setTitle(title);
31       setBoid(boid);
32    }
33
34    public MagazineData( MagazineData otherData )
35    {
36       setTitle(otherData.getTitle());
37       setBoid(otherData.getBoid());
38
39    }
40
41    public java.lang.String JavaDoc getPrimaryKey() {
42      return getBoid();
43    }
44
45    public java.lang.String JavaDoc getTitle()
46    {
47       return this.title;
48    }
49    public void setTitle( java.lang.String JavaDoc title )
50    {
51       this.title = title;
52    }
53
54    public java.lang.String JavaDoc getBoid()
55    {
56       return this.boid;
57    }
58    public void setBoid( java.lang.String JavaDoc boid )
59    {
60       this.boid = boid;
61    }
62
63    public String JavaDoc toString()
64    {
65       StringBuffer JavaDoc str = new StringBuffer JavaDoc("{");
66
67       str.append("title=" + getTitle() + " " + "boid=" + getBoid());
68       str.append('}');
69
70       return(str.toString());
71    }
72
73    public boolean equals( Object JavaDoc pOther )
74    {
75       if( pOther instanceof MagazineData )
76       {
77          MagazineData lTest = (MagazineData) pOther;
78          boolean lEquals = true;
79
80          if( this.title == null )
81          {
82             lEquals = lEquals && ( lTest.title == null );
83          }
84          else
85          {
86             lEquals = lEquals && this.title.equals( lTest.title );
87          }
88          if( this.boid == null )
89          {
90             lEquals = lEquals && ( lTest.boid == null );
91          }
92          else
93          {
94             lEquals = lEquals && this.boid.equals( lTest.boid );
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.title != null) ? this.title.hashCode() : 0);
110
111       result = 37*result + ((this.boid != null) ? this.boid.hashCode() : 0);
112
113       return result;
114    }
115
116 }
117
Popular Tags