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 * ContactPostalAddressCorrectionValue.java 021 */ 022 023package com.echothree.model.data.contact.server.value; 024 025import com.echothree.model.data.contact.common.pk.ContactPostalAddressCorrectionPK; 026 027import com.echothree.model.data.contact.server.factory.ContactPostalAddressCorrectionFactory; 028 029import com.echothree.model.data.contact.common.pk.ContactMechanismPK; 030import com.echothree.model.data.geo.common.pk.GeoCodePK; 031 032import com.echothree.util.common.exception.PersistenceCloneException; 033import com.echothree.util.common.exception.PersistenceNotNullException; 034 035import com.echothree.util.server.persistence.BaseValue; 036 037import java.io.Serializable; 038 039import javax.annotation.Nonnull; 040import javax.annotation.Nullable; 041 042public class ContactPostalAddressCorrectionValue 043 extends BaseValue<ContactPostalAddressCorrectionPK> 044 implements Cloneable, Serializable { 045 046 private ContactMechanismPK contactMechanismPK; 047 private boolean contactMechanismPKHasBeenModified = false; 048 private String address1; 049 private boolean address1HasBeenModified = false; 050 private String address2; 051 private boolean address2HasBeenModified = false; 052 private String address3; 053 private boolean address3HasBeenModified = false; 054 private String city; 055 private boolean cityHasBeenModified = false; 056 private GeoCodePK cityGeoCodePK; 057 private boolean cityGeoCodePKHasBeenModified = false; 058 private GeoCodePK countyGeoCodePK; 059 private boolean countyGeoCodePKHasBeenModified = false; 060 private String state; 061 private boolean stateHasBeenModified = false; 062 private GeoCodePK stateGeoCodePK; 063 private boolean stateGeoCodePKHasBeenModified = false; 064 private String postalCode; 065 private boolean postalCodeHasBeenModified = false; 066 private GeoCodePK postalCodeGeoCodePK; 067 private boolean postalCodeGeoCodePKHasBeenModified = false; 068 private GeoCodePK countryGeoCodePK; 069 private boolean countryGeoCodePKHasBeenModified = false; 070 private Long fromTime; 071 private boolean fromTimeHasBeenModified = false; 072 private Long thruTime; 073 private boolean thruTimeHasBeenModified = false; 074 075 private transient Integer _hashCode = null; 076 private transient String _stringValue = null; 077 078 private void constructFields(ContactMechanismPK contactMechanismPK, String address1, String address2, String address3, String city, GeoCodePK cityGeoCodePK, GeoCodePK countyGeoCodePK, String state, GeoCodePK stateGeoCodePK, String postalCode, GeoCodePK postalCodeGeoCodePK, GeoCodePK countryGeoCodePK, Long fromTime, Long thruTime) 079 throws PersistenceNotNullException { 080 checkForNull(contactMechanismPK); 081 this.contactMechanismPK = contactMechanismPK; 082 checkForNull(address1); 083 this.address1 = address1; 084 this.address2 = address2; 085 this.address3 = address3; 086 checkForNull(city); 087 this.city = city; 088 this.cityGeoCodePK = cityGeoCodePK; 089 this.countyGeoCodePK = countyGeoCodePK; 090 checkForNull(state); 091 this.state = state; 092 this.stateGeoCodePK = stateGeoCodePK; 093 checkForNull(postalCode); 094 this.postalCode = postalCode; 095 this.postalCodeGeoCodePK = postalCodeGeoCodePK; 096 checkForNull(countryGeoCodePK); 097 this.countryGeoCodePK = countryGeoCodePK; 098 checkForNull(fromTime); 099 this.fromTime = fromTime; 100 checkForNull(thruTime); 101 this.thruTime = thruTime; 102 } 103 104 /** Creates a new instance of ContactPostalAddressCorrectionValue */ 105 public ContactPostalAddressCorrectionValue(ContactPostalAddressCorrectionPK contactPostalAddressCorrectionPK, ContactMechanismPK contactMechanismPK, String address1, String address2, String address3, String city, GeoCodePK cityGeoCodePK, GeoCodePK countyGeoCodePK, String state, GeoCodePK stateGeoCodePK, String postalCode, GeoCodePK postalCodeGeoCodePK, GeoCodePK countryGeoCodePK, Long fromTime, Long thruTime) 106 throws PersistenceNotNullException { 107 super(contactPostalAddressCorrectionPK); 108 constructFields(contactMechanismPK, address1, address2, address3, city, cityGeoCodePK, countyGeoCodePK, state, stateGeoCodePK, postalCode, postalCodeGeoCodePK, countryGeoCodePK, fromTime, thruTime); 109 } 110 111 /** Creates a new instance of ContactPostalAddressCorrectionValue */ 112 public ContactPostalAddressCorrectionValue(ContactMechanismPK contactMechanismPK, String address1, String address2, String address3, String city, GeoCodePK cityGeoCodePK, GeoCodePK countyGeoCodePK, String state, GeoCodePK stateGeoCodePK, String postalCode, GeoCodePK postalCodeGeoCodePK, GeoCodePK countryGeoCodePK, Long fromTime, Long thruTime) 113 throws PersistenceNotNullException { 114 super(); 115 constructFields(contactMechanismPK, address1, address2, address3, city, cityGeoCodePK, countyGeoCodePK, state, stateGeoCodePK, postalCode, postalCodeGeoCodePK, countryGeoCodePK, fromTime, thruTime); 116 } 117 118 @Override 119 @Nonnull 120 public ContactPostalAddressCorrectionFactory getBaseFactoryInstance() { 121 return ContactPostalAddressCorrectionFactory.getInstance(); 122 } 123 124 @Override 125 @Nonnull 126 public ContactPostalAddressCorrectionValue clone() { 127 Object result; 128 129 try { 130 result = super.clone(); 131 } catch (CloneNotSupportedException cnse) { 132 // This shouldn't happen, fail when it does. 133 throw new PersistenceCloneException(cnse); 134 } 135 136 return (ContactPostalAddressCorrectionValue)result; 137 } 138 139 @Override 140 @Nonnull 141 public ContactPostalAddressCorrectionPK getPrimaryKey() { 142 if(_primaryKey == null) { 143 _primaryKey = new ContactPostalAddressCorrectionPK(entityId); 144 } 145 146 return _primaryKey; 147 } 148 149 private void clearHashAndString() { 150 _hashCode = null; 151 _stringValue = null; 152 } 153 154 @Override 155 public int hashCode() { 156 if(_hashCode == null) { 157 int hashCode = 17; 158 159 hashCode = 37 * hashCode + ((entityId != null) ? entityId.hashCode() : 0); 160 161 hashCode = 37 * hashCode + ((contactMechanismPK != null) ? contactMechanismPK.hashCode() : 0); 162 hashCode = 37 * hashCode + ((address1 != null) ? address1.hashCode() : 0); 163 hashCode = 37 * hashCode + ((address2 != null) ? address2.hashCode() : 0); 164 hashCode = 37 * hashCode + ((address3 != null) ? address3.hashCode() : 0); 165 hashCode = 37 * hashCode + ((city != null) ? city.hashCode() : 0); 166 hashCode = 37 * hashCode + ((cityGeoCodePK != null) ? cityGeoCodePK.hashCode() : 0); 167 hashCode = 37 * hashCode + ((countyGeoCodePK != null) ? countyGeoCodePK.hashCode() : 0); 168 hashCode = 37 * hashCode + ((state != null) ? state.hashCode() : 0); 169 hashCode = 37 * hashCode + ((stateGeoCodePK != null) ? stateGeoCodePK.hashCode() : 0); 170 hashCode = 37 * hashCode + ((postalCode != null) ? postalCode.hashCode() : 0); 171 hashCode = 37 * hashCode + ((postalCodeGeoCodePK != null) ? postalCodeGeoCodePK.hashCode() : 0); 172 hashCode = 37 * hashCode + ((countryGeoCodePK != null) ? countryGeoCodePK.hashCode() : 0); 173 hashCode = 37 * hashCode + ((fromTime != null) ? fromTime.hashCode() : 0); 174 hashCode = 37 * hashCode + ((thruTime != null) ? thruTime.hashCode() : 0); 175 176 _hashCode = hashCode; 177 } 178 179 return _hashCode; 180 } 181 182 @Override 183 @Nonnull 184 public String toString() { 185 if(_stringValue == null) { 186 _stringValue = "{" + 187 "entityId=" + getEntityId() + 188 ", contactMechanismPK=" + getContactMechanismPK() + 189 ", address1=" + getAddress1() + 190 ", address2=" + getAddress2() + 191 ", address3=" + getAddress3() + 192 ", city=" + getCity() + 193 ", cityGeoCodePK=" + getCityGeoCodePK() + 194 ", countyGeoCodePK=" + getCountyGeoCodePK() + 195 ", state=" + getState() + 196 ", stateGeoCodePK=" + getStateGeoCodePK() + 197 ", postalCode=" + getPostalCode() + 198 ", postalCodeGeoCodePK=" + getPostalCodeGeoCodePK() + 199 ", countryGeoCodePK=" + getCountryGeoCodePK() + 200 ", fromTime=" + getFromTime() + 201 ", thruTime=" + getThruTime() + 202 "}"; 203 } 204 return _stringValue; 205 } 206 207 @Override 208 public boolean equals(Object other) { 209 if(this == other) 210 return true; 211 212 if(!hasIdentity()) 213 return false; 214 215 if(other instanceof ContactPostalAddressCorrectionValue that) { 216 if(!that.hasIdentity()) 217 return false; 218 219 Long thisEntityId = getEntityId(); 220 Long thatEntityId = that.getEntityId(); 221 222 boolean objectsEqual = thisEntityId.equals(thatEntityId); 223 if(objectsEqual) 224 objectsEqual = isIdentical(that); 225 226 return objectsEqual; 227 } else { 228 return false; 229 } 230 } 231 232 public boolean isIdentical(Object other) { 233 if(other instanceof ContactPostalAddressCorrectionValue that) { 234 boolean objectsEqual = true; 235 236 237 if(objectsEqual) { 238 ContactMechanismPK thisContactMechanismPK = getContactMechanismPK(); 239 ContactMechanismPK thatContactMechanismPK = that.getContactMechanismPK(); 240 241 if(thisContactMechanismPK == null) { 242 objectsEqual = objectsEqual && (thatContactMechanismPK == null); 243 } else { 244 objectsEqual = objectsEqual && thisContactMechanismPK.equals(thatContactMechanismPK); 245 } 246 } 247 248 if(objectsEqual) { 249 String thisAddress1 = getAddress1(); 250 String thatAddress1 = that.getAddress1(); 251 252 if(thisAddress1 == null) { 253 objectsEqual = objectsEqual && (thatAddress1 == null); 254 } else { 255 objectsEqual = objectsEqual && thisAddress1.equals(thatAddress1); 256 } 257 } 258 259 if(objectsEqual) { 260 String thisAddress2 = getAddress2(); 261 String thatAddress2 = that.getAddress2(); 262 263 if(thisAddress2 == null) { 264 objectsEqual = objectsEqual && (thatAddress2 == null); 265 } else { 266 objectsEqual = objectsEqual && thisAddress2.equals(thatAddress2); 267 } 268 } 269 270 if(objectsEqual) { 271 String thisAddress3 = getAddress3(); 272 String thatAddress3 = that.getAddress3(); 273 274 if(thisAddress3 == null) { 275 objectsEqual = objectsEqual && (thatAddress3 == null); 276 } else { 277 objectsEqual = objectsEqual && thisAddress3.equals(thatAddress3); 278 } 279 } 280 281 if(objectsEqual) { 282 String thisCity = getCity(); 283 String thatCity = that.getCity(); 284 285 if(thisCity == null) { 286 objectsEqual = objectsEqual && (thatCity == null); 287 } else { 288 objectsEqual = objectsEqual && thisCity.equals(thatCity); 289 } 290 } 291 292 if(objectsEqual) { 293 GeoCodePK thisCityGeoCodePK = getCityGeoCodePK(); 294 GeoCodePK thatCityGeoCodePK = that.getCityGeoCodePK(); 295 296 if(thisCityGeoCodePK == null) { 297 objectsEqual = objectsEqual && (thatCityGeoCodePK == null); 298 } else { 299 objectsEqual = objectsEqual && thisCityGeoCodePK.equals(thatCityGeoCodePK); 300 } 301 } 302 303 if(objectsEqual) { 304 GeoCodePK thisCountyGeoCodePK = getCountyGeoCodePK(); 305 GeoCodePK thatCountyGeoCodePK = that.getCountyGeoCodePK(); 306 307 if(thisCountyGeoCodePK == null) { 308 objectsEqual = objectsEqual && (thatCountyGeoCodePK == null); 309 } else { 310 objectsEqual = objectsEqual && thisCountyGeoCodePK.equals(thatCountyGeoCodePK); 311 } 312 } 313 314 if(objectsEqual) { 315 String thisState = getState(); 316 String thatState = that.getState(); 317 318 if(thisState == null) { 319 objectsEqual = objectsEqual && (thatState == null); 320 } else { 321 objectsEqual = objectsEqual && thisState.equals(thatState); 322 } 323 } 324 325 if(objectsEqual) { 326 GeoCodePK thisStateGeoCodePK = getStateGeoCodePK(); 327 GeoCodePK thatStateGeoCodePK = that.getStateGeoCodePK(); 328 329 if(thisStateGeoCodePK == null) { 330 objectsEqual = objectsEqual && (thatStateGeoCodePK == null); 331 } else { 332 objectsEqual = objectsEqual && thisStateGeoCodePK.equals(thatStateGeoCodePK); 333 } 334 } 335 336 if(objectsEqual) { 337 String thisPostalCode = getPostalCode(); 338 String thatPostalCode = that.getPostalCode(); 339 340 if(thisPostalCode == null) { 341 objectsEqual = objectsEqual && (thatPostalCode == null); 342 } else { 343 objectsEqual = objectsEqual && thisPostalCode.equals(thatPostalCode); 344 } 345 } 346 347 if(objectsEqual) { 348 GeoCodePK thisPostalCodeGeoCodePK = getPostalCodeGeoCodePK(); 349 GeoCodePK thatPostalCodeGeoCodePK = that.getPostalCodeGeoCodePK(); 350 351 if(thisPostalCodeGeoCodePK == null) { 352 objectsEqual = objectsEqual && (thatPostalCodeGeoCodePK == null); 353 } else { 354 objectsEqual = objectsEqual && thisPostalCodeGeoCodePK.equals(thatPostalCodeGeoCodePK); 355 } 356 } 357 358 if(objectsEqual) { 359 GeoCodePK thisCountryGeoCodePK = getCountryGeoCodePK(); 360 GeoCodePK thatCountryGeoCodePK = that.getCountryGeoCodePK(); 361 362 if(thisCountryGeoCodePK == null) { 363 objectsEqual = objectsEqual && (thatCountryGeoCodePK == null); 364 } else { 365 objectsEqual = objectsEqual && thisCountryGeoCodePK.equals(thatCountryGeoCodePK); 366 } 367 } 368 369 if(objectsEqual) { 370 Long thisFromTime = getFromTime(); 371 Long thatFromTime = that.getFromTime(); 372 373 if(thisFromTime == null) { 374 objectsEqual = objectsEqual && (thatFromTime == null); 375 } else { 376 objectsEqual = objectsEqual && thisFromTime.equals(thatFromTime); 377 } 378 } 379 380 if(objectsEqual) { 381 Long thisThruTime = getThruTime(); 382 Long thatThruTime = that.getThruTime(); 383 384 if(thisThruTime == null) { 385 objectsEqual = objectsEqual && (thatThruTime == null); 386 } else { 387 objectsEqual = objectsEqual && thisThruTime.equals(thatThruTime); 388 } 389 } 390 391 return objectsEqual; 392 } else { 393 return false; 394 } 395 } 396 397 @Override 398 public boolean hasBeenModified() { 399 return contactMechanismPKHasBeenModified || address1HasBeenModified || address2HasBeenModified || address3HasBeenModified || cityHasBeenModified || cityGeoCodePKHasBeenModified || countyGeoCodePKHasBeenModified || stateHasBeenModified || stateGeoCodePKHasBeenModified || postalCodeHasBeenModified || postalCodeGeoCodePKHasBeenModified || countryGeoCodePKHasBeenModified || fromTimeHasBeenModified || thruTimeHasBeenModified; 400 } 401 402 @Override 403 public void clearHasBeenModified() { 404 contactMechanismPKHasBeenModified = false; 405 address1HasBeenModified = false; 406 address2HasBeenModified = false; 407 address3HasBeenModified = false; 408 cityHasBeenModified = false; 409 cityGeoCodePKHasBeenModified = false; 410 countyGeoCodePKHasBeenModified = false; 411 stateHasBeenModified = false; 412 stateGeoCodePKHasBeenModified = false; 413 postalCodeHasBeenModified = false; 414 postalCodeGeoCodePKHasBeenModified = false; 415 countryGeoCodePKHasBeenModified = false; 416 fromTimeHasBeenModified = false; 417 thruTimeHasBeenModified = false; 418 } 419 420 @Nonnull 421 public ContactMechanismPK getContactMechanismPK() { 422 return contactMechanismPK; 423 } 424 425 public void setContactMechanismPK(@Nonnull ContactMechanismPK contactMechanismPK) 426 throws PersistenceNotNullException { 427 checkForNull(contactMechanismPK); 428 429 boolean update = true; 430 431 if(this.contactMechanismPK != null) { 432 if(this.contactMechanismPK.equals(contactMechanismPK)) { 433 update = false; 434 } 435 } else if(contactMechanismPK == null) { 436 update = false; 437 } 438 439 if(update) { 440 this.contactMechanismPK = contactMechanismPK; 441 contactMechanismPKHasBeenModified = true; 442 clearHashAndString(); 443 } 444 } 445 446 public boolean getContactMechanismPKHasBeenModified() { 447 return contactMechanismPKHasBeenModified; 448 } 449 450 @Nonnull 451 public String getAddress1() { 452 return address1; 453 } 454 455 public void setAddress1(@Nonnull String address1) 456 throws PersistenceNotNullException { 457 checkForNull(address1); 458 459 boolean update = true; 460 461 if(this.address1 != null) { 462 if(this.address1.equals(address1)) { 463 update = false; 464 } 465 } else if(address1 == null) { 466 update = false; 467 } 468 469 if(update) { 470 this.address1 = address1; 471 address1HasBeenModified = true; 472 clearHashAndString(); 473 } 474 } 475 476 public boolean getAddress1HasBeenModified() { 477 return address1HasBeenModified; 478 } 479 480 @Nullable 481 public String getAddress2() { 482 return address2; 483 } 484 485 public void setAddress2(@Nullable String address2) { 486 boolean update = true; 487 488 if(this.address2 != null) { 489 if(this.address2.equals(address2)) { 490 update = false; 491 } 492 } else if(address2 == null) { 493 update = false; 494 } 495 496 if(update) { 497 this.address2 = address2; 498 address2HasBeenModified = true; 499 clearHashAndString(); 500 } 501 } 502 503 public boolean getAddress2HasBeenModified() { 504 return address2HasBeenModified; 505 } 506 507 @Nullable 508 public String getAddress3() { 509 return address3; 510 } 511 512 public void setAddress3(@Nullable String address3) { 513 boolean update = true; 514 515 if(this.address3 != null) { 516 if(this.address3.equals(address3)) { 517 update = false; 518 } 519 } else if(address3 == null) { 520 update = false; 521 } 522 523 if(update) { 524 this.address3 = address3; 525 address3HasBeenModified = true; 526 clearHashAndString(); 527 } 528 } 529 530 public boolean getAddress3HasBeenModified() { 531 return address3HasBeenModified; 532 } 533 534 @Nonnull 535 public String getCity() { 536 return city; 537 } 538 539 public void setCity(@Nonnull String city) 540 throws PersistenceNotNullException { 541 checkForNull(city); 542 543 boolean update = true; 544 545 if(this.city != null) { 546 if(this.city.equals(city)) { 547 update = false; 548 } 549 } else if(city == null) { 550 update = false; 551 } 552 553 if(update) { 554 this.city = city; 555 cityHasBeenModified = true; 556 clearHashAndString(); 557 } 558 } 559 560 public boolean getCityHasBeenModified() { 561 return cityHasBeenModified; 562 } 563 564 @Nullable 565 public GeoCodePK getCityGeoCodePK() { 566 return cityGeoCodePK; 567 } 568 569 public void setCityGeoCodePK(@Nullable GeoCodePK cityGeoCodePK) { 570 boolean update = true; 571 572 if(this.cityGeoCodePK != null) { 573 if(this.cityGeoCodePK.equals(cityGeoCodePK)) { 574 update = false; 575 } 576 } else if(cityGeoCodePK == null) { 577 update = false; 578 } 579 580 if(update) { 581 this.cityGeoCodePK = cityGeoCodePK; 582 cityGeoCodePKHasBeenModified = true; 583 clearHashAndString(); 584 } 585 } 586 587 public boolean getCityGeoCodePKHasBeenModified() { 588 return cityGeoCodePKHasBeenModified; 589 } 590 591 @Nullable 592 public GeoCodePK getCountyGeoCodePK() { 593 return countyGeoCodePK; 594 } 595 596 public void setCountyGeoCodePK(@Nullable GeoCodePK countyGeoCodePK) { 597 boolean update = true; 598 599 if(this.countyGeoCodePK != null) { 600 if(this.countyGeoCodePK.equals(countyGeoCodePK)) { 601 update = false; 602 } 603 } else if(countyGeoCodePK == null) { 604 update = false; 605 } 606 607 if(update) { 608 this.countyGeoCodePK = countyGeoCodePK; 609 countyGeoCodePKHasBeenModified = true; 610 clearHashAndString(); 611 } 612 } 613 614 public boolean getCountyGeoCodePKHasBeenModified() { 615 return countyGeoCodePKHasBeenModified; 616 } 617 618 @Nonnull 619 public String getState() { 620 return state; 621 } 622 623 public void setState(@Nonnull String state) 624 throws PersistenceNotNullException { 625 checkForNull(state); 626 627 boolean update = true; 628 629 if(this.state != null) { 630 if(this.state.equals(state)) { 631 update = false; 632 } 633 } else if(state == null) { 634 update = false; 635 } 636 637 if(update) { 638 this.state = state; 639 stateHasBeenModified = true; 640 clearHashAndString(); 641 } 642 } 643 644 public boolean getStateHasBeenModified() { 645 return stateHasBeenModified; 646 } 647 648 @Nullable 649 public GeoCodePK getStateGeoCodePK() { 650 return stateGeoCodePK; 651 } 652 653 public void setStateGeoCodePK(@Nullable GeoCodePK stateGeoCodePK) { 654 boolean update = true; 655 656 if(this.stateGeoCodePK != null) { 657 if(this.stateGeoCodePK.equals(stateGeoCodePK)) { 658 update = false; 659 } 660 } else if(stateGeoCodePK == null) { 661 update = false; 662 } 663 664 if(update) { 665 this.stateGeoCodePK = stateGeoCodePK; 666 stateGeoCodePKHasBeenModified = true; 667 clearHashAndString(); 668 } 669 } 670 671 public boolean getStateGeoCodePKHasBeenModified() { 672 return stateGeoCodePKHasBeenModified; 673 } 674 675 @Nonnull 676 public String getPostalCode() { 677 return postalCode; 678 } 679 680 public void setPostalCode(@Nonnull String postalCode) 681 throws PersistenceNotNullException { 682 checkForNull(postalCode); 683 684 boolean update = true; 685 686 if(this.postalCode != null) { 687 if(this.postalCode.equals(postalCode)) { 688 update = false; 689 } 690 } else if(postalCode == null) { 691 update = false; 692 } 693 694 if(update) { 695 this.postalCode = postalCode; 696 postalCodeHasBeenModified = true; 697 clearHashAndString(); 698 } 699 } 700 701 public boolean getPostalCodeHasBeenModified() { 702 return postalCodeHasBeenModified; 703 } 704 705 @Nullable 706 public GeoCodePK getPostalCodeGeoCodePK() { 707 return postalCodeGeoCodePK; 708 } 709 710 public void setPostalCodeGeoCodePK(@Nullable GeoCodePK postalCodeGeoCodePK) { 711 boolean update = true; 712 713 if(this.postalCodeGeoCodePK != null) { 714 if(this.postalCodeGeoCodePK.equals(postalCodeGeoCodePK)) { 715 update = false; 716 } 717 } else if(postalCodeGeoCodePK == null) { 718 update = false; 719 } 720 721 if(update) { 722 this.postalCodeGeoCodePK = postalCodeGeoCodePK; 723 postalCodeGeoCodePKHasBeenModified = true; 724 clearHashAndString(); 725 } 726 } 727 728 public boolean getPostalCodeGeoCodePKHasBeenModified() { 729 return postalCodeGeoCodePKHasBeenModified; 730 } 731 732 @Nonnull 733 public GeoCodePK getCountryGeoCodePK() { 734 return countryGeoCodePK; 735 } 736 737 public void setCountryGeoCodePK(@Nonnull GeoCodePK countryGeoCodePK) 738 throws PersistenceNotNullException { 739 checkForNull(countryGeoCodePK); 740 741 boolean update = true; 742 743 if(this.countryGeoCodePK != null) { 744 if(this.countryGeoCodePK.equals(countryGeoCodePK)) { 745 update = false; 746 } 747 } else if(countryGeoCodePK == null) { 748 update = false; 749 } 750 751 if(update) { 752 this.countryGeoCodePK = countryGeoCodePK; 753 countryGeoCodePKHasBeenModified = true; 754 clearHashAndString(); 755 } 756 } 757 758 public boolean getCountryGeoCodePKHasBeenModified() { 759 return countryGeoCodePKHasBeenModified; 760 } 761 762 @Nonnull 763 public Long getFromTime() { 764 return fromTime; 765 } 766 767 public void setFromTime(@Nonnull Long fromTime) 768 throws PersistenceNotNullException { 769 checkForNull(fromTime); 770 771 boolean update = true; 772 773 if(this.fromTime != null) { 774 if(this.fromTime.equals(fromTime)) { 775 update = false; 776 } 777 } else if(fromTime == null) { 778 update = false; 779 } 780 781 if(update) { 782 this.fromTime = fromTime; 783 fromTimeHasBeenModified = true; 784 clearHashAndString(); 785 } 786 } 787 788 public boolean getFromTimeHasBeenModified() { 789 return fromTimeHasBeenModified; 790 } 791 792 @Nonnull 793 public Long getThruTime() { 794 return thruTime; 795 } 796 797 public void setThruTime(@Nonnull Long thruTime) 798 throws PersistenceNotNullException { 799 checkForNull(thruTime); 800 801 boolean update = true; 802 803 if(this.thruTime != null) { 804 if(this.thruTime.equals(thruTime)) { 805 update = false; 806 } 807 } else if(thruTime == null) { 808 update = false; 809 } 810 811 if(update) { 812 this.thruTime = thruTime; 813 thruTimeHasBeenModified = true; 814 clearHashAndString(); 815 } 816 } 817 818 public boolean getThruTimeHasBeenModified() { 819 return thruTimeHasBeenModified; 820 } 821 822}