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