1 4 package test.interfaces; 5 6 19 public class AccountValue 20 extends java.lang.Object 21 implements java.io.Serializable , java.lang.Cloneable 22 { 23 24 private java.lang.Integer id; 25 private boolean idHasBeenSet = false; 26 27 private float totalBalance; 28 private boolean totalBalanceHasBeenSet = false; 29 30 private float balance; 31 private boolean balanceHasBeenSet = false; 32 33 private java.lang.String accountId; 34 private boolean accountIdHasBeenSet = false; 35 private test.interfaces.CustomerNormalValue OwnerNormalValue; 36 private boolean OwnerNormalValueHasBeenSet = false; 37 38 private test.interfaces.AccountPK primaryKey; 39 40 public AccountValue() 41 { 42 primaryKey = new test.interfaces.AccountPK(); 43 } 44 45 public AccountValue( java.lang.Integer id,float totalBalance,float balance,java.lang.String accountId ) 46 { 47 setId(id); 48 setTotalBalance(totalBalance); 49 setBalance(balance); 50 setAccountId(accountId); 51 primaryKey = new test.interfaces.AccountPK(this.getId()); 52 } 53 54 57 public AccountValue( AccountValue otherValue ) 58 { 59 this.id = otherValue.id; 60 idHasBeenSet = true; 61 this.totalBalance = otherValue.totalBalance; 62 totalBalanceHasBeenSet = true; 63 this.balance = otherValue.balance; 64 balanceHasBeenSet = true; 65 this.accountId = otherValue.accountId; 66 accountIdHasBeenSet = true; 67 this.OwnerNormalValue = otherValue.OwnerNormalValue; 68 OwnerNormalValueHasBeenSet = true; 69 70 primaryKey = new test.interfaces.AccountPK(this.getId()); 71 } 72 73 public test.interfaces.AccountPK getPrimaryKey() 74 { 75 return primaryKey; 76 } 77 78 public void setPrimaryKey( test.interfaces.AccountPK primaryKey) 79 { 80 this.primaryKey = primaryKey; 83 setId( primaryKey.id ); 84 } 85 86 public java.lang.Integer getId() 87 { 88 return this.id; 89 } 90 91 public void setId( java.lang.Integer id ) 92 { 93 this.id = id; 94 idHasBeenSet = true; 95 96 primaryKey.setId(id); 97 } 98 99 public boolean idHasBeenSet(){ 100 return idHasBeenSet; 101 } 102 public float getTotalBalance() 103 { 104 return this.totalBalance; 105 } 106 107 private void setTotalBalance( float totalBalance ) 108 { 109 this.totalBalance = totalBalance; 110 totalBalanceHasBeenSet = true; 111 112 } 113 114 public float getBalance() 115 { 116 return this.balance; 117 } 118 119 public void setBalance( float balance ) 120 { 121 this.balance = balance; 122 balanceHasBeenSet = true; 123 124 } 125 126 public boolean balanceHasBeenSet(){ 127 return balanceHasBeenSet; 128 } 129 public java.lang.String getAccountId() 130 { 131 return this.accountId; 132 } 133 134 private void setAccountId( java.lang.String accountId ) 135 { 136 this.accountId = accountId; 137 accountIdHasBeenSet = true; 138 139 } 140 141 public test.interfaces.CustomerNormalValue getOwnerNormalValue() 142 { 143 return this.OwnerNormalValue; 144 } 145 public void setOwnerNormalValue( test.interfaces.CustomerNormalValue OwnerNormalValue ) 146 { 147 this.OwnerNormalValue = OwnerNormalValue; 148 OwnerNormalValueHasBeenSet = true; 149 } 150 public boolean ownerNormalValueHasBeenSet() 151 { 152 return OwnerNormalValueHasBeenSet; 153 } 154 155 public String toString() 156 { 157 StringBuffer str = new StringBuffer ("{"); 158 159 str.append("id=" + getId() + " " + "totalBalance=" + getTotalBalance() + " " + "balance=" + getBalance() + " " + "accountId=" + getAccountId()); 160 str.append('}'); 161 162 return(str.toString()); 163 } 164 165 170 protected boolean hasIdentity() 171 { 172 boolean ret = true; 173 ret = ret && idHasBeenSet; 174 return ret; 175 } 176 177 181 public boolean isIdentical(Object other) 182 { 183 if (other instanceof AccountValue) 184 { 185 AccountValue that = (AccountValue) other; 186 boolean lEquals = true; 187 lEquals = lEquals && this.totalBalance == that.totalBalance; 188 lEquals = lEquals && this.balance == that.balance; 189 if( this.accountId == null ) 190 { 191 lEquals = lEquals && ( that.accountId == null ); 192 } 193 else 194 { 195 lEquals = lEquals && this.accountId.equals( that.accountId ); 196 } 197 if( this.OwnerNormalValue == null ) 198 { 199 lEquals = lEquals && ( that.OwnerNormalValue == null ); 200 } 201 else 202 { 203 lEquals = lEquals && this.OwnerNormalValue.equals( that.OwnerNormalValue ); 204 } 205 206 return lEquals; 207 } 208 else 209 { 210 return false; 211 } 212 } 213 214 public boolean equals(Object other) { 215 216 if (!(other instanceof AccountValue)) { 218 return false; 219 } 220 221 return equals((AccountValue) other); 222 } 223 224 229 public boolean equals(AccountValue that) { 230 231 if (this == that) { 233 return true; 234 } 235 if(null == that) { 237 return false; 238 } 239 240 if(this.id != that.id) { 241 242 if( this.id == null || that.id == null ) { 243 return false; 244 } 245 246 if(!this.id.equals(that.id)) { 247 return false; 248 } 249 250 } 251 252 if(this.totalBalance != that.totalBalance) { 253 return false; 254 } 255 256 if(this.balance != that.balance) { 257 return false; 258 } 259 260 if(this.accountId != that.accountId) { 261 262 if( this.accountId == null || that.accountId == null ) { 263 return false; 264 } 265 266 if(!this.accountId.equals(that.accountId)) { 267 return false; 268 } 269 270 } 271 272 if(this.OwnerNormalValue != that.OwnerNormalValue) { 273 if((this.OwnerNormalValue == null) || (that.OwnerNormalValue == null)) { 274 return false; 275 } 276 if(!this.OwnerNormalValue.equals(that.OwnerNormalValue)) { 277 return false; 278 } 279 } 280 281 return true; 282 283 } 284 285 public Object clone() throws java.lang.CloneNotSupportedException { 286 AccountValue other = (AccountValue) super.clone(); 287 288 return other; 289 } 290 291 public ReadOnlyAccountValue getReadOnlyAccountValue() { 292 return new ReadOnlyAccountValue(); 293 } 294 295 public int hashCode(){ 296 int result = 17; 297 result = 37*result + ((this.id != null) ? this.id.hashCode() : 0); 298 299 result = 37*result + Float.floatToIntBits(totalBalance); 300 301 result = 37*result + Float.floatToIntBits(balance); 302 303 result = 37*result + ((this.accountId != null) ? this.accountId.hashCode() : 0); 304 305 result = 37*result + ((this.OwnerNormalValue != null) ? this.OwnerNormalValue.hashCode() : 0); 306 307 return result; 308 } 309 310 317 private static java.util.Collection wrapCollection(java.util.Collection input) { 318 return java.util.Collections.synchronizedCollection(input); 319 } 320 327 private static java.util.Set wrapCollection(java.util.Set input) { 328 return java.util.Collections.synchronizedSet(input); 329 } 330 336 private static java.util.Collection wrapReadOnly(java.util.Collection input) { 337 return java.util.Collections.unmodifiableCollection(input); 338 } 339 345 private static java.util.Set wrapReadOnly(java.util.Set input) { 346 return java.util.Collections.unmodifiableSet(input); 347 } 348 349 private final class ReadOnlyAccountValue 350 implements java.lang.Cloneable , java.io.Serializable 351 { 352 private AccountValue underlying() { 353 return AccountValue.this; 354 } 355 356 public java.lang.Integer getId() { 357 return underlying().id; 358 } 359 360 public float getTotalBalance() { 361 return underlying().totalBalance; 362 } 363 364 public float getBalance() { 365 return underlying().balance; 366 } 367 368 public java.lang.String getAccountId() { 369 return underlying().accountId; 370 } 371 372 public test.interfaces.CustomerNormalValue getOwnerNormalValue() 373 { 374 return underlying().OwnerNormalValue; 375 } 376 377 public int hashCode() { 378 return 101 * underlying().hashCode(); 379 } 380 381 public boolean equals(Object o) { 382 if(o instanceof ReadOnlyAccountValue) { 383 return this.equals((ReadOnlyAccountValue) o); 384 } 385 return false; 386 } 387 388 public boolean equals(ReadOnlyAccountValue that) { 389 if(null == that) { 390 return false; 391 } 392 393 return this.underlying().equals(that.underlying()); 394 } 395 396 } 397 398 } 399 | Popular Tags |