1 22 package org.jboss.test.banknew.interfaces; 23 24 27 public class CustomerData extends java.lang.Object implements java.io.Serializable 28 { 29 30 private static final long serialVersionUID = 713727152767197901L; 31 32 private java.lang.String id; 33 34 private java.lang.String bankId; 35 36 private java.lang.String name; 37 38 public CustomerData() 39 { 40 } 41 42 public CustomerData(java.lang.String id, java.lang.String bankId, java.lang.String name) 43 { 44 setId(id); 45 setBankId(bankId); 46 setName(name); 47 } 48 49 public CustomerData(CustomerData otherData) 50 { 51 setId(otherData.getId()); 52 setBankId(otherData.getBankId()); 53 setName(otherData.getName()); 54 55 } 56 57 public org.jboss.test.banknew.interfaces.CustomerPK getPrimaryKey() 58 { 59 org.jboss.test.banknew.interfaces.CustomerPK pk = new org.jboss.test.banknew.interfaces.CustomerPK(this.getId()); 60 return pk; 61 } 62 63 public java.lang.String getId() 64 { 65 return this.id; 66 } 67 68 public void setId(java.lang.String id) 69 { 70 this.id = id; 71 } 72 73 public java.lang.String getBankId() 74 { 75 return this.bankId; 76 } 77 78 public void setBankId(java.lang.String bankId) 79 { 80 this.bankId = bankId; 81 } 82 83 public java.lang.String getName() 84 { 85 return this.name; 86 } 87 88 public void setName(java.lang.String name) 89 { 90 this.name = name; 91 } 92 93 public String toString() 94 { 95 StringBuffer str = new StringBuffer ("{"); 96 97 str.append("id=" + getId() + " " + "bankId=" + getBankId() + " " + "name=" + getName()); 98 str.append('}'); 99 100 return (str.toString()); 101 } 102 103 public boolean equals(Object pOther) 104 { 105 if (pOther instanceof CustomerData) 106 { 107 CustomerData lTest = (CustomerData) pOther; 108 boolean lEquals = true; 109 110 if (this.id == null) 111 { 112 lEquals = lEquals && (lTest.id == null); 113 } 114 else 115 { 116 lEquals = lEquals && this.id.equals(lTest.id); 117 } 118 if (this.bankId == null) 119 { 120 lEquals = lEquals && (lTest.bankId == null); 121 } 122 else 123 { 124 lEquals = lEquals && this.bankId.equals(lTest.bankId); 125 } 126 if (this.name == null) 127 { 128 lEquals = lEquals && (lTest.name == null); 129 } 130 else 131 { 132 lEquals = lEquals && this.name.equals(lTest.name); 133 } 134 135 return lEquals; 136 } 137 else 138 { 139 return false; 140 } 141 } 142 143 public int hashCode() 144 { 145 int result = 17; 146 147 result = 37 * result + ((this.id != null) ? this.id.hashCode() : 0); 148 149 result = 37 * result + ((this.bankId != null) ? this.bankId.hashCode() : 0); 150 151 result = 37 * result + ((this.name != null) ? this.name.hashCode() : 0); 152 153 return result; 154 } 155 156 } 157 | Popular Tags |