1 4 package test.interfaces; 5 6 13 public class AccountPK 14 extends java.lang.Object 15 implements java.io.Serializable 16 { 17 18 public java.lang.Integer id; 19 20 public AccountPK() 21 { 22 } 23 24 public AccountPK( java.lang.Integer id ) 25 { 26 this.id = id; 27 } 28 29 public java.lang.Integer getId() 30 { 31 return id; 32 } 33 34 public void setId(java.lang.Integer id) 35 { 36 this.id = id; 37 } 38 39 public int hashCode() 40 { 41 int _hashCode = 0; 42 if (this.id != null) _hashCode += this.id.hashCode(); 43 44 return _hashCode; 45 } 46 47 public boolean equals(Object obj) 48 { 49 if( !(obj instanceof test.interfaces.AccountPK) ) 50 return false; 51 52 test.interfaces.AccountPK pk = (test.interfaces.AccountPK)obj; 53 boolean eq = true; 54 55 if( obj == null ) 56 { 57 eq = false; 58 } 59 else 60 { 61 if( this.id != null ) 62 { 63 eq = eq && this.id.equals( pk.getId() ); 64 } 65 else { 67 eq = eq && ( pk.getId() == null ); 68 } 69 } 70 71 return eq; 72 } 73 74 75 public String toString() 76 { 77 StringBuffer toStringValue = new StringBuffer ("[."); 78 toStringValue.append(this.id).append('.'); 79 toStringValue.append(']'); 80 return toStringValue.toString(); 81 } 82 83 } 84 | Popular Tags |