001// -------------------------------------------------------------------------------- 002// Copyright 2002-2024 Echo Three, LLC 003// 004// Licensed under the Apache License, Version 2.0 (the "License"); 005// you may not use this file except in compliance with the License. 006// You may obtain a copy of the License at 007// 008// http://www.apache.org/licenses/LICENSE-2.0 009// 010// Unless required by applicable law or agreed to in writing, software 011// distributed under the License is distributed on an "AS IS" BASIS, 012// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013// See the License for the specific language governing permissions and 014// limitations under the License. 015// -------------------------------------------------------------------------------- 016// Generated File -- DO NOT EDIT BY HAND 017// -------------------------------------------------------------------------------- 018 019/** 020 * CustomerValue.java 021 */ 022 023package com.echothree.model.data.customer.server.value; 024 025import com.echothree.model.data.customer.common.pk.CustomerPK; 026 027import com.echothree.model.data.customer.server.factory.CustomerFactory; 028 029import com.echothree.model.data.party.common.pk.PartyPK; 030import com.echothree.model.data.customer.common.pk.CustomerTypePK; 031import com.echothree.model.data.offer.common.pk.OfferUsePK; 032import com.echothree.model.data.cancellationpolicy.common.pk.CancellationPolicyPK; 033import com.echothree.model.data.returnpolicy.common.pk.ReturnPolicyPK; 034import com.echothree.model.data.accounting.common.pk.GlAccountPK; 035 036import com.echothree.util.common.exception.PersistenceCloneException; 037import com.echothree.util.common.exception.PersistenceNotNullException; 038 039import com.echothree.util.server.persistence.BaseValue; 040 041import java.io.Serializable; 042 043public class CustomerValue 044 extends BaseValue<CustomerPK> 045 implements Cloneable, Serializable { 046 047 private PartyPK partyPK; 048 private boolean partyPKHasBeenModified = false; 049 private String customerName; 050 private boolean customerNameHasBeenModified = false; 051 private CustomerTypePK customerTypePK; 052 private boolean customerTypePKHasBeenModified = false; 053 private OfferUsePK initialOfferUsePK; 054 private boolean initialOfferUsePKHasBeenModified = false; 055 private CancellationPolicyPK cancellationPolicyPK; 056 private boolean cancellationPolicyPKHasBeenModified = false; 057 private ReturnPolicyPK returnPolicyPK; 058 private boolean returnPolicyPKHasBeenModified = false; 059 private GlAccountPK arGlAccountPK; 060 private boolean arGlAccountPKHasBeenModified = false; 061 private Boolean holdUntilComplete; 062 private boolean holdUntilCompleteHasBeenModified = false; 063 private Boolean allowBackorders; 064 private boolean allowBackordersHasBeenModified = false; 065 private Boolean allowSubstitutions; 066 private boolean allowSubstitutionsHasBeenModified = false; 067 private Boolean allowCombiningShipments; 068 private boolean allowCombiningShipmentsHasBeenModified = false; 069 private Boolean requireReference; 070 private boolean requireReferenceHasBeenModified = false; 071 private Boolean allowReferenceDuplicates; 072 private boolean allowReferenceDuplicatesHasBeenModified = false; 073 private String referenceValidationPattern; 074 private boolean referenceValidationPatternHasBeenModified = false; 075 private Long fromTime; 076 private boolean fromTimeHasBeenModified = false; 077 private Long thruTime; 078 private boolean thruTimeHasBeenModified = false; 079 080 private transient Integer _hashCode = null; 081 private transient String _stringValue = null; 082 083 private void constructFields(PartyPK partyPK, String customerName, CustomerTypePK customerTypePK, OfferUsePK initialOfferUsePK, CancellationPolicyPK cancellationPolicyPK, ReturnPolicyPK returnPolicyPK, GlAccountPK arGlAccountPK, Boolean holdUntilComplete, Boolean allowBackorders, Boolean allowSubstitutions, Boolean allowCombiningShipments, Boolean requireReference, Boolean allowReferenceDuplicates, String referenceValidationPattern, Long fromTime, Long thruTime) 084 throws PersistenceNotNullException { 085 checkForNull(partyPK); 086 this.partyPK = partyPK; 087 checkForNull(customerName); 088 this.customerName = customerName; 089 checkForNull(customerTypePK); 090 this.customerTypePK = customerTypePK; 091 checkForNull(initialOfferUsePK); 092 this.initialOfferUsePK = initialOfferUsePK; 093 this.cancellationPolicyPK = cancellationPolicyPK; 094 this.returnPolicyPK = returnPolicyPK; 095 this.arGlAccountPK = arGlAccountPK; 096 checkForNull(holdUntilComplete); 097 this.holdUntilComplete = holdUntilComplete; 098 checkForNull(allowBackorders); 099 this.allowBackorders = allowBackorders; 100 checkForNull(allowSubstitutions); 101 this.allowSubstitutions = allowSubstitutions; 102 checkForNull(allowCombiningShipments); 103 this.allowCombiningShipments = allowCombiningShipments; 104 checkForNull(requireReference); 105 this.requireReference = requireReference; 106 checkForNull(allowReferenceDuplicates); 107 this.allowReferenceDuplicates = allowReferenceDuplicates; 108 this.referenceValidationPattern = referenceValidationPattern; 109 checkForNull(fromTime); 110 this.fromTime = fromTime; 111 checkForNull(thruTime); 112 this.thruTime = thruTime; 113 } 114 115 /** Creates a new instance of CustomerValue */ 116 public CustomerValue(CustomerPK customerPK, PartyPK partyPK, String customerName, CustomerTypePK customerTypePK, OfferUsePK initialOfferUsePK, CancellationPolicyPK cancellationPolicyPK, ReturnPolicyPK returnPolicyPK, GlAccountPK arGlAccountPK, Boolean holdUntilComplete, Boolean allowBackorders, Boolean allowSubstitutions, Boolean allowCombiningShipments, Boolean requireReference, Boolean allowReferenceDuplicates, String referenceValidationPattern, Long fromTime, Long thruTime) 117 throws PersistenceNotNullException { 118 super(customerPK); 119 constructFields(partyPK, customerName, customerTypePK, initialOfferUsePK, cancellationPolicyPK, returnPolicyPK, arGlAccountPK, holdUntilComplete, allowBackorders, allowSubstitutions, allowCombiningShipments, requireReference, allowReferenceDuplicates, referenceValidationPattern, fromTime, thruTime); 120 } 121 122 /** Creates a new instance of CustomerValue */ 123 public CustomerValue(PartyPK partyPK, String customerName, CustomerTypePK customerTypePK, OfferUsePK initialOfferUsePK, CancellationPolicyPK cancellationPolicyPK, ReturnPolicyPK returnPolicyPK, GlAccountPK arGlAccountPK, Boolean holdUntilComplete, Boolean allowBackorders, Boolean allowSubstitutions, Boolean allowCombiningShipments, Boolean requireReference, Boolean allowReferenceDuplicates, String referenceValidationPattern, Long fromTime, Long thruTime) 124 throws PersistenceNotNullException { 125 super(); 126 constructFields(partyPK, customerName, customerTypePK, initialOfferUsePK, cancellationPolicyPK, returnPolicyPK, arGlAccountPK, holdUntilComplete, allowBackorders, allowSubstitutions, allowCombiningShipments, requireReference, allowReferenceDuplicates, referenceValidationPattern, fromTime, thruTime); 127 } 128 129 @Override 130 public CustomerFactory getBaseFactoryInstance() { 131 return CustomerFactory.getInstance(); 132 } 133 134 @Override 135 public CustomerValue clone() { 136 Object result; 137 138 try { 139 result = super.clone(); 140 } catch (CloneNotSupportedException cnse) { 141 // This shouldn't happen, fail when it does. 142 throw new PersistenceCloneException(cnse); 143 } 144 145 return (CustomerValue)result; 146 } 147 148 @Override 149 public CustomerPK getPrimaryKey() { 150 if(_primaryKey == null) { 151 _primaryKey = new CustomerPK(entityId); 152 } 153 154 return _primaryKey; 155 } 156 157 private void clearHashAndString() { 158 _hashCode = null; 159 _stringValue = null; 160 } 161 162 @Override 163 public int hashCode() { 164 if(_hashCode == null) { 165 int hashCode = 17; 166 167 hashCode = 37 * hashCode + ((entityId != null) ? entityId.hashCode() : 0); 168 169 hashCode = 37 * hashCode + ((partyPK != null) ? partyPK.hashCode() : 0); 170 hashCode = 37 * hashCode + ((customerName != null) ? customerName.hashCode() : 0); 171 hashCode = 37 * hashCode + ((customerTypePK != null) ? customerTypePK.hashCode() : 0); 172 hashCode = 37 * hashCode + ((initialOfferUsePK != null) ? initialOfferUsePK.hashCode() : 0); 173 hashCode = 37 * hashCode + ((cancellationPolicyPK != null) ? cancellationPolicyPK.hashCode() : 0); 174 hashCode = 37 * hashCode + ((returnPolicyPK != null) ? returnPolicyPK.hashCode() : 0); 175 hashCode = 37 * hashCode + ((arGlAccountPK != null) ? arGlAccountPK.hashCode() : 0); 176 hashCode = 37 * hashCode + ((holdUntilComplete != null) ? holdUntilComplete.hashCode() : 0); 177 hashCode = 37 * hashCode + ((allowBackorders != null) ? allowBackorders.hashCode() : 0); 178 hashCode = 37 * hashCode + ((allowSubstitutions != null) ? allowSubstitutions.hashCode() : 0); 179 hashCode = 37 * hashCode + ((allowCombiningShipments != null) ? allowCombiningShipments.hashCode() : 0); 180 hashCode = 37 * hashCode + ((requireReference != null) ? requireReference.hashCode() : 0); 181 hashCode = 37 * hashCode + ((allowReferenceDuplicates != null) ? allowReferenceDuplicates.hashCode() : 0); 182 hashCode = 37 * hashCode + ((referenceValidationPattern != null) ? referenceValidationPattern.hashCode() : 0); 183 hashCode = 37 * hashCode + ((fromTime != null) ? fromTime.hashCode() : 0); 184 hashCode = 37 * hashCode + ((thruTime != null) ? thruTime.hashCode() : 0); 185 186 _hashCode = hashCode; 187 } 188 189 return _hashCode; 190 } 191 192 @Override 193 public String toString() { 194 if(_stringValue == null) { 195 StringBuilder stringValue = new StringBuilder("{"); 196 197 stringValue.append("entityId=").append(getEntityId()); 198 199 stringValue.append(", partyPK=").append(getPartyPK()); 200 stringValue.append(", customerName=").append(getCustomerName()); 201 stringValue.append(", customerTypePK=").append(getCustomerTypePK()); 202 stringValue.append(", initialOfferUsePK=").append(getInitialOfferUsePK()); 203 stringValue.append(", cancellationPolicyPK=").append(getCancellationPolicyPK()); 204 stringValue.append(", returnPolicyPK=").append(getReturnPolicyPK()); 205 stringValue.append(", arGlAccountPK=").append(getArGlAccountPK()); 206 stringValue.append(", holdUntilComplete=").append(getHoldUntilComplete()); 207 stringValue.append(", allowBackorders=").append(getAllowBackorders()); 208 stringValue.append(", allowSubstitutions=").append(getAllowSubstitutions()); 209 stringValue.append(", allowCombiningShipments=").append(getAllowCombiningShipments()); 210 stringValue.append(", requireReference=").append(getRequireReference()); 211 stringValue.append(", allowReferenceDuplicates=").append(getAllowReferenceDuplicates()); 212 stringValue.append(", referenceValidationPattern=").append(getReferenceValidationPattern()); 213 stringValue.append(", fromTime=").append(getFromTime()); 214 stringValue.append(", thruTime=").append(getThruTime()); 215 216 stringValue.append('}'); 217 218 _stringValue = stringValue.toString(); 219 } 220 return _stringValue; 221 } 222 223 @Override 224 public boolean equals(Object other) { 225 if(this == other) 226 return true; 227 228 if(!hasIdentity()) 229 return false; 230 231 if(other instanceof CustomerValue) { 232 CustomerValue that = (CustomerValue)other; 233 234 if(!that.hasIdentity()) 235 return false; 236 237 Long thisEntityId = getEntityId(); 238 Long thatEntityId = that.getEntityId(); 239 240 boolean objectsEqual = thisEntityId.equals(thatEntityId); 241 if(objectsEqual) 242 objectsEqual = objectsEqual && isIdentical(that); 243 244 return objectsEqual; 245 } else { 246 return false; 247 } 248 } 249 250 public boolean isIdentical(Object other) { 251 if(other instanceof CustomerValue) { 252 CustomerValue that = (CustomerValue)other; 253 boolean objectsEqual = true; 254 255 256 if(objectsEqual) { 257 PartyPK thisPartyPK = getPartyPK(); 258 PartyPK thatPartyPK = that.getPartyPK(); 259 260 if(thisPartyPK == null) { 261 objectsEqual = objectsEqual && (thatPartyPK == null); 262 } else { 263 objectsEqual = objectsEqual && thisPartyPK.equals(thatPartyPK); 264 } 265 } 266 267 if(objectsEqual) { 268 String thisCustomerName = getCustomerName(); 269 String thatCustomerName = that.getCustomerName(); 270 271 if(thisCustomerName == null) { 272 objectsEqual = objectsEqual && (thatCustomerName == null); 273 } else { 274 objectsEqual = objectsEqual && thisCustomerName.equals(thatCustomerName); 275 } 276 } 277 278 if(objectsEqual) { 279 CustomerTypePK thisCustomerTypePK = getCustomerTypePK(); 280 CustomerTypePK thatCustomerTypePK = that.getCustomerTypePK(); 281 282 if(thisCustomerTypePK == null) { 283 objectsEqual = objectsEqual && (thatCustomerTypePK == null); 284 } else { 285 objectsEqual = objectsEqual && thisCustomerTypePK.equals(thatCustomerTypePK); 286 } 287 } 288 289 if(objectsEqual) { 290 OfferUsePK thisInitialOfferUsePK = getInitialOfferUsePK(); 291 OfferUsePK thatInitialOfferUsePK = that.getInitialOfferUsePK(); 292 293 if(thisInitialOfferUsePK == null) { 294 objectsEqual = objectsEqual && (thatInitialOfferUsePK == null); 295 } else { 296 objectsEqual = objectsEqual && thisInitialOfferUsePK.equals(thatInitialOfferUsePK); 297 } 298 } 299 300 if(objectsEqual) { 301 CancellationPolicyPK thisCancellationPolicyPK = getCancellationPolicyPK(); 302 CancellationPolicyPK thatCancellationPolicyPK = that.getCancellationPolicyPK(); 303 304 if(thisCancellationPolicyPK == null) { 305 objectsEqual = objectsEqual && (thatCancellationPolicyPK == null); 306 } else { 307 objectsEqual = objectsEqual && thisCancellationPolicyPK.equals(thatCancellationPolicyPK); 308 } 309 } 310 311 if(objectsEqual) { 312 ReturnPolicyPK thisReturnPolicyPK = getReturnPolicyPK(); 313 ReturnPolicyPK thatReturnPolicyPK = that.getReturnPolicyPK(); 314 315 if(thisReturnPolicyPK == null) { 316 objectsEqual = objectsEqual && (thatReturnPolicyPK == null); 317 } else { 318 objectsEqual = objectsEqual && thisReturnPolicyPK.equals(thatReturnPolicyPK); 319 } 320 } 321 322 if(objectsEqual) { 323 GlAccountPK thisArGlAccountPK = getArGlAccountPK(); 324 GlAccountPK thatArGlAccountPK = that.getArGlAccountPK(); 325 326 if(thisArGlAccountPK == null) { 327 objectsEqual = objectsEqual && (thatArGlAccountPK == null); 328 } else { 329 objectsEqual = objectsEqual && thisArGlAccountPK.equals(thatArGlAccountPK); 330 } 331 } 332 333 if(objectsEqual) { 334 Boolean thisHoldUntilComplete = getHoldUntilComplete(); 335 Boolean thatHoldUntilComplete = that.getHoldUntilComplete(); 336 337 if(thisHoldUntilComplete == null) { 338 objectsEqual = objectsEqual && (thatHoldUntilComplete == null); 339 } else { 340 objectsEqual = objectsEqual && thisHoldUntilComplete.equals(thatHoldUntilComplete); 341 } 342 } 343 344 if(objectsEqual) { 345 Boolean thisAllowBackorders = getAllowBackorders(); 346 Boolean thatAllowBackorders = that.getAllowBackorders(); 347 348 if(thisAllowBackorders == null) { 349 objectsEqual = objectsEqual && (thatAllowBackorders == null); 350 } else { 351 objectsEqual = objectsEqual && thisAllowBackorders.equals(thatAllowBackorders); 352 } 353 } 354 355 if(objectsEqual) { 356 Boolean thisAllowSubstitutions = getAllowSubstitutions(); 357 Boolean thatAllowSubstitutions = that.getAllowSubstitutions(); 358 359 if(thisAllowSubstitutions == null) { 360 objectsEqual = objectsEqual && (thatAllowSubstitutions == null); 361 } else { 362 objectsEqual = objectsEqual && thisAllowSubstitutions.equals(thatAllowSubstitutions); 363 } 364 } 365 366 if(objectsEqual) { 367 Boolean thisAllowCombiningShipments = getAllowCombiningShipments(); 368 Boolean thatAllowCombiningShipments = that.getAllowCombiningShipments(); 369 370 if(thisAllowCombiningShipments == null) { 371 objectsEqual = objectsEqual && (thatAllowCombiningShipments == null); 372 } else { 373 objectsEqual = objectsEqual && thisAllowCombiningShipments.equals(thatAllowCombiningShipments); 374 } 375 } 376 377 if(objectsEqual) { 378 Boolean thisRequireReference = getRequireReference(); 379 Boolean thatRequireReference = that.getRequireReference(); 380 381 if(thisRequireReference == null) { 382 objectsEqual = objectsEqual && (thatRequireReference == null); 383 } else { 384 objectsEqual = objectsEqual && thisRequireReference.equals(thatRequireReference); 385 } 386 } 387 388 if(objectsEqual) { 389 Boolean thisAllowReferenceDuplicates = getAllowReferenceDuplicates(); 390 Boolean thatAllowReferenceDuplicates = that.getAllowReferenceDuplicates(); 391 392 if(thisAllowReferenceDuplicates == null) { 393 objectsEqual = objectsEqual && (thatAllowReferenceDuplicates == null); 394 } else { 395 objectsEqual = objectsEqual && thisAllowReferenceDuplicates.equals(thatAllowReferenceDuplicates); 396 } 397 } 398 399 if(objectsEqual) { 400 String thisReferenceValidationPattern = getReferenceValidationPattern(); 401 String thatReferenceValidationPattern = that.getReferenceValidationPattern(); 402 403 if(thisReferenceValidationPattern == null) { 404 objectsEqual = objectsEqual && (thatReferenceValidationPattern == null); 405 } else { 406 objectsEqual = objectsEqual && thisReferenceValidationPattern.equals(thatReferenceValidationPattern); 407 } 408 } 409 410 if(objectsEqual) { 411 Long thisFromTime = getFromTime(); 412 Long thatFromTime = that.getFromTime(); 413 414 if(thisFromTime == null) { 415 objectsEqual = objectsEqual && (thatFromTime == null); 416 } else { 417 objectsEqual = objectsEqual && thisFromTime.equals(thatFromTime); 418 } 419 } 420 421 if(objectsEqual) { 422 Long thisThruTime = getThruTime(); 423 Long thatThruTime = that.getThruTime(); 424 425 if(thisThruTime == null) { 426 objectsEqual = objectsEqual && (thatThruTime == null); 427 } else { 428 objectsEqual = objectsEqual && thisThruTime.equals(thatThruTime); 429 } 430 } 431 432 return objectsEqual; 433 } else { 434 return false; 435 } 436 } 437 438 @Override 439 public boolean hasBeenModified() { 440 return partyPKHasBeenModified || customerNameHasBeenModified || customerTypePKHasBeenModified || initialOfferUsePKHasBeenModified || cancellationPolicyPKHasBeenModified || returnPolicyPKHasBeenModified || arGlAccountPKHasBeenModified || holdUntilCompleteHasBeenModified || allowBackordersHasBeenModified || allowSubstitutionsHasBeenModified || allowCombiningShipmentsHasBeenModified || requireReferenceHasBeenModified || allowReferenceDuplicatesHasBeenModified || referenceValidationPatternHasBeenModified || fromTimeHasBeenModified || thruTimeHasBeenModified; 441 } 442 443 @Override 444 public void clearHasBeenModified() { 445 partyPKHasBeenModified = false; 446 customerNameHasBeenModified = false; 447 customerTypePKHasBeenModified = false; 448 initialOfferUsePKHasBeenModified = false; 449 cancellationPolicyPKHasBeenModified = false; 450 returnPolicyPKHasBeenModified = false; 451 arGlAccountPKHasBeenModified = false; 452 holdUntilCompleteHasBeenModified = false; 453 allowBackordersHasBeenModified = false; 454 allowSubstitutionsHasBeenModified = false; 455 allowCombiningShipmentsHasBeenModified = false; 456 requireReferenceHasBeenModified = false; 457 allowReferenceDuplicatesHasBeenModified = false; 458 referenceValidationPatternHasBeenModified = false; 459 fromTimeHasBeenModified = false; 460 thruTimeHasBeenModified = false; 461 } 462 463 public PartyPK getPartyPK() { 464 return partyPK; 465 } 466 467 public void setPartyPK(PartyPK partyPK) 468 throws PersistenceNotNullException { 469 checkForNull(partyPK); 470 471 boolean update = true; 472 473 if(this.partyPK != null) { 474 if(this.partyPK.equals(partyPK)) { 475 update = false; 476 } 477 } else if(partyPK == null) { 478 update = false; 479 } 480 481 if(update) { 482 this.partyPK = partyPK; 483 partyPKHasBeenModified = true; 484 clearHashAndString(); 485 } 486 } 487 488 public boolean getPartyPKHasBeenModified() { 489 return partyPKHasBeenModified; 490 } 491 492 public String getCustomerName() { 493 return customerName; 494 } 495 496 public void setCustomerName(String customerName) 497 throws PersistenceNotNullException { 498 checkForNull(customerName); 499 500 boolean update = true; 501 502 if(this.customerName != null) { 503 if(this.customerName.equals(customerName)) { 504 update = false; 505 } 506 } else if(customerName == null) { 507 update = false; 508 } 509 510 if(update) { 511 this.customerName = customerName; 512 customerNameHasBeenModified = true; 513 clearHashAndString(); 514 } 515 } 516 517 public boolean getCustomerNameHasBeenModified() { 518 return customerNameHasBeenModified; 519 } 520 521 public CustomerTypePK getCustomerTypePK() { 522 return customerTypePK; 523 } 524 525 public void setCustomerTypePK(CustomerTypePK customerTypePK) 526 throws PersistenceNotNullException { 527 checkForNull(customerTypePK); 528 529 boolean update = true; 530 531 if(this.customerTypePK != null) { 532 if(this.customerTypePK.equals(customerTypePK)) { 533 update = false; 534 } 535 } else if(customerTypePK == null) { 536 update = false; 537 } 538 539 if(update) { 540 this.customerTypePK = customerTypePK; 541 customerTypePKHasBeenModified = true; 542 clearHashAndString(); 543 } 544 } 545 546 public boolean getCustomerTypePKHasBeenModified() { 547 return customerTypePKHasBeenModified; 548 } 549 550 public OfferUsePK getInitialOfferUsePK() { 551 return initialOfferUsePK; 552 } 553 554 public void setInitialOfferUsePK(OfferUsePK initialOfferUsePK) 555 throws PersistenceNotNullException { 556 checkForNull(initialOfferUsePK); 557 558 boolean update = true; 559 560 if(this.initialOfferUsePK != null) { 561 if(this.initialOfferUsePK.equals(initialOfferUsePK)) { 562 update = false; 563 } 564 } else if(initialOfferUsePK == null) { 565 update = false; 566 } 567 568 if(update) { 569 this.initialOfferUsePK = initialOfferUsePK; 570 initialOfferUsePKHasBeenModified = true; 571 clearHashAndString(); 572 } 573 } 574 575 public boolean getInitialOfferUsePKHasBeenModified() { 576 return initialOfferUsePKHasBeenModified; 577 } 578 579 public CancellationPolicyPK getCancellationPolicyPK() { 580 return cancellationPolicyPK; 581 } 582 583 public void setCancellationPolicyPK(CancellationPolicyPK cancellationPolicyPK) { 584 boolean update = true; 585 586 if(this.cancellationPolicyPK != null) { 587 if(this.cancellationPolicyPK.equals(cancellationPolicyPK)) { 588 update = false; 589 } 590 } else if(cancellationPolicyPK == null) { 591 update = false; 592 } 593 594 if(update) { 595 this.cancellationPolicyPK = cancellationPolicyPK; 596 cancellationPolicyPKHasBeenModified = true; 597 clearHashAndString(); 598 } 599 } 600 601 public boolean getCancellationPolicyPKHasBeenModified() { 602 return cancellationPolicyPKHasBeenModified; 603 } 604 605 public ReturnPolicyPK getReturnPolicyPK() { 606 return returnPolicyPK; 607 } 608 609 public void setReturnPolicyPK(ReturnPolicyPK returnPolicyPK) { 610 boolean update = true; 611 612 if(this.returnPolicyPK != null) { 613 if(this.returnPolicyPK.equals(returnPolicyPK)) { 614 update = false; 615 } 616 } else if(returnPolicyPK == null) { 617 update = false; 618 } 619 620 if(update) { 621 this.returnPolicyPK = returnPolicyPK; 622 returnPolicyPKHasBeenModified = true; 623 clearHashAndString(); 624 } 625 } 626 627 public boolean getReturnPolicyPKHasBeenModified() { 628 return returnPolicyPKHasBeenModified; 629 } 630 631 public GlAccountPK getArGlAccountPK() { 632 return arGlAccountPK; 633 } 634 635 public void setArGlAccountPK(GlAccountPK arGlAccountPK) { 636 boolean update = true; 637 638 if(this.arGlAccountPK != null) { 639 if(this.arGlAccountPK.equals(arGlAccountPK)) { 640 update = false; 641 } 642 } else if(arGlAccountPK == null) { 643 update = false; 644 } 645 646 if(update) { 647 this.arGlAccountPK = arGlAccountPK; 648 arGlAccountPKHasBeenModified = true; 649 clearHashAndString(); 650 } 651 } 652 653 public boolean getArGlAccountPKHasBeenModified() { 654 return arGlAccountPKHasBeenModified; 655 } 656 657 public Boolean getHoldUntilComplete() { 658 return holdUntilComplete; 659 } 660 661 public void setHoldUntilComplete(Boolean holdUntilComplete) 662 throws PersistenceNotNullException { 663 checkForNull(holdUntilComplete); 664 665 boolean update = true; 666 667 if(this.holdUntilComplete != null) { 668 if(this.holdUntilComplete.equals(holdUntilComplete)) { 669 update = false; 670 } 671 } else if(holdUntilComplete == null) { 672 update = false; 673 } 674 675 if(update) { 676 this.holdUntilComplete = holdUntilComplete; 677 holdUntilCompleteHasBeenModified = true; 678 clearHashAndString(); 679 } 680 } 681 682 public boolean getHoldUntilCompleteHasBeenModified() { 683 return holdUntilCompleteHasBeenModified; 684 } 685 686 public Boolean getAllowBackorders() { 687 return allowBackorders; 688 } 689 690 public void setAllowBackorders(Boolean allowBackorders) 691 throws PersistenceNotNullException { 692 checkForNull(allowBackorders); 693 694 boolean update = true; 695 696 if(this.allowBackorders != null) { 697 if(this.allowBackorders.equals(allowBackorders)) { 698 update = false; 699 } 700 } else if(allowBackorders == null) { 701 update = false; 702 } 703 704 if(update) { 705 this.allowBackorders = allowBackorders; 706 allowBackordersHasBeenModified = true; 707 clearHashAndString(); 708 } 709 } 710 711 public boolean getAllowBackordersHasBeenModified() { 712 return allowBackordersHasBeenModified; 713 } 714 715 public Boolean getAllowSubstitutions() { 716 return allowSubstitutions; 717 } 718 719 public void setAllowSubstitutions(Boolean allowSubstitutions) 720 throws PersistenceNotNullException { 721 checkForNull(allowSubstitutions); 722 723 boolean update = true; 724 725 if(this.allowSubstitutions != null) { 726 if(this.allowSubstitutions.equals(allowSubstitutions)) { 727 update = false; 728 } 729 } else if(allowSubstitutions == null) { 730 update = false; 731 } 732 733 if(update) { 734 this.allowSubstitutions = allowSubstitutions; 735 allowSubstitutionsHasBeenModified = true; 736 clearHashAndString(); 737 } 738 } 739 740 public boolean getAllowSubstitutionsHasBeenModified() { 741 return allowSubstitutionsHasBeenModified; 742 } 743 744 public Boolean getAllowCombiningShipments() { 745 return allowCombiningShipments; 746 } 747 748 public void setAllowCombiningShipments(Boolean allowCombiningShipments) 749 throws PersistenceNotNullException { 750 checkForNull(allowCombiningShipments); 751 752 boolean update = true; 753 754 if(this.allowCombiningShipments != null) { 755 if(this.allowCombiningShipments.equals(allowCombiningShipments)) { 756 update = false; 757 } 758 } else if(allowCombiningShipments == null) { 759 update = false; 760 } 761 762 if(update) { 763 this.allowCombiningShipments = allowCombiningShipments; 764 allowCombiningShipmentsHasBeenModified = true; 765 clearHashAndString(); 766 } 767 } 768 769 public boolean getAllowCombiningShipmentsHasBeenModified() { 770 return allowCombiningShipmentsHasBeenModified; 771 } 772 773 public Boolean getRequireReference() { 774 return requireReference; 775 } 776 777 public void setRequireReference(Boolean requireReference) 778 throws PersistenceNotNullException { 779 checkForNull(requireReference); 780 781 boolean update = true; 782 783 if(this.requireReference != null) { 784 if(this.requireReference.equals(requireReference)) { 785 update = false; 786 } 787 } else if(requireReference == null) { 788 update = false; 789 } 790 791 if(update) { 792 this.requireReference = requireReference; 793 requireReferenceHasBeenModified = true; 794 clearHashAndString(); 795 } 796 } 797 798 public boolean getRequireReferenceHasBeenModified() { 799 return requireReferenceHasBeenModified; 800 } 801 802 public Boolean getAllowReferenceDuplicates() { 803 return allowReferenceDuplicates; 804 } 805 806 public void setAllowReferenceDuplicates(Boolean allowReferenceDuplicates) 807 throws PersistenceNotNullException { 808 checkForNull(allowReferenceDuplicates); 809 810 boolean update = true; 811 812 if(this.allowReferenceDuplicates != null) { 813 if(this.allowReferenceDuplicates.equals(allowReferenceDuplicates)) { 814 update = false; 815 } 816 } else if(allowReferenceDuplicates == null) { 817 update = false; 818 } 819 820 if(update) { 821 this.allowReferenceDuplicates = allowReferenceDuplicates; 822 allowReferenceDuplicatesHasBeenModified = true; 823 clearHashAndString(); 824 } 825 } 826 827 public boolean getAllowReferenceDuplicatesHasBeenModified() { 828 return allowReferenceDuplicatesHasBeenModified; 829 } 830 831 public String getReferenceValidationPattern() { 832 return referenceValidationPattern; 833 } 834 835 public void setReferenceValidationPattern(String referenceValidationPattern) { 836 boolean update = true; 837 838 if(this.referenceValidationPattern != null) { 839 if(this.referenceValidationPattern.equals(referenceValidationPattern)) { 840 update = false; 841 } 842 } else if(referenceValidationPattern == null) { 843 update = false; 844 } 845 846 if(update) { 847 this.referenceValidationPattern = referenceValidationPattern; 848 referenceValidationPatternHasBeenModified = true; 849 clearHashAndString(); 850 } 851 } 852 853 public boolean getReferenceValidationPatternHasBeenModified() { 854 return referenceValidationPatternHasBeenModified; 855 } 856 857 public Long getFromTime() { 858 return fromTime; 859 } 860 861 public void setFromTime(Long fromTime) 862 throws PersistenceNotNullException { 863 checkForNull(fromTime); 864 865 boolean update = true; 866 867 if(this.fromTime != null) { 868 if(this.fromTime.equals(fromTime)) { 869 update = false; 870 } 871 } else if(fromTime == null) { 872 update = false; 873 } 874 875 if(update) { 876 this.fromTime = fromTime; 877 fromTimeHasBeenModified = true; 878 clearHashAndString(); 879 } 880 } 881 882 public boolean getFromTimeHasBeenModified() { 883 return fromTimeHasBeenModified; 884 } 885 886 public Long getThruTime() { 887 return thruTime; 888 } 889 890 public void setThruTime(Long thruTime) 891 throws PersistenceNotNullException { 892 checkForNull(thruTime); 893 894 boolean update = true; 895 896 if(this.thruTime != null) { 897 if(this.thruTime.equals(thruTime)) { 898 update = false; 899 } 900 } else if(thruTime == null) { 901 update = false; 902 } 903 904 if(update) { 905 this.thruTime = thruTime; 906 thruTimeHasBeenModified = true; 907 clearHashAndString(); 908 } 909 } 910 911 public boolean getThruTimeHasBeenModified() { 912 return thruTimeHasBeenModified; 913 } 914 915}