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 * OrderDetailValue.java 021 */ 022 023package com.echothree.model.data.order.server.value; 024 025import com.echothree.model.data.order.common.pk.OrderDetailPK; 026 027import com.echothree.model.data.order.server.factory.OrderDetailFactory; 028 029import com.echothree.model.data.order.common.pk.OrderPK; 030import com.echothree.model.data.order.common.pk.OrderTypePK; 031import com.echothree.model.data.order.common.pk.OrderPriorityPK; 032import com.echothree.model.data.accounting.common.pk.CurrencyPK; 033import com.echothree.model.data.term.common.pk.TermPK; 034import com.echothree.model.data.shipment.common.pk.FreeOnBoardPK; 035import com.echothree.model.data.cancellationpolicy.common.pk.CancellationPolicyPK; 036import com.echothree.model.data.returnpolicy.common.pk.ReturnPolicyPK; 037 038import com.echothree.util.common.exception.PersistenceCloneException; 039import com.echothree.util.common.exception.PersistenceNotNullException; 040 041import com.echothree.util.server.persistence.BaseValue; 042 043import java.io.Serializable; 044 045import javax.annotation.Nonnull; 046import javax.annotation.Nullable; 047 048public class OrderDetailValue 049 extends BaseValue<OrderDetailPK> 050 implements Cloneable, Serializable { 051 052 private OrderPK orderPK; 053 private boolean orderPKHasBeenModified = false; 054 private OrderTypePK orderTypePK; 055 private boolean orderTypePKHasBeenModified = false; 056 private String orderName; 057 private boolean orderNameHasBeenModified = false; 058 private OrderPriorityPK orderPriorityPK; 059 private boolean orderPriorityPKHasBeenModified = false; 060 private CurrencyPK currencyPK; 061 private boolean currencyPKHasBeenModified = false; 062 private Boolean holdUntilComplete; 063 private boolean holdUntilCompleteHasBeenModified = false; 064 private Boolean allowBackorders; 065 private boolean allowBackordersHasBeenModified = false; 066 private Boolean allowSubstitutions; 067 private boolean allowSubstitutionsHasBeenModified = false; 068 private Boolean allowCombiningShipments; 069 private boolean allowCombiningShipmentsHasBeenModified = false; 070 private TermPK termPK; 071 private boolean termPKHasBeenModified = false; 072 private FreeOnBoardPK freeOnBoardPK; 073 private boolean freeOnBoardPKHasBeenModified = false; 074 private String reference; 075 private boolean referenceHasBeenModified = false; 076 private String description; 077 private boolean descriptionHasBeenModified = false; 078 private CancellationPolicyPK cancellationPolicyPK; 079 private boolean cancellationPolicyPKHasBeenModified = false; 080 private ReturnPolicyPK returnPolicyPK; 081 private boolean returnPolicyPKHasBeenModified = false; 082 private Boolean taxable; 083 private boolean taxableHasBeenModified = false; 084 private Long fromTime; 085 private boolean fromTimeHasBeenModified = false; 086 private Long thruTime; 087 private boolean thruTimeHasBeenModified = false; 088 089 private transient Integer _hashCode = null; 090 private transient String _stringValue = null; 091 092 private void constructFields(OrderPK orderPK, OrderTypePK orderTypePK, String orderName, OrderPriorityPK orderPriorityPK, CurrencyPK currencyPK, Boolean holdUntilComplete, Boolean allowBackorders, Boolean allowSubstitutions, Boolean allowCombiningShipments, TermPK termPK, FreeOnBoardPK freeOnBoardPK, String reference, String description, CancellationPolicyPK cancellationPolicyPK, ReturnPolicyPK returnPolicyPK, Boolean taxable, Long fromTime, Long thruTime) 093 throws PersistenceNotNullException { 094 checkForNull(orderPK); 095 this.orderPK = orderPK; 096 checkForNull(orderTypePK); 097 this.orderTypePK = orderTypePK; 098 checkForNull(orderName); 099 this.orderName = orderName; 100 this.orderPriorityPK = orderPriorityPK; 101 checkForNull(currencyPK); 102 this.currencyPK = currencyPK; 103 this.holdUntilComplete = holdUntilComplete; 104 this.allowBackorders = allowBackorders; 105 this.allowSubstitutions = allowSubstitutions; 106 this.allowCombiningShipments = allowCombiningShipments; 107 this.termPK = termPK; 108 this.freeOnBoardPK = freeOnBoardPK; 109 this.reference = reference; 110 this.description = description; 111 this.cancellationPolicyPK = cancellationPolicyPK; 112 this.returnPolicyPK = returnPolicyPK; 113 this.taxable = taxable; 114 checkForNull(fromTime); 115 this.fromTime = fromTime; 116 checkForNull(thruTime); 117 this.thruTime = thruTime; 118 } 119 120 /** Creates a new instance of OrderDetailValue */ 121 public OrderDetailValue(OrderDetailPK orderDetailPK, OrderPK orderPK, OrderTypePK orderTypePK, String orderName, OrderPriorityPK orderPriorityPK, CurrencyPK currencyPK, Boolean holdUntilComplete, Boolean allowBackorders, Boolean allowSubstitutions, Boolean allowCombiningShipments, TermPK termPK, FreeOnBoardPK freeOnBoardPK, String reference, String description, CancellationPolicyPK cancellationPolicyPK, ReturnPolicyPK returnPolicyPK, Boolean taxable, Long fromTime, Long thruTime) 122 throws PersistenceNotNullException { 123 super(orderDetailPK); 124 constructFields(orderPK, orderTypePK, orderName, orderPriorityPK, currencyPK, holdUntilComplete, allowBackorders, allowSubstitutions, allowCombiningShipments, termPK, freeOnBoardPK, reference, description, cancellationPolicyPK, returnPolicyPK, taxable, fromTime, thruTime); 125 } 126 127 /** Creates a new instance of OrderDetailValue */ 128 public OrderDetailValue(OrderPK orderPK, OrderTypePK orderTypePK, String orderName, OrderPriorityPK orderPriorityPK, CurrencyPK currencyPK, Boolean holdUntilComplete, Boolean allowBackorders, Boolean allowSubstitutions, Boolean allowCombiningShipments, TermPK termPK, FreeOnBoardPK freeOnBoardPK, String reference, String description, CancellationPolicyPK cancellationPolicyPK, ReturnPolicyPK returnPolicyPK, Boolean taxable, Long fromTime, Long thruTime) 129 throws PersistenceNotNullException { 130 super(); 131 constructFields(orderPK, orderTypePK, orderName, orderPriorityPK, currencyPK, holdUntilComplete, allowBackorders, allowSubstitutions, allowCombiningShipments, termPK, freeOnBoardPK, reference, description, cancellationPolicyPK, returnPolicyPK, taxable, fromTime, thruTime); 132 } 133 134 @Override 135 @Nonnull 136 public OrderDetailFactory getBaseFactoryInstance() { 137 return OrderDetailFactory.getInstance(); 138 } 139 140 @Override 141 @Nonnull 142 public OrderDetailValue clone() { 143 Object result; 144 145 try { 146 result = super.clone(); 147 } catch (CloneNotSupportedException cnse) { 148 // This shouldn't happen, fail when it does. 149 throw new PersistenceCloneException(cnse); 150 } 151 152 return (OrderDetailValue)result; 153 } 154 155 @Override 156 @Nonnull 157 public OrderDetailPK getPrimaryKey() { 158 if(_primaryKey == null) { 159 _primaryKey = new OrderDetailPK(entityId); 160 } 161 162 return _primaryKey; 163 } 164 165 private void clearHashAndString() { 166 _hashCode = null; 167 _stringValue = null; 168 } 169 170 @Override 171 public int hashCode() { 172 if(_hashCode == null) { 173 int hashCode = 17; 174 175 hashCode = 37 * hashCode + ((entityId != null) ? entityId.hashCode() : 0); 176 177 hashCode = 37 * hashCode + ((orderPK != null) ? orderPK.hashCode() : 0); 178 hashCode = 37 * hashCode + ((orderTypePK != null) ? orderTypePK.hashCode() : 0); 179 hashCode = 37 * hashCode + ((orderName != null) ? orderName.hashCode() : 0); 180 hashCode = 37 * hashCode + ((orderPriorityPK != null) ? orderPriorityPK.hashCode() : 0); 181 hashCode = 37 * hashCode + ((currencyPK != null) ? currencyPK.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 + ((termPK != null) ? termPK.hashCode() : 0); 187 hashCode = 37 * hashCode + ((freeOnBoardPK != null) ? freeOnBoardPK.hashCode() : 0); 188 hashCode = 37 * hashCode + ((reference != null) ? reference.hashCode() : 0); 189 hashCode = 37 * hashCode + ((description != null) ? description.hashCode() : 0); 190 hashCode = 37 * hashCode + ((cancellationPolicyPK != null) ? cancellationPolicyPK.hashCode() : 0); 191 hashCode = 37 * hashCode + ((returnPolicyPK != null) ? returnPolicyPK.hashCode() : 0); 192 hashCode = 37 * hashCode + ((taxable != null) ? taxable.hashCode() : 0); 193 hashCode = 37 * hashCode + ((fromTime != null) ? fromTime.hashCode() : 0); 194 hashCode = 37 * hashCode + ((thruTime != null) ? thruTime.hashCode() : 0); 195 196 _hashCode = hashCode; 197 } 198 199 return _hashCode; 200 } 201 202 @Override 203 @Nonnull 204 public String toString() { 205 if(_stringValue == null) { 206 _stringValue = "{" + 207 "entityId=" + getEntityId() + 208 ", orderPK=" + getOrderPK() + 209 ", orderTypePK=" + getOrderTypePK() + 210 ", orderName=" + getOrderName() + 211 ", orderPriorityPK=" + getOrderPriorityPK() + 212 ", currencyPK=" + getCurrencyPK() + 213 ", holdUntilComplete=" + getHoldUntilComplete() + 214 ", allowBackorders=" + getAllowBackorders() + 215 ", allowSubstitutions=" + getAllowSubstitutions() + 216 ", allowCombiningShipments=" + getAllowCombiningShipments() + 217 ", termPK=" + getTermPK() + 218 ", freeOnBoardPK=" + getFreeOnBoardPK() + 219 ", reference=" + getReference() + 220 ", description=" + getDescription() + 221 ", cancellationPolicyPK=" + getCancellationPolicyPK() + 222 ", returnPolicyPK=" + getReturnPolicyPK() + 223 ", taxable=" + getTaxable() + 224 ", fromTime=" + getFromTime() + 225 ", thruTime=" + getThruTime() + 226 "}"; 227 } 228 return _stringValue; 229 } 230 231 @Override 232 public boolean equals(Object other) { 233 if(this == other) 234 return true; 235 236 if(!hasIdentity()) 237 return false; 238 239 if(other instanceof OrderDetailValue that) { 240 if(!that.hasIdentity()) 241 return false; 242 243 Long thisEntityId = getEntityId(); 244 Long thatEntityId = that.getEntityId(); 245 246 boolean objectsEqual = thisEntityId.equals(thatEntityId); 247 if(objectsEqual) 248 objectsEqual = isIdentical(that); 249 250 return objectsEqual; 251 } else { 252 return false; 253 } 254 } 255 256 public boolean isIdentical(Object other) { 257 if(other instanceof OrderDetailValue that) { 258 boolean objectsEqual = true; 259 260 261 if(objectsEqual) { 262 OrderPK thisOrderPK = getOrderPK(); 263 OrderPK thatOrderPK = that.getOrderPK(); 264 265 if(thisOrderPK == null) { 266 objectsEqual = objectsEqual && (thatOrderPK == null); 267 } else { 268 objectsEqual = objectsEqual && thisOrderPK.equals(thatOrderPK); 269 } 270 } 271 272 if(objectsEqual) { 273 OrderTypePK thisOrderTypePK = getOrderTypePK(); 274 OrderTypePK thatOrderTypePK = that.getOrderTypePK(); 275 276 if(thisOrderTypePK == null) { 277 objectsEqual = objectsEqual && (thatOrderTypePK == null); 278 } else { 279 objectsEqual = objectsEqual && thisOrderTypePK.equals(thatOrderTypePK); 280 } 281 } 282 283 if(objectsEqual) { 284 String thisOrderName = getOrderName(); 285 String thatOrderName = that.getOrderName(); 286 287 if(thisOrderName == null) { 288 objectsEqual = objectsEqual && (thatOrderName == null); 289 } else { 290 objectsEqual = objectsEqual && thisOrderName.equals(thatOrderName); 291 } 292 } 293 294 if(objectsEqual) { 295 OrderPriorityPK thisOrderPriorityPK = getOrderPriorityPK(); 296 OrderPriorityPK thatOrderPriorityPK = that.getOrderPriorityPK(); 297 298 if(thisOrderPriorityPK == null) { 299 objectsEqual = objectsEqual && (thatOrderPriorityPK == null); 300 } else { 301 objectsEqual = objectsEqual && thisOrderPriorityPK.equals(thatOrderPriorityPK); 302 } 303 } 304 305 if(objectsEqual) { 306 CurrencyPK thisCurrencyPK = getCurrencyPK(); 307 CurrencyPK thatCurrencyPK = that.getCurrencyPK(); 308 309 if(thisCurrencyPK == null) { 310 objectsEqual = objectsEqual && (thatCurrencyPK == null); 311 } else { 312 objectsEqual = objectsEqual && thisCurrencyPK.equals(thatCurrencyPK); 313 } 314 } 315 316 if(objectsEqual) { 317 Boolean thisHoldUntilComplete = getHoldUntilComplete(); 318 Boolean thatHoldUntilComplete = that.getHoldUntilComplete(); 319 320 if(thisHoldUntilComplete == null) { 321 objectsEqual = objectsEqual && (thatHoldUntilComplete == null); 322 } else { 323 objectsEqual = objectsEqual && thisHoldUntilComplete.equals(thatHoldUntilComplete); 324 } 325 } 326 327 if(objectsEqual) { 328 Boolean thisAllowBackorders = getAllowBackorders(); 329 Boolean thatAllowBackorders = that.getAllowBackorders(); 330 331 if(thisAllowBackorders == null) { 332 objectsEqual = objectsEqual && (thatAllowBackorders == null); 333 } else { 334 objectsEqual = objectsEqual && thisAllowBackorders.equals(thatAllowBackorders); 335 } 336 } 337 338 if(objectsEqual) { 339 Boolean thisAllowSubstitutions = getAllowSubstitutions(); 340 Boolean thatAllowSubstitutions = that.getAllowSubstitutions(); 341 342 if(thisAllowSubstitutions == null) { 343 objectsEqual = objectsEqual && (thatAllowSubstitutions == null); 344 } else { 345 objectsEqual = objectsEqual && thisAllowSubstitutions.equals(thatAllowSubstitutions); 346 } 347 } 348 349 if(objectsEqual) { 350 Boolean thisAllowCombiningShipments = getAllowCombiningShipments(); 351 Boolean thatAllowCombiningShipments = that.getAllowCombiningShipments(); 352 353 if(thisAllowCombiningShipments == null) { 354 objectsEqual = objectsEqual && (thatAllowCombiningShipments == null); 355 } else { 356 objectsEqual = objectsEqual && thisAllowCombiningShipments.equals(thatAllowCombiningShipments); 357 } 358 } 359 360 if(objectsEqual) { 361 TermPK thisTermPK = getTermPK(); 362 TermPK thatTermPK = that.getTermPK(); 363 364 if(thisTermPK == null) { 365 objectsEqual = objectsEqual && (thatTermPK == null); 366 } else { 367 objectsEqual = objectsEqual && thisTermPK.equals(thatTermPK); 368 } 369 } 370 371 if(objectsEqual) { 372 FreeOnBoardPK thisFreeOnBoardPK = getFreeOnBoardPK(); 373 FreeOnBoardPK thatFreeOnBoardPK = that.getFreeOnBoardPK(); 374 375 if(thisFreeOnBoardPK == null) { 376 objectsEqual = objectsEqual && (thatFreeOnBoardPK == null); 377 } else { 378 objectsEqual = objectsEqual && thisFreeOnBoardPK.equals(thatFreeOnBoardPK); 379 } 380 } 381 382 if(objectsEqual) { 383 String thisReference = getReference(); 384 String thatReference = that.getReference(); 385 386 if(thisReference == null) { 387 objectsEqual = objectsEqual && (thatReference == null); 388 } else { 389 objectsEqual = objectsEqual && thisReference.equals(thatReference); 390 } 391 } 392 393 if(objectsEqual) { 394 String thisDescription = getDescription(); 395 String thatDescription = that.getDescription(); 396 397 if(thisDescription == null) { 398 objectsEqual = objectsEqual && (thatDescription == null); 399 } else { 400 objectsEqual = objectsEqual && thisDescription.equals(thatDescription); 401 } 402 } 403 404 if(objectsEqual) { 405 CancellationPolicyPK thisCancellationPolicyPK = getCancellationPolicyPK(); 406 CancellationPolicyPK thatCancellationPolicyPK = that.getCancellationPolicyPK(); 407 408 if(thisCancellationPolicyPK == null) { 409 objectsEqual = objectsEqual && (thatCancellationPolicyPK == null); 410 } else { 411 objectsEqual = objectsEqual && thisCancellationPolicyPK.equals(thatCancellationPolicyPK); 412 } 413 } 414 415 if(objectsEqual) { 416 ReturnPolicyPK thisReturnPolicyPK = getReturnPolicyPK(); 417 ReturnPolicyPK thatReturnPolicyPK = that.getReturnPolicyPK(); 418 419 if(thisReturnPolicyPK == null) { 420 objectsEqual = objectsEqual && (thatReturnPolicyPK == null); 421 } else { 422 objectsEqual = objectsEqual && thisReturnPolicyPK.equals(thatReturnPolicyPK); 423 } 424 } 425 426 if(objectsEqual) { 427 Boolean thisTaxable = getTaxable(); 428 Boolean thatTaxable = that.getTaxable(); 429 430 if(thisTaxable == null) { 431 objectsEqual = objectsEqual && (thatTaxable == null); 432 } else { 433 objectsEqual = objectsEqual && thisTaxable.equals(thatTaxable); 434 } 435 } 436 437 if(objectsEqual) { 438 Long thisFromTime = getFromTime(); 439 Long thatFromTime = that.getFromTime(); 440 441 if(thisFromTime == null) { 442 objectsEqual = objectsEqual && (thatFromTime == null); 443 } else { 444 objectsEqual = objectsEqual && thisFromTime.equals(thatFromTime); 445 } 446 } 447 448 if(objectsEqual) { 449 Long thisThruTime = getThruTime(); 450 Long thatThruTime = that.getThruTime(); 451 452 if(thisThruTime == null) { 453 objectsEqual = objectsEqual && (thatThruTime == null); 454 } else { 455 objectsEqual = objectsEqual && thisThruTime.equals(thatThruTime); 456 } 457 } 458 459 return objectsEqual; 460 } else { 461 return false; 462 } 463 } 464 465 @Override 466 public boolean hasBeenModified() { 467 return orderPKHasBeenModified || orderTypePKHasBeenModified || orderNameHasBeenModified || orderPriorityPKHasBeenModified || currencyPKHasBeenModified || holdUntilCompleteHasBeenModified || allowBackordersHasBeenModified || allowSubstitutionsHasBeenModified || allowCombiningShipmentsHasBeenModified || termPKHasBeenModified || freeOnBoardPKHasBeenModified || referenceHasBeenModified || descriptionHasBeenModified || cancellationPolicyPKHasBeenModified || returnPolicyPKHasBeenModified || taxableHasBeenModified || fromTimeHasBeenModified || thruTimeHasBeenModified; 468 } 469 470 @Override 471 public void clearHasBeenModified() { 472 orderPKHasBeenModified = false; 473 orderTypePKHasBeenModified = false; 474 orderNameHasBeenModified = false; 475 orderPriorityPKHasBeenModified = false; 476 currencyPKHasBeenModified = false; 477 holdUntilCompleteHasBeenModified = false; 478 allowBackordersHasBeenModified = false; 479 allowSubstitutionsHasBeenModified = false; 480 allowCombiningShipmentsHasBeenModified = false; 481 termPKHasBeenModified = false; 482 freeOnBoardPKHasBeenModified = false; 483 referenceHasBeenModified = false; 484 descriptionHasBeenModified = false; 485 cancellationPolicyPKHasBeenModified = false; 486 returnPolicyPKHasBeenModified = false; 487 taxableHasBeenModified = false; 488 fromTimeHasBeenModified = false; 489 thruTimeHasBeenModified = false; 490 } 491 492 @Nonnull 493 public OrderPK getOrderPK() { 494 return orderPK; 495 } 496 497 public void setOrderPK(@Nonnull OrderPK orderPK) 498 throws PersistenceNotNullException { 499 checkForNull(orderPK); 500 501 boolean update = true; 502 503 if(this.orderPK != null) { 504 if(this.orderPK.equals(orderPK)) { 505 update = false; 506 } 507 } else if(orderPK == null) { 508 update = false; 509 } 510 511 if(update) { 512 this.orderPK = orderPK; 513 orderPKHasBeenModified = true; 514 clearHashAndString(); 515 } 516 } 517 518 public boolean getOrderPKHasBeenModified() { 519 return orderPKHasBeenModified; 520 } 521 522 @Nonnull 523 public OrderTypePK getOrderTypePK() { 524 return orderTypePK; 525 } 526 527 public void setOrderTypePK(@Nonnull OrderTypePK orderTypePK) 528 throws PersistenceNotNullException { 529 checkForNull(orderTypePK); 530 531 boolean update = true; 532 533 if(this.orderTypePK != null) { 534 if(this.orderTypePK.equals(orderTypePK)) { 535 update = false; 536 } 537 } else if(orderTypePK == null) { 538 update = false; 539 } 540 541 if(update) { 542 this.orderTypePK = orderTypePK; 543 orderTypePKHasBeenModified = true; 544 clearHashAndString(); 545 } 546 } 547 548 public boolean getOrderTypePKHasBeenModified() { 549 return orderTypePKHasBeenModified; 550 } 551 552 @Nonnull 553 public String getOrderName() { 554 return orderName; 555 } 556 557 public void setOrderName(@Nonnull String orderName) 558 throws PersistenceNotNullException { 559 checkForNull(orderName); 560 561 boolean update = true; 562 563 if(this.orderName != null) { 564 if(this.orderName.equals(orderName)) { 565 update = false; 566 } 567 } else if(orderName == null) { 568 update = false; 569 } 570 571 if(update) { 572 this.orderName = orderName; 573 orderNameHasBeenModified = true; 574 clearHashAndString(); 575 } 576 } 577 578 public boolean getOrderNameHasBeenModified() { 579 return orderNameHasBeenModified; 580 } 581 582 @Nullable 583 public OrderPriorityPK getOrderPriorityPK() { 584 return orderPriorityPK; 585 } 586 587 public void setOrderPriorityPK(@Nullable OrderPriorityPK orderPriorityPK) { 588 boolean update = true; 589 590 if(this.orderPriorityPK != null) { 591 if(this.orderPriorityPK.equals(orderPriorityPK)) { 592 update = false; 593 } 594 } else if(orderPriorityPK == null) { 595 update = false; 596 } 597 598 if(update) { 599 this.orderPriorityPK = orderPriorityPK; 600 orderPriorityPKHasBeenModified = true; 601 clearHashAndString(); 602 } 603 } 604 605 public boolean getOrderPriorityPKHasBeenModified() { 606 return orderPriorityPKHasBeenModified; 607 } 608 609 @Nonnull 610 public CurrencyPK getCurrencyPK() { 611 return currencyPK; 612 } 613 614 public void setCurrencyPK(@Nonnull CurrencyPK currencyPK) 615 throws PersistenceNotNullException { 616 checkForNull(currencyPK); 617 618 boolean update = true; 619 620 if(this.currencyPK != null) { 621 if(this.currencyPK.equals(currencyPK)) { 622 update = false; 623 } 624 } else if(currencyPK == null) { 625 update = false; 626 } 627 628 if(update) { 629 this.currencyPK = currencyPK; 630 currencyPKHasBeenModified = true; 631 clearHashAndString(); 632 } 633 } 634 635 public boolean getCurrencyPKHasBeenModified() { 636 return currencyPKHasBeenModified; 637 } 638 639 @Nullable 640 public Boolean getHoldUntilComplete() { 641 return holdUntilComplete; 642 } 643 644 public void setHoldUntilComplete(@Nullable Boolean holdUntilComplete) { 645 boolean update = true; 646 647 if(this.holdUntilComplete != null) { 648 if(this.holdUntilComplete.equals(holdUntilComplete)) { 649 update = false; 650 } 651 } else if(holdUntilComplete == null) { 652 update = false; 653 } 654 655 if(update) { 656 this.holdUntilComplete = holdUntilComplete; 657 holdUntilCompleteHasBeenModified = true; 658 clearHashAndString(); 659 } 660 } 661 662 public boolean getHoldUntilCompleteHasBeenModified() { 663 return holdUntilCompleteHasBeenModified; 664 } 665 666 @Nullable 667 public Boolean getAllowBackorders() { 668 return allowBackorders; 669 } 670 671 public void setAllowBackorders(@Nullable Boolean allowBackorders) { 672 boolean update = true; 673 674 if(this.allowBackorders != null) { 675 if(this.allowBackorders.equals(allowBackorders)) { 676 update = false; 677 } 678 } else if(allowBackorders == null) { 679 update = false; 680 } 681 682 if(update) { 683 this.allowBackorders = allowBackorders; 684 allowBackordersHasBeenModified = true; 685 clearHashAndString(); 686 } 687 } 688 689 public boolean getAllowBackordersHasBeenModified() { 690 return allowBackordersHasBeenModified; 691 } 692 693 @Nullable 694 public Boolean getAllowSubstitutions() { 695 return allowSubstitutions; 696 } 697 698 public void setAllowSubstitutions(@Nullable Boolean allowSubstitutions) { 699 boolean update = true; 700 701 if(this.allowSubstitutions != null) { 702 if(this.allowSubstitutions.equals(allowSubstitutions)) { 703 update = false; 704 } 705 } else if(allowSubstitutions == null) { 706 update = false; 707 } 708 709 if(update) { 710 this.allowSubstitutions = allowSubstitutions; 711 allowSubstitutionsHasBeenModified = true; 712 clearHashAndString(); 713 } 714 } 715 716 public boolean getAllowSubstitutionsHasBeenModified() { 717 return allowSubstitutionsHasBeenModified; 718 } 719 720 @Nullable 721 public Boolean getAllowCombiningShipments() { 722 return allowCombiningShipments; 723 } 724 725 public void setAllowCombiningShipments(@Nullable Boolean allowCombiningShipments) { 726 boolean update = true; 727 728 if(this.allowCombiningShipments != null) { 729 if(this.allowCombiningShipments.equals(allowCombiningShipments)) { 730 update = false; 731 } 732 } else if(allowCombiningShipments == null) { 733 update = false; 734 } 735 736 if(update) { 737 this.allowCombiningShipments = allowCombiningShipments; 738 allowCombiningShipmentsHasBeenModified = true; 739 clearHashAndString(); 740 } 741 } 742 743 public boolean getAllowCombiningShipmentsHasBeenModified() { 744 return allowCombiningShipmentsHasBeenModified; 745 } 746 747 @Nullable 748 public TermPK getTermPK() { 749 return termPK; 750 } 751 752 public void setTermPK(@Nullable TermPK termPK) { 753 boolean update = true; 754 755 if(this.termPK != null) { 756 if(this.termPK.equals(termPK)) { 757 update = false; 758 } 759 } else if(termPK == null) { 760 update = false; 761 } 762 763 if(update) { 764 this.termPK = termPK; 765 termPKHasBeenModified = true; 766 clearHashAndString(); 767 } 768 } 769 770 public boolean getTermPKHasBeenModified() { 771 return termPKHasBeenModified; 772 } 773 774 @Nullable 775 public FreeOnBoardPK getFreeOnBoardPK() { 776 return freeOnBoardPK; 777 } 778 779 public void setFreeOnBoardPK(@Nullable FreeOnBoardPK freeOnBoardPK) { 780 boolean update = true; 781 782 if(this.freeOnBoardPK != null) { 783 if(this.freeOnBoardPK.equals(freeOnBoardPK)) { 784 update = false; 785 } 786 } else if(freeOnBoardPK == null) { 787 update = false; 788 } 789 790 if(update) { 791 this.freeOnBoardPK = freeOnBoardPK; 792 freeOnBoardPKHasBeenModified = true; 793 clearHashAndString(); 794 } 795 } 796 797 public boolean getFreeOnBoardPKHasBeenModified() { 798 return freeOnBoardPKHasBeenModified; 799 } 800 801 @Nullable 802 public String getReference() { 803 return reference; 804 } 805 806 public void setReference(@Nullable String reference) { 807 boolean update = true; 808 809 if(this.reference != null) { 810 if(this.reference.equals(reference)) { 811 update = false; 812 } 813 } else if(reference == null) { 814 update = false; 815 } 816 817 if(update) { 818 this.reference = reference; 819 referenceHasBeenModified = true; 820 clearHashAndString(); 821 } 822 } 823 824 public boolean getReferenceHasBeenModified() { 825 return referenceHasBeenModified; 826 } 827 828 @Nullable 829 public String getDescription() { 830 return description; 831 } 832 833 public void setDescription(@Nullable String description) { 834 boolean update = true; 835 836 if(this.description != null) { 837 if(this.description.equals(description)) { 838 update = false; 839 } 840 } else if(description == null) { 841 update = false; 842 } 843 844 if(update) { 845 this.description = description; 846 descriptionHasBeenModified = true; 847 clearHashAndString(); 848 } 849 } 850 851 public boolean getDescriptionHasBeenModified() { 852 return descriptionHasBeenModified; 853 } 854 855 @Nullable 856 public CancellationPolicyPK getCancellationPolicyPK() { 857 return cancellationPolicyPK; 858 } 859 860 public void setCancellationPolicyPK(@Nullable CancellationPolicyPK cancellationPolicyPK) { 861 boolean update = true; 862 863 if(this.cancellationPolicyPK != null) { 864 if(this.cancellationPolicyPK.equals(cancellationPolicyPK)) { 865 update = false; 866 } 867 } else if(cancellationPolicyPK == null) { 868 update = false; 869 } 870 871 if(update) { 872 this.cancellationPolicyPK = cancellationPolicyPK; 873 cancellationPolicyPKHasBeenModified = true; 874 clearHashAndString(); 875 } 876 } 877 878 public boolean getCancellationPolicyPKHasBeenModified() { 879 return cancellationPolicyPKHasBeenModified; 880 } 881 882 @Nullable 883 public ReturnPolicyPK getReturnPolicyPK() { 884 return returnPolicyPK; 885 } 886 887 public void setReturnPolicyPK(@Nullable ReturnPolicyPK returnPolicyPK) { 888 boolean update = true; 889 890 if(this.returnPolicyPK != null) { 891 if(this.returnPolicyPK.equals(returnPolicyPK)) { 892 update = false; 893 } 894 } else if(returnPolicyPK == null) { 895 update = false; 896 } 897 898 if(update) { 899 this.returnPolicyPK = returnPolicyPK; 900 returnPolicyPKHasBeenModified = true; 901 clearHashAndString(); 902 } 903 } 904 905 public boolean getReturnPolicyPKHasBeenModified() { 906 return returnPolicyPKHasBeenModified; 907 } 908 909 @Nullable 910 public Boolean getTaxable() { 911 return taxable; 912 } 913 914 public void setTaxable(@Nullable Boolean taxable) { 915 boolean update = true; 916 917 if(this.taxable != null) { 918 if(this.taxable.equals(taxable)) { 919 update = false; 920 } 921 } else if(taxable == null) { 922 update = false; 923 } 924 925 if(update) { 926 this.taxable = taxable; 927 taxableHasBeenModified = true; 928 clearHashAndString(); 929 } 930 } 931 932 public boolean getTaxableHasBeenModified() { 933 return taxableHasBeenModified; 934 } 935 936 @Nonnull 937 public Long getFromTime() { 938 return fromTime; 939 } 940 941 public void setFromTime(@Nonnull Long fromTime) 942 throws PersistenceNotNullException { 943 checkForNull(fromTime); 944 945 boolean update = true; 946 947 if(this.fromTime != null) { 948 if(this.fromTime.equals(fromTime)) { 949 update = false; 950 } 951 } else if(fromTime == null) { 952 update = false; 953 } 954 955 if(update) { 956 this.fromTime = fromTime; 957 fromTimeHasBeenModified = true; 958 clearHashAndString(); 959 } 960 } 961 962 public boolean getFromTimeHasBeenModified() { 963 return fromTimeHasBeenModified; 964 } 965 966 @Nonnull 967 public Long getThruTime() { 968 return thruTime; 969 } 970 971 public void setThruTime(@Nonnull Long thruTime) 972 throws PersistenceNotNullException { 973 checkForNull(thruTime); 974 975 boolean update = true; 976 977 if(this.thruTime != null) { 978 if(this.thruTime.equals(thruTime)) { 979 update = false; 980 } 981 } else if(thruTime == null) { 982 update = false; 983 } 984 985 if(update) { 986 this.thruTime = thruTime; 987 thruTimeHasBeenModified = true; 988 clearHashAndString(); 989 } 990 } 991 992 public boolean getThruTimeHasBeenModified() { 993 return thruTimeHasBeenModified; 994 } 995 996}