KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > test > interfaces > AllTypesEntityPK


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

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

13 public class AllTypesEntityPK
14    extends java.lang.Object JavaDoc
15    implements java.io.Serializable JavaDoc
16 {
17
18    public int[] iVOwnerHdl;
19    public java.lang.String JavaDoc id;
20
21    public AllTypesEntityPK()
22    {
23    }
24
25    public AllTypesEntityPK( int[] IVOwnerHdl,java.lang.String JavaDoc id )
26    {
27       this.iVOwnerHdl = IVOwnerHdl;
28       this.id = id;
29    }
30
31    public int[] getIVOwnerHdl()
32    {
33       return iVOwnerHdl;
34    }
35    public java.lang.String JavaDoc getId()
36    {
37       return id;
38    }
39
40    public void setIVOwnerHdl(int[] iVOwnerHdl)
41    {
42       this.iVOwnerHdl = iVOwnerHdl;
43    }
44    public void setId(java.lang.String JavaDoc id)
45    {
46       this.id = id;
47    }
48
49    public int hashCode()
50    {
51       int _hashCode = 0;
52          if (this.iVOwnerHdl != null) _hashCode += this.iVOwnerHdl.hashCode();
53          if (this.id != null) _hashCode += this.id.hashCode();
54
55       return _hashCode;
56    }
57
58    public boolean equals(Object JavaDoc obj)
59    {
60       if( !(obj instanceof test.interfaces.AllTypesEntityPK) )
61          return false;
62
63       test.interfaces.AllTypesEntityPK pk = (test.interfaces.AllTypesEntityPK)obj;
64       boolean eq = true;
65
66       if( obj == null )
67       {
68          eq = false;
69       }
70       else
71       {
72          eq = eq && this.iVOwnerHdl == pk.iVOwnerHdl;
73          if( this.id != null )
74          {
75             eq = eq && this.id.equals( pk.getId() );
76          }
77          else // this.id == null
78
{
79             eq = eq && ( pk.getId() == null );
80          }
81       }
82
83       return eq;
84    }
85
86    /** @return String representation of this pk in the form of [.field1.field2.field3]. */
87    public String JavaDoc toString()
88    {
89       StringBuffer JavaDoc toStringValue = new StringBuffer JavaDoc("[.");
90          toStringValue.append(this.iVOwnerHdl).append('.');
91          toStringValue.append(this.id).append('.');
92       toStringValue.append(']');
93       return toStringValue.toString();
94    }
95
96 }
97
Popular Tags