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