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 * ContactPostalAddressValue.java 021 */ 022 023package com.echothree.model.data.contact.server.value; 024 025import com.echothree.model.data.contact.common.pk.ContactPostalAddressPK; 026 027import com.echothree.model.data.contact.server.factory.ContactPostalAddressFactory; 028 029import com.echothree.model.data.contact.common.pk.ContactMechanismPK; 030import com.echothree.model.data.party.common.pk.PersonalTitlePK; 031import com.echothree.model.data.party.common.pk.NameSuffixPK; 032import com.echothree.model.data.geo.common.pk.GeoCodePK; 033 034import com.echothree.util.common.exception.PersistenceCloneException; 035import com.echothree.util.common.exception.PersistenceNotNullException; 036 037import com.echothree.util.server.persistence.BaseValue; 038 039import java.io.Serializable; 040 041public class ContactPostalAddressValue 042 extends BaseValue<ContactPostalAddressPK> 043 implements Cloneable, Serializable { 044 045 private ContactMechanismPK contactMechanismPK; 046 private boolean contactMechanismPKHasBeenModified = false; 047 private PersonalTitlePK personalTitlePK; 048 private boolean personalTitlePKHasBeenModified = false; 049 private String firstName; 050 private boolean firstNameHasBeenModified = false; 051 private String firstNameSdx; 052 private boolean firstNameSdxHasBeenModified = false; 053 private String middleName; 054 private boolean middleNameHasBeenModified = false; 055 private String middleNameSdx; 056 private boolean middleNameSdxHasBeenModified = false; 057 private String lastName; 058 private boolean lastNameHasBeenModified = false; 059 private String lastNameSdx; 060 private boolean lastNameSdxHasBeenModified = false; 061 private NameSuffixPK nameSuffixPK; 062 private boolean nameSuffixPKHasBeenModified = false; 063 private String companyName; 064 private boolean companyNameHasBeenModified = false; 065 private String attention; 066 private boolean attentionHasBeenModified = false; 067 private String address1; 068 private boolean address1HasBeenModified = false; 069 private String address2; 070 private boolean address2HasBeenModified = false; 071 private String address3; 072 private boolean address3HasBeenModified = false; 073 private String city; 074 private boolean cityHasBeenModified = false; 075 private GeoCodePK cityGeoCodePK; 076 private boolean cityGeoCodePKHasBeenModified = false; 077 private GeoCodePK countyGeoCodePK; 078 private boolean countyGeoCodePKHasBeenModified = false; 079 private String state; 080 private boolean stateHasBeenModified = false; 081 private GeoCodePK stateGeoCodePK; 082 private boolean stateGeoCodePKHasBeenModified = false; 083 private String postalCode; 084 private boolean postalCodeHasBeenModified = false; 085 private GeoCodePK postalCodeGeoCodePK; 086 private boolean postalCodeGeoCodePKHasBeenModified = false; 087 private GeoCodePK countryGeoCodePK; 088 private boolean countryGeoCodePKHasBeenModified = false; 089 private Boolean isCommercial; 090 private boolean isCommercialHasBeenModified = false; 091 private Long fromTime; 092 private boolean fromTimeHasBeenModified = false; 093 private Long thruTime; 094 private boolean thruTimeHasBeenModified = false; 095 096 private transient Integer _hashCode = null; 097 private transient String _stringValue = null; 098 099 private void constructFields(ContactMechanismPK contactMechanismPK, PersonalTitlePK personalTitlePK, String firstName, String firstNameSdx, String middleName, String middleNameSdx, String lastName, String lastNameSdx, NameSuffixPK nameSuffixPK, String companyName, String attention, String address1, String address2, String address3, String city, GeoCodePK cityGeoCodePK, GeoCodePK countyGeoCodePK, String state, GeoCodePK stateGeoCodePK, String postalCode, GeoCodePK postalCodeGeoCodePK, GeoCodePK countryGeoCodePK, Boolean isCommercial, Long fromTime, Long thruTime) 100 throws PersistenceNotNullException { 101 checkForNull(contactMechanismPK); 102 this.contactMechanismPK = contactMechanismPK; 103 this.personalTitlePK = personalTitlePK; 104 this.firstName = firstName; 105 this.firstNameSdx = firstNameSdx; 106 this.middleName = middleName; 107 this.middleNameSdx = middleNameSdx; 108 this.lastName = lastName; 109 this.lastNameSdx = lastNameSdx; 110 this.nameSuffixPK = nameSuffixPK; 111 this.companyName = companyName; 112 this.attention = attention; 113 checkForNull(address1); 114 this.address1 = address1; 115 this.address2 = address2; 116 this.address3 = address3; 117 this.city = city; 118 this.cityGeoCodePK = cityGeoCodePK; 119 this.countyGeoCodePK = countyGeoCodePK; 120 this.state = state; 121 this.stateGeoCodePK = stateGeoCodePK; 122 this.postalCode = postalCode; 123 this.postalCodeGeoCodePK = postalCodeGeoCodePK; 124 checkForNull(countryGeoCodePK); 125 this.countryGeoCodePK = countryGeoCodePK; 126 checkForNull(isCommercial); 127 this.isCommercial = isCommercial; 128 checkForNull(fromTime); 129 this.fromTime = fromTime; 130 checkForNull(thruTime); 131 this.thruTime = thruTime; 132 } 133 134 /** Creates a new instance of ContactPostalAddressValue */ 135 public ContactPostalAddressValue(ContactPostalAddressPK contactPostalAddressPK, ContactMechanismPK contactMechanismPK, PersonalTitlePK personalTitlePK, String firstName, String firstNameSdx, String middleName, String middleNameSdx, String lastName, String lastNameSdx, NameSuffixPK nameSuffixPK, String companyName, String attention, String address1, String address2, String address3, String city, GeoCodePK cityGeoCodePK, GeoCodePK countyGeoCodePK, String state, GeoCodePK stateGeoCodePK, String postalCode, GeoCodePK postalCodeGeoCodePK, GeoCodePK countryGeoCodePK, Boolean isCommercial, Long fromTime, Long thruTime) 136 throws PersistenceNotNullException { 137 super(contactPostalAddressPK); 138 constructFields(contactMechanismPK, personalTitlePK, firstName, firstNameSdx, middleName, middleNameSdx, lastName, lastNameSdx, nameSuffixPK, companyName, attention, address1, address2, address3, city, cityGeoCodePK, countyGeoCodePK, state, stateGeoCodePK, postalCode, postalCodeGeoCodePK, countryGeoCodePK, isCommercial, fromTime, thruTime); 139 } 140 141 /** Creates a new instance of ContactPostalAddressValue */ 142 public ContactPostalAddressValue(ContactMechanismPK contactMechanismPK, PersonalTitlePK personalTitlePK, String firstName, String firstNameSdx, String middleName, String middleNameSdx, String lastName, String lastNameSdx, NameSuffixPK nameSuffixPK, String companyName, String attention, String address1, String address2, String address3, String city, GeoCodePK cityGeoCodePK, GeoCodePK countyGeoCodePK, String state, GeoCodePK stateGeoCodePK, String postalCode, GeoCodePK postalCodeGeoCodePK, GeoCodePK countryGeoCodePK, Boolean isCommercial, Long fromTime, Long thruTime) 143 throws PersistenceNotNullException { 144 super(); 145 constructFields(contactMechanismPK, personalTitlePK, firstName, firstNameSdx, middleName, middleNameSdx, lastName, lastNameSdx, nameSuffixPK, companyName, attention, address1, address2, address3, city, cityGeoCodePK, countyGeoCodePK, state, stateGeoCodePK, postalCode, postalCodeGeoCodePK, countryGeoCodePK, isCommercial, fromTime, thruTime); 146 } 147 148 @Override 149 public ContactPostalAddressFactory getBaseFactoryInstance() { 150 return ContactPostalAddressFactory.getInstance(); 151 } 152 153 @Override 154 public ContactPostalAddressValue clone() { 155 Object result; 156 157 try { 158 result = super.clone(); 159 } catch (CloneNotSupportedException cnse) { 160 // This shouldn't happen, fail when it does. 161 throw new PersistenceCloneException(cnse); 162 } 163 164 return (ContactPostalAddressValue)result; 165 } 166 167 @Override 168 public ContactPostalAddressPK getPrimaryKey() { 169 if(_primaryKey == null) { 170 _primaryKey = new ContactPostalAddressPK(entityId); 171 } 172 173 return _primaryKey; 174 } 175 176 private void clearHashAndString() { 177 _hashCode = null; 178 _stringValue = null; 179 } 180 181 @Override 182 public int hashCode() { 183 if(_hashCode == null) { 184 int hashCode = 17; 185 186 hashCode = 37 * hashCode + ((entityId != null) ? entityId.hashCode() : 0); 187 188 hashCode = 37 * hashCode + ((contactMechanismPK != null) ? contactMechanismPK.hashCode() : 0); 189 hashCode = 37 * hashCode + ((personalTitlePK != null) ? personalTitlePK.hashCode() : 0); 190 hashCode = 37 * hashCode + ((firstName != null) ? firstName.hashCode() : 0); 191 hashCode = 37 * hashCode + ((firstNameSdx != null) ? firstNameSdx.hashCode() : 0); 192 hashCode = 37 * hashCode + ((middleName != null) ? middleName.hashCode() : 0); 193 hashCode = 37 * hashCode + ((middleNameSdx != null) ? middleNameSdx.hashCode() : 0); 194 hashCode = 37 * hashCode + ((lastName != null) ? lastName.hashCode() : 0); 195 hashCode = 37 * hashCode + ((lastNameSdx != null) ? lastNameSdx.hashCode() : 0); 196 hashCode = 37 * hashCode + ((nameSuffixPK != null) ? nameSuffixPK.hashCode() : 0); 197 hashCode = 37 * hashCode + ((companyName != null) ? companyName.hashCode() : 0); 198 hashCode = 37 * hashCode + ((attention != null) ? attention.hashCode() : 0); 199 hashCode = 37 * hashCode + ((address1 != null) ? address1.hashCode() : 0); 200 hashCode = 37 * hashCode + ((address2 != null) ? address2.hashCode() : 0); 201 hashCode = 37 * hashCode + ((address3 != null) ? address3.hashCode() : 0); 202 hashCode = 37 * hashCode + ((city != null) ? city.hashCode() : 0); 203 hashCode = 37 * hashCode + ((cityGeoCodePK != null) ? cityGeoCodePK.hashCode() : 0); 204 hashCode = 37 * hashCode + ((countyGeoCodePK != null) ? countyGeoCodePK.hashCode() : 0); 205 hashCode = 37 * hashCode + ((state != null) ? state.hashCode() : 0); 206 hashCode = 37 * hashCode + ((stateGeoCodePK != null) ? stateGeoCodePK.hashCode() : 0); 207 hashCode = 37 * hashCode + ((postalCode != null) ? postalCode.hashCode() : 0); 208 hashCode = 37 * hashCode + ((postalCodeGeoCodePK != null) ? postalCodeGeoCodePK.hashCode() : 0); 209 hashCode = 37 * hashCode + ((countryGeoCodePK != null) ? countryGeoCodePK.hashCode() : 0); 210 hashCode = 37 * hashCode + ((isCommercial != null) ? isCommercial.hashCode() : 0); 211 hashCode = 37 * hashCode + ((fromTime != null) ? fromTime.hashCode() : 0); 212 hashCode = 37 * hashCode + ((thruTime != null) ? thruTime.hashCode() : 0); 213 214 _hashCode = hashCode; 215 } 216 217 return _hashCode; 218 } 219 220 @Override 221 public String toString() { 222 if(_stringValue == null) { 223 StringBuilder stringValue = new StringBuilder("{"); 224 225 stringValue.append("entityId=").append(getEntityId()); 226 227 stringValue.append(", contactMechanismPK=").append(getContactMechanismPK()); 228 stringValue.append(", personalTitlePK=").append(getPersonalTitlePK()); 229 stringValue.append(", firstName=").append(getFirstName()); 230 stringValue.append(", firstNameSdx=").append(getFirstNameSdx()); 231 stringValue.append(", middleName=").append(getMiddleName()); 232 stringValue.append(", middleNameSdx=").append(getMiddleNameSdx()); 233 stringValue.append(", lastName=").append(getLastName()); 234 stringValue.append(", lastNameSdx=").append(getLastNameSdx()); 235 stringValue.append(", nameSuffixPK=").append(getNameSuffixPK()); 236 stringValue.append(", companyName=").append(getCompanyName()); 237 stringValue.append(", attention=").append(getAttention()); 238 stringValue.append(", address1=").append(getAddress1()); 239 stringValue.append(", address2=").append(getAddress2()); 240 stringValue.append(", address3=").append(getAddress3()); 241 stringValue.append(", city=").append(getCity()); 242 stringValue.append(", cityGeoCodePK=").append(getCityGeoCodePK()); 243 stringValue.append(", countyGeoCodePK=").append(getCountyGeoCodePK()); 244 stringValue.append(", state=").append(getState()); 245 stringValue.append(", stateGeoCodePK=").append(getStateGeoCodePK()); 246 stringValue.append(", postalCode=").append(getPostalCode()); 247 stringValue.append(", postalCodeGeoCodePK=").append(getPostalCodeGeoCodePK()); 248 stringValue.append(", countryGeoCodePK=").append(getCountryGeoCodePK()); 249 stringValue.append(", isCommercial=").append(getIsCommercial()); 250 stringValue.append(", fromTime=").append(getFromTime()); 251 stringValue.append(", thruTime=").append(getThruTime()); 252 253 stringValue.append('}'); 254 255 _stringValue = stringValue.toString(); 256 } 257 return _stringValue; 258 } 259 260 @Override 261 public boolean equals(Object other) { 262 if(this == other) 263 return true; 264 265 if(!hasIdentity()) 266 return false; 267 268 if(other instanceof ContactPostalAddressValue) { 269 ContactPostalAddressValue that = (ContactPostalAddressValue)other; 270 271 if(!that.hasIdentity()) 272 return false; 273 274 Long thisEntityId = getEntityId(); 275 Long thatEntityId = that.getEntityId(); 276 277 boolean objectsEqual = thisEntityId.equals(thatEntityId); 278 if(objectsEqual) 279 objectsEqual = objectsEqual && isIdentical(that); 280 281 return objectsEqual; 282 } else { 283 return false; 284 } 285 } 286 287 public boolean isIdentical(Object other) { 288 if(other instanceof ContactPostalAddressValue) { 289 ContactPostalAddressValue that = (ContactPostalAddressValue)other; 290 boolean objectsEqual = true; 291 292 293 if(objectsEqual) { 294 ContactMechanismPK thisContactMechanismPK = getContactMechanismPK(); 295 ContactMechanismPK thatContactMechanismPK = that.getContactMechanismPK(); 296 297 if(thisContactMechanismPK == null) { 298 objectsEqual = objectsEqual && (thatContactMechanismPK == null); 299 } else { 300 objectsEqual = objectsEqual && thisContactMechanismPK.equals(thatContactMechanismPK); 301 } 302 } 303 304 if(objectsEqual) { 305 PersonalTitlePK thisPersonalTitlePK = getPersonalTitlePK(); 306 PersonalTitlePK thatPersonalTitlePK = that.getPersonalTitlePK(); 307 308 if(thisPersonalTitlePK == null) { 309 objectsEqual = objectsEqual && (thatPersonalTitlePK == null); 310 } else { 311 objectsEqual = objectsEqual && thisPersonalTitlePK.equals(thatPersonalTitlePK); 312 } 313 } 314 315 if(objectsEqual) { 316 String thisFirstName = getFirstName(); 317 String thatFirstName = that.getFirstName(); 318 319 if(thisFirstName == null) { 320 objectsEqual = objectsEqual && (thatFirstName == null); 321 } else { 322 objectsEqual = objectsEqual && thisFirstName.equals(thatFirstName); 323 } 324 } 325 326 if(objectsEqual) { 327 String thisFirstNameSdx = getFirstNameSdx(); 328 String thatFirstNameSdx = that.getFirstNameSdx(); 329 330 if(thisFirstNameSdx == null) { 331 objectsEqual = objectsEqual && (thatFirstNameSdx == null); 332 } else { 333 objectsEqual = objectsEqual && thisFirstNameSdx.equals(thatFirstNameSdx); 334 } 335 } 336 337 if(objectsEqual) { 338 String thisMiddleName = getMiddleName(); 339 String thatMiddleName = that.getMiddleName(); 340 341 if(thisMiddleName == null) { 342 objectsEqual = objectsEqual && (thatMiddleName == null); 343 } else { 344 objectsEqual = objectsEqual && thisMiddleName.equals(thatMiddleName); 345 } 346 } 347 348 if(objectsEqual) { 349 String thisMiddleNameSdx = getMiddleNameSdx(); 350 String thatMiddleNameSdx = that.getMiddleNameSdx(); 351 352 if(thisMiddleNameSdx == null) { 353 objectsEqual = objectsEqual && (thatMiddleNameSdx == null); 354 } else { 355 objectsEqual = objectsEqual && thisMiddleNameSdx.equals(thatMiddleNameSdx); 356 } 357 } 358 359 if(objectsEqual) { 360 String thisLastName = getLastName(); 361 String thatLastName = that.getLastName(); 362 363 if(thisLastName == null) { 364 objectsEqual = objectsEqual && (thatLastName == null); 365 } else { 366 objectsEqual = objectsEqual && thisLastName.equals(thatLastName); 367 } 368 } 369 370 if(objectsEqual) { 371 String thisLastNameSdx = getLastNameSdx(); 372 String thatLastNameSdx = that.getLastNameSdx(); 373 374 if(thisLastNameSdx == null) { 375 objectsEqual = objectsEqual && (thatLastNameSdx == null); 376 } else { 377 objectsEqual = objectsEqual && thisLastNameSdx.equals(thatLastNameSdx); 378 } 379 } 380 381 if(objectsEqual) { 382 NameSuffixPK thisNameSuffixPK = getNameSuffixPK(); 383 NameSuffixPK thatNameSuffixPK = that.getNameSuffixPK(); 384 385 if(thisNameSuffixPK == null) { 386 objectsEqual = objectsEqual && (thatNameSuffixPK == null); 387 } else { 388 objectsEqual = objectsEqual && thisNameSuffixPK.equals(thatNameSuffixPK); 389 } 390 } 391 392 if(objectsEqual) { 393 String thisCompanyName = getCompanyName(); 394 String thatCompanyName = that.getCompanyName(); 395 396 if(thisCompanyName == null) { 397 objectsEqual = objectsEqual && (thatCompanyName == null); 398 } else { 399 objectsEqual = objectsEqual && thisCompanyName.equals(thatCompanyName); 400 } 401 } 402 403 if(objectsEqual) { 404 String thisAttention = getAttention(); 405 String thatAttention = that.getAttention(); 406 407 if(thisAttention == null) { 408 objectsEqual = objectsEqual && (thatAttention == null); 409 } else { 410 objectsEqual = objectsEqual && thisAttention.equals(thatAttention); 411 } 412 } 413 414 if(objectsEqual) { 415 String thisAddress1 = getAddress1(); 416 String thatAddress1 = that.getAddress1(); 417 418 if(thisAddress1 == null) { 419 objectsEqual = objectsEqual && (thatAddress1 == null); 420 } else { 421 objectsEqual = objectsEqual && thisAddress1.equals(thatAddress1); 422 } 423 } 424 425 if(objectsEqual) { 426 String thisAddress2 = getAddress2(); 427 String thatAddress2 = that.getAddress2(); 428 429 if(thisAddress2 == null) { 430 objectsEqual = objectsEqual && (thatAddress2 == null); 431 } else { 432 objectsEqual = objectsEqual && thisAddress2.equals(thatAddress2); 433 } 434 } 435 436 if(objectsEqual) { 437 String thisAddress3 = getAddress3(); 438 String thatAddress3 = that.getAddress3(); 439 440 if(thisAddress3 == null) { 441 objectsEqual = objectsEqual && (thatAddress3 == null); 442 } else { 443 objectsEqual = objectsEqual && thisAddress3.equals(thatAddress3); 444 } 445 } 446 447 if(objectsEqual) { 448 String thisCity = getCity(); 449 String thatCity = that.getCity(); 450 451 if(thisCity == null) { 452 objectsEqual = objectsEqual && (thatCity == null); 453 } else { 454 objectsEqual = objectsEqual && thisCity.equals(thatCity); 455 } 456 } 457 458 if(objectsEqual) { 459 GeoCodePK thisCityGeoCodePK = getCityGeoCodePK(); 460 GeoCodePK thatCityGeoCodePK = that.getCityGeoCodePK(); 461 462 if(thisCityGeoCodePK == null) { 463 objectsEqual = objectsEqual && (thatCityGeoCodePK == null); 464 } else { 465 objectsEqual = objectsEqual && thisCityGeoCodePK.equals(thatCityGeoCodePK); 466 } 467 } 468 469 if(objectsEqual) { 470 GeoCodePK thisCountyGeoCodePK = getCountyGeoCodePK(); 471 GeoCodePK thatCountyGeoCodePK = that.getCountyGeoCodePK(); 472 473 if(thisCountyGeoCodePK == null) { 474 objectsEqual = objectsEqual && (thatCountyGeoCodePK == null); 475 } else { 476 objectsEqual = objectsEqual && thisCountyGeoCodePK.equals(thatCountyGeoCodePK); 477 } 478 } 479 480 if(objectsEqual) { 481 String thisState = getState(); 482 String thatState = that.getState(); 483 484 if(thisState == null) { 485 objectsEqual = objectsEqual && (thatState == null); 486 } else { 487 objectsEqual = objectsEqual && thisState.equals(thatState); 488 } 489 } 490 491 if(objectsEqual) { 492 GeoCodePK thisStateGeoCodePK = getStateGeoCodePK(); 493 GeoCodePK thatStateGeoCodePK = that.getStateGeoCodePK(); 494 495 if(thisStateGeoCodePK == null) { 496 objectsEqual = objectsEqual && (thatStateGeoCodePK == null); 497 } else { 498 objectsEqual = objectsEqual && thisStateGeoCodePK.equals(thatStateGeoCodePK); 499 } 500 } 501 502 if(objectsEqual) { 503 String thisPostalCode = getPostalCode(); 504 String thatPostalCode = that.getPostalCode(); 505 506 if(thisPostalCode == null) { 507 objectsEqual = objectsEqual && (thatPostalCode == null); 508 } else { 509 objectsEqual = objectsEqual && thisPostalCode.equals(thatPostalCode); 510 } 511 } 512 513 if(objectsEqual) { 514 GeoCodePK thisPostalCodeGeoCodePK = getPostalCodeGeoCodePK(); 515 GeoCodePK thatPostalCodeGeoCodePK = that.getPostalCodeGeoCodePK(); 516 517 if(thisPostalCodeGeoCodePK == null) { 518 objectsEqual = objectsEqual && (thatPostalCodeGeoCodePK == null); 519 } else { 520 objectsEqual = objectsEqual && thisPostalCodeGeoCodePK.equals(thatPostalCodeGeoCodePK); 521 } 522 } 523 524 if(objectsEqual) { 525 GeoCodePK thisCountryGeoCodePK = getCountryGeoCodePK(); 526 GeoCodePK thatCountryGeoCodePK = that.getCountryGeoCodePK(); 527 528 if(thisCountryGeoCodePK == null) { 529 objectsEqual = objectsEqual && (thatCountryGeoCodePK == null); 530 } else { 531 objectsEqual = objectsEqual && thisCountryGeoCodePK.equals(thatCountryGeoCodePK); 532 } 533 } 534 535 if(objectsEqual) { 536 Boolean thisIsCommercial = getIsCommercial(); 537 Boolean thatIsCommercial = that.getIsCommercial(); 538 539 if(thisIsCommercial == null) { 540 objectsEqual = objectsEqual && (thatIsCommercial == null); 541 } else { 542 objectsEqual = objectsEqual && thisIsCommercial.equals(thatIsCommercial); 543 } 544 } 545 546 if(objectsEqual) { 547 Long thisFromTime = getFromTime(); 548 Long thatFromTime = that.getFromTime(); 549 550 if(thisFromTime == null) { 551 objectsEqual = objectsEqual && (thatFromTime == null); 552 } else { 553 objectsEqual = objectsEqual && thisFromTime.equals(thatFromTime); 554 } 555 } 556 557 if(objectsEqual) { 558 Long thisThruTime = getThruTime(); 559 Long thatThruTime = that.getThruTime(); 560 561 if(thisThruTime == null) { 562 objectsEqual = objectsEqual && (thatThruTime == null); 563 } else { 564 objectsEqual = objectsEqual && thisThruTime.equals(thatThruTime); 565 } 566 } 567 568 return objectsEqual; 569 } else { 570 return false; 571 } 572 } 573 574 @Override 575 public boolean hasBeenModified() { 576 return contactMechanismPKHasBeenModified || personalTitlePKHasBeenModified || firstNameHasBeenModified || firstNameSdxHasBeenModified || middleNameHasBeenModified || middleNameSdxHasBeenModified || lastNameHasBeenModified || lastNameSdxHasBeenModified || nameSuffixPKHasBeenModified || companyNameHasBeenModified || attentionHasBeenModified || address1HasBeenModified || address2HasBeenModified || address3HasBeenModified || cityHasBeenModified || cityGeoCodePKHasBeenModified || countyGeoCodePKHasBeenModified || stateHasBeenModified || stateGeoCodePKHasBeenModified || postalCodeHasBeenModified || postalCodeGeoCodePKHasBeenModified || countryGeoCodePKHasBeenModified || isCommercialHasBeenModified || fromTimeHasBeenModified || thruTimeHasBeenModified; 577 } 578 579 @Override 580 public void clearHasBeenModified() { 581 contactMechanismPKHasBeenModified = false; 582 personalTitlePKHasBeenModified = false; 583 firstNameHasBeenModified = false; 584 firstNameSdxHasBeenModified = false; 585 middleNameHasBeenModified = false; 586 middleNameSdxHasBeenModified = false; 587 lastNameHasBeenModified = false; 588 lastNameSdxHasBeenModified = false; 589 nameSuffixPKHasBeenModified = false; 590 companyNameHasBeenModified = false; 591 attentionHasBeenModified = false; 592 address1HasBeenModified = false; 593 address2HasBeenModified = false; 594 address3HasBeenModified = false; 595 cityHasBeenModified = false; 596 cityGeoCodePKHasBeenModified = false; 597 countyGeoCodePKHasBeenModified = false; 598 stateHasBeenModified = false; 599 stateGeoCodePKHasBeenModified = false; 600 postalCodeHasBeenModified = false; 601 postalCodeGeoCodePKHasBeenModified = false; 602 countryGeoCodePKHasBeenModified = false; 603 isCommercialHasBeenModified = false; 604 fromTimeHasBeenModified = false; 605 thruTimeHasBeenModified = false; 606 } 607 608 public ContactMechanismPK getContactMechanismPK() { 609 return contactMechanismPK; 610 } 611 612 public void setContactMechanismPK(ContactMechanismPK contactMechanismPK) 613 throws PersistenceNotNullException { 614 checkForNull(contactMechanismPK); 615 616 boolean update = true; 617 618 if(this.contactMechanismPK != null) { 619 if(this.contactMechanismPK.equals(contactMechanismPK)) { 620 update = false; 621 } 622 } else if(contactMechanismPK == null) { 623 update = false; 624 } 625 626 if(update) { 627 this.contactMechanismPK = contactMechanismPK; 628 contactMechanismPKHasBeenModified = true; 629 clearHashAndString(); 630 } 631 } 632 633 public boolean getContactMechanismPKHasBeenModified() { 634 return contactMechanismPKHasBeenModified; 635 } 636 637 public PersonalTitlePK getPersonalTitlePK() { 638 return personalTitlePK; 639 } 640 641 public void setPersonalTitlePK(PersonalTitlePK personalTitlePK) { 642 boolean update = true; 643 644 if(this.personalTitlePK != null) { 645 if(this.personalTitlePK.equals(personalTitlePK)) { 646 update = false; 647 } 648 } else if(personalTitlePK == null) { 649 update = false; 650 } 651 652 if(update) { 653 this.personalTitlePK = personalTitlePK; 654 personalTitlePKHasBeenModified = true; 655 clearHashAndString(); 656 } 657 } 658 659 public boolean getPersonalTitlePKHasBeenModified() { 660 return personalTitlePKHasBeenModified; 661 } 662 663 public String getFirstName() { 664 return firstName; 665 } 666 667 public void setFirstName(String firstName) { 668 boolean update = true; 669 670 if(this.firstName != null) { 671 if(this.firstName.equals(firstName)) { 672 update = false; 673 } 674 } else if(firstName == null) { 675 update = false; 676 } 677 678 if(update) { 679 this.firstName = firstName; 680 firstNameHasBeenModified = true; 681 clearHashAndString(); 682 } 683 } 684 685 public boolean getFirstNameHasBeenModified() { 686 return firstNameHasBeenModified; 687 } 688 689 public String getFirstNameSdx() { 690 return firstNameSdx; 691 } 692 693 public void setFirstNameSdx(String firstNameSdx) { 694 boolean update = true; 695 696 if(this.firstNameSdx != null) { 697 if(this.firstNameSdx.equals(firstNameSdx)) { 698 update = false; 699 } 700 } else if(firstNameSdx == null) { 701 update = false; 702 } 703 704 if(update) { 705 this.firstNameSdx = firstNameSdx; 706 firstNameSdxHasBeenModified = true; 707 clearHashAndString(); 708 } 709 } 710 711 public boolean getFirstNameSdxHasBeenModified() { 712 return firstNameSdxHasBeenModified; 713 } 714 715 public String getMiddleName() { 716 return middleName; 717 } 718 719 public void setMiddleName(String middleName) { 720 boolean update = true; 721 722 if(this.middleName != null) { 723 if(this.middleName.equals(middleName)) { 724 update = false; 725 } 726 } else if(middleName == null) { 727 update = false; 728 } 729 730 if(update) { 731 this.middleName = middleName; 732 middleNameHasBeenModified = true; 733 clearHashAndString(); 734 } 735 } 736 737 public boolean getMiddleNameHasBeenModified() { 738 return middleNameHasBeenModified; 739 } 740 741 public String getMiddleNameSdx() { 742 return middleNameSdx; 743 } 744 745 public void setMiddleNameSdx(String middleNameSdx) { 746 boolean update = true; 747 748 if(this.middleNameSdx != null) { 749 if(this.middleNameSdx.equals(middleNameSdx)) { 750 update = false; 751 } 752 } else if(middleNameSdx == null) { 753 update = false; 754 } 755 756 if(update) { 757 this.middleNameSdx = middleNameSdx; 758 middleNameSdxHasBeenModified = true; 759 clearHashAndString(); 760 } 761 } 762 763 public boolean getMiddleNameSdxHasBeenModified() { 764 return middleNameSdxHasBeenModified; 765 } 766 767 public String getLastName() { 768 return lastName; 769 } 770 771 public void setLastName(String lastName) { 772 boolean update = true; 773 774 if(this.lastName != null) { 775 if(this.lastName.equals(lastName)) { 776 update = false; 777 } 778 } else if(lastName == null) { 779 update = false; 780 } 781 782 if(update) { 783 this.lastName = lastName; 784 lastNameHasBeenModified = true; 785 clearHashAndString(); 786 } 787 } 788 789 public boolean getLastNameHasBeenModified() { 790 return lastNameHasBeenModified; 791 } 792 793 public String getLastNameSdx() { 794 return lastNameSdx; 795 } 796 797 public void setLastNameSdx(String lastNameSdx) { 798 boolean update = true; 799 800 if(this.lastNameSdx != null) { 801 if(this.lastNameSdx.equals(lastNameSdx)) { 802 update = false; 803 } 804 } else if(lastNameSdx == null) { 805 update = false; 806 } 807 808 if(update) { 809 this.lastNameSdx = lastNameSdx; 810 lastNameSdxHasBeenModified = true; 811 clearHashAndString(); 812 } 813 } 814 815 public boolean getLastNameSdxHasBeenModified() { 816 return lastNameSdxHasBeenModified; 817 } 818 819 public NameSuffixPK getNameSuffixPK() { 820 return nameSuffixPK; 821 } 822 823 public void setNameSuffixPK(NameSuffixPK nameSuffixPK) { 824 boolean update = true; 825 826 if(this.nameSuffixPK != null) { 827 if(this.nameSuffixPK.equals(nameSuffixPK)) { 828 update = false; 829 } 830 } else if(nameSuffixPK == null) { 831 update = false; 832 } 833 834 if(update) { 835 this.nameSuffixPK = nameSuffixPK; 836 nameSuffixPKHasBeenModified = true; 837 clearHashAndString(); 838 } 839 } 840 841 public boolean getNameSuffixPKHasBeenModified() { 842 return nameSuffixPKHasBeenModified; 843 } 844 845 public String getCompanyName() { 846 return companyName; 847 } 848 849 public void setCompanyName(String companyName) { 850 boolean update = true; 851 852 if(this.companyName != null) { 853 if(this.companyName.equals(companyName)) { 854 update = false; 855 } 856 } else if(companyName == null) { 857 update = false; 858 } 859 860 if(update) { 861 this.companyName = companyName; 862 companyNameHasBeenModified = true; 863 clearHashAndString(); 864 } 865 } 866 867 public boolean getCompanyNameHasBeenModified() { 868 return companyNameHasBeenModified; 869 } 870 871 public String getAttention() { 872 return attention; 873 } 874 875 public void setAttention(String attention) { 876 boolean update = true; 877 878 if(this.attention != null) { 879 if(this.attention.equals(attention)) { 880 update = false; 881 } 882 } else if(attention == null) { 883 update = false; 884 } 885 886 if(update) { 887 this.attention = attention; 888 attentionHasBeenModified = true; 889 clearHashAndString(); 890 } 891 } 892 893 public boolean getAttentionHasBeenModified() { 894 return attentionHasBeenModified; 895 } 896 897 public String getAddress1() { 898 return address1; 899 } 900 901 public void setAddress1(String address1) 902 throws PersistenceNotNullException { 903 checkForNull(address1); 904 905 boolean update = true; 906 907 if(this.address1 != null) { 908 if(this.address1.equals(address1)) { 909 update = false; 910 } 911 } else if(address1 == null) { 912 update = false; 913 } 914 915 if(update) { 916 this.address1 = address1; 917 address1HasBeenModified = true; 918 clearHashAndString(); 919 } 920 } 921 922 public boolean getAddress1HasBeenModified() { 923 return address1HasBeenModified; 924 } 925 926 public String getAddress2() { 927 return address2; 928 } 929 930 public void setAddress2(String address2) { 931 boolean update = true; 932 933 if(this.address2 != null) { 934 if(this.address2.equals(address2)) { 935 update = false; 936 } 937 } else if(address2 == null) { 938 update = false; 939 } 940 941 if(update) { 942 this.address2 = address2; 943 address2HasBeenModified = true; 944 clearHashAndString(); 945 } 946 } 947 948 public boolean getAddress2HasBeenModified() { 949 return address2HasBeenModified; 950 } 951 952 public String getAddress3() { 953 return address3; 954 } 955 956 public void setAddress3(String address3) { 957 boolean update = true; 958 959 if(this.address3 != null) { 960 if(this.address3.equals(address3)) { 961 update = false; 962 } 963 } else if(address3 == null) { 964 update = false; 965 } 966 967 if(update) { 968 this.address3 = address3; 969 address3HasBeenModified = true; 970 clearHashAndString(); 971 } 972 } 973 974 public boolean getAddress3HasBeenModified() { 975 return address3HasBeenModified; 976 } 977 978 public String getCity() { 979 return city; 980 } 981 982 public void setCity(String city) { 983 boolean update = true; 984 985 if(this.city != null) { 986 if(this.city.equals(city)) { 987 update = false; 988 } 989 } else if(city == null) { 990 update = false; 991 } 992 993 if(update) { 994 this.city = city; 995 cityHasBeenModified = true; 996 clearHashAndString(); 997 } 998 } 999 1000 public boolean getCityHasBeenModified() { 1001 return cityHasBeenModified; 1002 } 1003 1004 public GeoCodePK getCityGeoCodePK() { 1005 return cityGeoCodePK; 1006 } 1007 1008 public void setCityGeoCodePK(GeoCodePK cityGeoCodePK) { 1009 boolean update = true; 1010 1011 if(this.cityGeoCodePK != null) { 1012 if(this.cityGeoCodePK.equals(cityGeoCodePK)) { 1013 update = false; 1014 } 1015 } else if(cityGeoCodePK == null) { 1016 update = false; 1017 } 1018 1019 if(update) { 1020 this.cityGeoCodePK = cityGeoCodePK; 1021 cityGeoCodePKHasBeenModified = true; 1022 clearHashAndString(); 1023 } 1024 } 1025 1026 public boolean getCityGeoCodePKHasBeenModified() { 1027 return cityGeoCodePKHasBeenModified; 1028 } 1029 1030 public GeoCodePK getCountyGeoCodePK() { 1031 return countyGeoCodePK; 1032 } 1033 1034 public void setCountyGeoCodePK(GeoCodePK countyGeoCodePK) { 1035 boolean update = true; 1036 1037 if(this.countyGeoCodePK != null) { 1038 if(this.countyGeoCodePK.equals(countyGeoCodePK)) { 1039 update = false; 1040 } 1041 } else if(countyGeoCodePK == null) { 1042 update = false; 1043 } 1044 1045 if(update) { 1046 this.countyGeoCodePK = countyGeoCodePK; 1047 countyGeoCodePKHasBeenModified = true; 1048 clearHashAndString(); 1049 } 1050 } 1051 1052 public boolean getCountyGeoCodePKHasBeenModified() { 1053 return countyGeoCodePKHasBeenModified; 1054 } 1055 1056 public String getState() { 1057 return state; 1058 } 1059 1060 public void setState(String state) { 1061 boolean update = true; 1062 1063 if(this.state != null) { 1064 if(this.state.equals(state)) { 1065 update = false; 1066 } 1067 } else if(state == null) { 1068 update = false; 1069 } 1070 1071 if(update) { 1072 this.state = state; 1073 stateHasBeenModified = true; 1074 clearHashAndString(); 1075 } 1076 } 1077 1078 public boolean getStateHasBeenModified() { 1079 return stateHasBeenModified; 1080 } 1081 1082 public GeoCodePK getStateGeoCodePK() { 1083 return stateGeoCodePK; 1084 } 1085 1086 public void setStateGeoCodePK(GeoCodePK stateGeoCodePK) { 1087 boolean update = true; 1088 1089 if(this.stateGeoCodePK != null) { 1090 if(this.stateGeoCodePK.equals(stateGeoCodePK)) { 1091 update = false; 1092 } 1093 } else if(stateGeoCodePK == null) { 1094 update = false; 1095 } 1096 1097 if(update) { 1098 this.stateGeoCodePK = stateGeoCodePK; 1099 stateGeoCodePKHasBeenModified = true; 1100 clearHashAndString(); 1101 } 1102 } 1103 1104 public boolean getStateGeoCodePKHasBeenModified() { 1105 return stateGeoCodePKHasBeenModified; 1106 } 1107 1108 public String getPostalCode() { 1109 return postalCode; 1110 } 1111 1112 public void setPostalCode(String postalCode) { 1113 boolean update = true; 1114 1115 if(this.postalCode != null) { 1116 if(this.postalCode.equals(postalCode)) { 1117 update = false; 1118 } 1119 } else if(postalCode == null) { 1120 update = false; 1121 } 1122 1123 if(update) { 1124 this.postalCode = postalCode; 1125 postalCodeHasBeenModified = true; 1126 clearHashAndString(); 1127 } 1128 } 1129 1130 public boolean getPostalCodeHasBeenModified() { 1131 return postalCodeHasBeenModified; 1132 } 1133 1134 public GeoCodePK getPostalCodeGeoCodePK() { 1135 return postalCodeGeoCodePK; 1136 } 1137 1138 public void setPostalCodeGeoCodePK(GeoCodePK postalCodeGeoCodePK) { 1139 boolean update = true; 1140 1141 if(this.postalCodeGeoCodePK != null) { 1142 if(this.postalCodeGeoCodePK.equals(postalCodeGeoCodePK)) { 1143 update = false; 1144 } 1145 } else if(postalCodeGeoCodePK == null) { 1146 update = false; 1147 } 1148 1149 if(update) { 1150 this.postalCodeGeoCodePK = postalCodeGeoCodePK; 1151 postalCodeGeoCodePKHasBeenModified = true; 1152 clearHashAndString(); 1153 } 1154 } 1155 1156 public boolean getPostalCodeGeoCodePKHasBeenModified() { 1157 return postalCodeGeoCodePKHasBeenModified; 1158 } 1159 1160 public GeoCodePK getCountryGeoCodePK() { 1161 return countryGeoCodePK; 1162 } 1163 1164 public void setCountryGeoCodePK(GeoCodePK countryGeoCodePK) 1165 throws PersistenceNotNullException { 1166 checkForNull(countryGeoCodePK); 1167 1168 boolean update = true; 1169 1170 if(this.countryGeoCodePK != null) { 1171 if(this.countryGeoCodePK.equals(countryGeoCodePK)) { 1172 update = false; 1173 } 1174 } else if(countryGeoCodePK == null) { 1175 update = false; 1176 } 1177 1178 if(update) { 1179 this.countryGeoCodePK = countryGeoCodePK; 1180 countryGeoCodePKHasBeenModified = true; 1181 clearHashAndString(); 1182 } 1183 } 1184 1185 public boolean getCountryGeoCodePKHasBeenModified() { 1186 return countryGeoCodePKHasBeenModified; 1187 } 1188 1189 public Boolean getIsCommercial() { 1190 return isCommercial; 1191 } 1192 1193 public void setIsCommercial(Boolean isCommercial) 1194 throws PersistenceNotNullException { 1195 checkForNull(isCommercial); 1196 1197 boolean update = true; 1198 1199 if(this.isCommercial != null) { 1200 if(this.isCommercial.equals(isCommercial)) { 1201 update = false; 1202 } 1203 } else if(isCommercial == null) { 1204 update = false; 1205 } 1206 1207 if(update) { 1208 this.isCommercial = isCommercial; 1209 isCommercialHasBeenModified = true; 1210 clearHashAndString(); 1211 } 1212 } 1213 1214 public boolean getIsCommercialHasBeenModified() { 1215 return isCommercialHasBeenModified; 1216 } 1217 1218 public Long getFromTime() { 1219 return fromTime; 1220 } 1221 1222 public void setFromTime(Long fromTime) 1223 throws PersistenceNotNullException { 1224 checkForNull(fromTime); 1225 1226 boolean update = true; 1227 1228 if(this.fromTime != null) { 1229 if(this.fromTime.equals(fromTime)) { 1230 update = false; 1231 } 1232 } else if(fromTime == null) { 1233 update = false; 1234 } 1235 1236 if(update) { 1237 this.fromTime = fromTime; 1238 fromTimeHasBeenModified = true; 1239 clearHashAndString(); 1240 } 1241 } 1242 1243 public boolean getFromTimeHasBeenModified() { 1244 return fromTimeHasBeenModified; 1245 } 1246 1247 public Long getThruTime() { 1248 return thruTime; 1249 } 1250 1251 public void setThruTime(Long thruTime) 1252 throws PersistenceNotNullException { 1253 checkForNull(thruTime); 1254 1255 boolean update = true; 1256 1257 if(this.thruTime != null) { 1258 if(this.thruTime.equals(thruTime)) { 1259 update = false; 1260 } 1261 } else if(thruTime == null) { 1262 update = false; 1263 } 1264 1265 if(update) { 1266 this.thruTime = thruTime; 1267 thruTimeHasBeenModified = true; 1268 clearHashAndString(); 1269 } 1270 } 1271 1272 public boolean getThruTimeHasBeenModified() { 1273 return thruTimeHasBeenModified; 1274 } 1275 1276}