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 * 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            StringBuilder stringValue = new StringBuilder("{");
180            
181            stringValue.append("entityId=").append(getEntityId());
182            
183            stringValue.append(", contactMechanismPK=").append(getContactMechanismPK());
184            stringValue.append(", address1=").append(getAddress1());
185            stringValue.append(", address2=").append(getAddress2());
186            stringValue.append(", address3=").append(getAddress3());
187            stringValue.append(", city=").append(getCity());
188            stringValue.append(", cityGeoCodePK=").append(getCityGeoCodePK());
189            stringValue.append(", countyGeoCodePK=").append(getCountyGeoCodePK());
190            stringValue.append(", state=").append(getState());
191            stringValue.append(", stateGeoCodePK=").append(getStateGeoCodePK());
192            stringValue.append(", postalCode=").append(getPostalCode());
193            stringValue.append(", postalCodeGeoCodePK=").append(getPostalCodeGeoCodePK());
194            stringValue.append(", countryGeoCodePK=").append(getCountryGeoCodePK());
195            stringValue.append(", fromTime=").append(getFromTime());
196            stringValue.append(", thruTime=").append(getThruTime());
197            
198            stringValue.append('}');
199            
200            _stringValue = stringValue.toString();
201        }
202        return _stringValue;
203    }
204    
205    @Override
206    public boolean equals(Object other) {
207        if(this == other)
208            return true;
209        
210        if(!hasIdentity())
211            return false;
212        
213        if(other instanceof  ContactPostalAddressCorrectionValue) {
214            ContactPostalAddressCorrectionValue that = (ContactPostalAddressCorrectionValue)other;
215            
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 = 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) {
234            ContactPostalAddressCorrectionValue that = (ContactPostalAddressCorrectionValue)other;
235            boolean objectsEqual = true;
236            
237            
238            if(objectsEqual) {
239                ContactMechanismPK thisContactMechanismPK = getContactMechanismPK();
240                ContactMechanismPK thatContactMechanismPK = that.getContactMechanismPK();
241                
242                if(thisContactMechanismPK == null) {
243                    objectsEqual = objectsEqual && (thatContactMechanismPK == null);
244                } else {
245                    objectsEqual = objectsEqual && thisContactMechanismPK.equals(thatContactMechanismPK);
246                }
247            }
248            
249            if(objectsEqual) {
250                String thisAddress1 = getAddress1();
251                String thatAddress1 = that.getAddress1();
252                
253                if(thisAddress1 == null) {
254                    objectsEqual = objectsEqual && (thatAddress1 == null);
255                } else {
256                    objectsEqual = objectsEqual && thisAddress1.equals(thatAddress1);
257                }
258            }
259            
260            if(objectsEqual) {
261                String thisAddress2 = getAddress2();
262                String thatAddress2 = that.getAddress2();
263                
264                if(thisAddress2 == null) {
265                    objectsEqual = objectsEqual && (thatAddress2 == null);
266                } else {
267                    objectsEqual = objectsEqual && thisAddress2.equals(thatAddress2);
268                }
269            }
270            
271            if(objectsEqual) {
272                String thisAddress3 = getAddress3();
273                String thatAddress3 = that.getAddress3();
274                
275                if(thisAddress3 == null) {
276                    objectsEqual = objectsEqual && (thatAddress3 == null);
277                } else {
278                    objectsEqual = objectsEqual && thisAddress3.equals(thatAddress3);
279                }
280            }
281            
282            if(objectsEqual) {
283                String thisCity = getCity();
284                String thatCity = that.getCity();
285                
286                if(thisCity == null) {
287                    objectsEqual = objectsEqual && (thatCity == null);
288                } else {
289                    objectsEqual = objectsEqual && thisCity.equals(thatCity);
290                }
291            }
292            
293            if(objectsEqual) {
294                GeoCodePK thisCityGeoCodePK = getCityGeoCodePK();
295                GeoCodePK thatCityGeoCodePK = that.getCityGeoCodePK();
296                
297                if(thisCityGeoCodePK == null) {
298                    objectsEqual = objectsEqual && (thatCityGeoCodePK == null);
299                } else {
300                    objectsEqual = objectsEqual && thisCityGeoCodePK.equals(thatCityGeoCodePK);
301                }
302            }
303            
304            if(objectsEqual) {
305                GeoCodePK thisCountyGeoCodePK = getCountyGeoCodePK();
306                GeoCodePK thatCountyGeoCodePK = that.getCountyGeoCodePK();
307                
308                if(thisCountyGeoCodePK == null) {
309                    objectsEqual = objectsEqual && (thatCountyGeoCodePK == null);
310                } else {
311                    objectsEqual = objectsEqual && thisCountyGeoCodePK.equals(thatCountyGeoCodePK);
312                }
313            }
314            
315            if(objectsEqual) {
316                String thisState = getState();
317                String thatState = that.getState();
318                
319                if(thisState == null) {
320                    objectsEqual = objectsEqual && (thatState == null);
321                } else {
322                    objectsEqual = objectsEqual && thisState.equals(thatState);
323                }
324            }
325            
326            if(objectsEqual) {
327                GeoCodePK thisStateGeoCodePK = getStateGeoCodePK();
328                GeoCodePK thatStateGeoCodePK = that.getStateGeoCodePK();
329                
330                if(thisStateGeoCodePK == null) {
331                    objectsEqual = objectsEqual && (thatStateGeoCodePK == null);
332                } else {
333                    objectsEqual = objectsEqual && thisStateGeoCodePK.equals(thatStateGeoCodePK);
334                }
335            }
336            
337            if(objectsEqual) {
338                String thisPostalCode = getPostalCode();
339                String thatPostalCode = that.getPostalCode();
340                
341                if(thisPostalCode == null) {
342                    objectsEqual = objectsEqual && (thatPostalCode == null);
343                } else {
344                    objectsEqual = objectsEqual && thisPostalCode.equals(thatPostalCode);
345                }
346            }
347            
348            if(objectsEqual) {
349                GeoCodePK thisPostalCodeGeoCodePK = getPostalCodeGeoCodePK();
350                GeoCodePK thatPostalCodeGeoCodePK = that.getPostalCodeGeoCodePK();
351                
352                if(thisPostalCodeGeoCodePK == null) {
353                    objectsEqual = objectsEqual && (thatPostalCodeGeoCodePK == null);
354                } else {
355                    objectsEqual = objectsEqual && thisPostalCodeGeoCodePK.equals(thatPostalCodeGeoCodePK);
356                }
357            }
358            
359            if(objectsEqual) {
360                GeoCodePK thisCountryGeoCodePK = getCountryGeoCodePK();
361                GeoCodePK thatCountryGeoCodePK = that.getCountryGeoCodePK();
362                
363                if(thisCountryGeoCodePK == null) {
364                    objectsEqual = objectsEqual && (thatCountryGeoCodePK == null);
365                } else {
366                    objectsEqual = objectsEqual && thisCountryGeoCodePK.equals(thatCountryGeoCodePK);
367                }
368            }
369            
370            if(objectsEqual) {
371                Long thisFromTime = getFromTime();
372                Long thatFromTime = that.getFromTime();
373                
374                if(thisFromTime == null) {
375                    objectsEqual = objectsEqual && (thatFromTime == null);
376                } else {
377                    objectsEqual = objectsEqual && thisFromTime.equals(thatFromTime);
378                }
379            }
380            
381            if(objectsEqual) {
382                Long thisThruTime = getThruTime();
383                Long thatThruTime = that.getThruTime();
384                
385                if(thisThruTime == null) {
386                    objectsEqual = objectsEqual && (thatThruTime == null);
387                } else {
388                    objectsEqual = objectsEqual && thisThruTime.equals(thatThruTime);
389                }
390            }
391            
392            return objectsEqual;
393        } else {
394            return false;
395        }
396    }
397    
398    @Override
399    public boolean hasBeenModified() {
400        return contactMechanismPKHasBeenModified || address1HasBeenModified || address2HasBeenModified || address3HasBeenModified || cityHasBeenModified || cityGeoCodePKHasBeenModified || countyGeoCodePKHasBeenModified || stateHasBeenModified || stateGeoCodePKHasBeenModified || postalCodeHasBeenModified || postalCodeGeoCodePKHasBeenModified || countryGeoCodePKHasBeenModified || fromTimeHasBeenModified || thruTimeHasBeenModified;
401    }
402    
403    @Override
404    public void clearHasBeenModified() {
405        contactMechanismPKHasBeenModified = false;
406        address1HasBeenModified = false;
407        address2HasBeenModified = false;
408        address3HasBeenModified = false;
409        cityHasBeenModified = false;
410        cityGeoCodePKHasBeenModified = false;
411        countyGeoCodePKHasBeenModified = false;
412        stateHasBeenModified = false;
413        stateGeoCodePKHasBeenModified = false;
414        postalCodeHasBeenModified = false;
415        postalCodeGeoCodePKHasBeenModified = false;
416        countryGeoCodePKHasBeenModified = false;
417        fromTimeHasBeenModified = false;
418        thruTimeHasBeenModified = false;
419    }
420    
421    public ContactMechanismPK getContactMechanismPK() {
422        return contactMechanismPK;
423    }
424    
425    public void setContactMechanismPK(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    public String getAddress1() {
451        return address1;
452    }
453    
454    public void setAddress1(String address1)
455            throws PersistenceNotNullException {
456        checkForNull(address1);
457        
458        boolean update = true;
459        
460        if(this.address1 != null) {
461            if(this.address1.equals(address1)) {
462                update = false;
463            }
464        } else if(address1 == null) {
465            update = false;
466        }
467        
468        if(update) {
469            this.address1 = address1;
470            address1HasBeenModified = true;
471            clearHashAndString();
472        }
473    }
474    
475    public boolean getAddress1HasBeenModified() {
476        return address1HasBeenModified;
477    }
478    
479    public String getAddress2() {
480        return address2;
481    }
482    
483    public void setAddress2(String address2) {
484        boolean update = true;
485        
486        if(this.address2 != null) {
487            if(this.address2.equals(address2)) {
488                update = false;
489            }
490        } else if(address2 == null) {
491            update = false;
492        }
493        
494        if(update) {
495            this.address2 = address2;
496            address2HasBeenModified = true;
497            clearHashAndString();
498        }
499    }
500    
501    public boolean getAddress2HasBeenModified() {
502        return address2HasBeenModified;
503    }
504    
505    public String getAddress3() {
506        return address3;
507    }
508    
509    public void setAddress3(String address3) {
510        boolean update = true;
511        
512        if(this.address3 != null) {
513            if(this.address3.equals(address3)) {
514                update = false;
515            }
516        } else if(address3 == null) {
517            update = false;
518        }
519        
520        if(update) {
521            this.address3 = address3;
522            address3HasBeenModified = true;
523            clearHashAndString();
524        }
525    }
526    
527    public boolean getAddress3HasBeenModified() {
528        return address3HasBeenModified;
529    }
530    
531    public String getCity() {
532        return city;
533    }
534    
535    public void setCity(String city)
536            throws PersistenceNotNullException {
537        checkForNull(city);
538        
539        boolean update = true;
540        
541        if(this.city != null) {
542            if(this.city.equals(city)) {
543                update = false;
544            }
545        } else if(city == null) {
546            update = false;
547        }
548        
549        if(update) {
550            this.city = city;
551            cityHasBeenModified = true;
552            clearHashAndString();
553        }
554    }
555    
556    public boolean getCityHasBeenModified() {
557        return cityHasBeenModified;
558    }
559    
560    public GeoCodePK getCityGeoCodePK() {
561        return cityGeoCodePK;
562    }
563    
564    public void setCityGeoCodePK(GeoCodePK cityGeoCodePK) {
565        boolean update = true;
566        
567        if(this.cityGeoCodePK != null) {
568            if(this.cityGeoCodePK.equals(cityGeoCodePK)) {
569                update = false;
570            }
571        } else if(cityGeoCodePK == null) {
572            update = false;
573        }
574        
575        if(update) {
576            this.cityGeoCodePK = cityGeoCodePK;
577            cityGeoCodePKHasBeenModified = true;
578            clearHashAndString();
579        }
580    }
581    
582    public boolean getCityGeoCodePKHasBeenModified() {
583        return cityGeoCodePKHasBeenModified;
584    }
585    
586    public GeoCodePK getCountyGeoCodePK() {
587        return countyGeoCodePK;
588    }
589    
590    public void setCountyGeoCodePK(GeoCodePK countyGeoCodePK) {
591        boolean update = true;
592        
593        if(this.countyGeoCodePK != null) {
594            if(this.countyGeoCodePK.equals(countyGeoCodePK)) {
595                update = false;
596            }
597        } else if(countyGeoCodePK == null) {
598            update = false;
599        }
600        
601        if(update) {
602            this.countyGeoCodePK = countyGeoCodePK;
603            countyGeoCodePKHasBeenModified = true;
604            clearHashAndString();
605        }
606    }
607    
608    public boolean getCountyGeoCodePKHasBeenModified() {
609        return countyGeoCodePKHasBeenModified;
610    }
611    
612    public String getState() {
613        return state;
614    }
615    
616    public void setState(String state)
617            throws PersistenceNotNullException {
618        checkForNull(state);
619        
620        boolean update = true;
621        
622        if(this.state != null) {
623            if(this.state.equals(state)) {
624                update = false;
625            }
626        } else if(state == null) {
627            update = false;
628        }
629        
630        if(update) {
631            this.state = state;
632            stateHasBeenModified = true;
633            clearHashAndString();
634        }
635    }
636    
637    public boolean getStateHasBeenModified() {
638        return stateHasBeenModified;
639    }
640    
641    public GeoCodePK getStateGeoCodePK() {
642        return stateGeoCodePK;
643    }
644    
645    public void setStateGeoCodePK(GeoCodePK stateGeoCodePK) {
646        boolean update = true;
647        
648        if(this.stateGeoCodePK != null) {
649            if(this.stateGeoCodePK.equals(stateGeoCodePK)) {
650                update = false;
651            }
652        } else if(stateGeoCodePK == null) {
653            update = false;
654        }
655        
656        if(update) {
657            this.stateGeoCodePK = stateGeoCodePK;
658            stateGeoCodePKHasBeenModified = true;
659            clearHashAndString();
660        }
661    }
662    
663    public boolean getStateGeoCodePKHasBeenModified() {
664        return stateGeoCodePKHasBeenModified;
665    }
666    
667    public String getPostalCode() {
668        return postalCode;
669    }
670    
671    public void setPostalCode(String postalCode)
672            throws PersistenceNotNullException {
673        checkForNull(postalCode);
674        
675        boolean update = true;
676        
677        if(this.postalCode != null) {
678            if(this.postalCode.equals(postalCode)) {
679                update = false;
680            }
681        } else if(postalCode == null) {
682            update = false;
683        }
684        
685        if(update) {
686            this.postalCode = postalCode;
687            postalCodeHasBeenModified = true;
688            clearHashAndString();
689        }
690    }
691    
692    public boolean getPostalCodeHasBeenModified() {
693        return postalCodeHasBeenModified;
694    }
695    
696    public GeoCodePK getPostalCodeGeoCodePK() {
697        return postalCodeGeoCodePK;
698    }
699    
700    public void setPostalCodeGeoCodePK(GeoCodePK postalCodeGeoCodePK) {
701        boolean update = true;
702        
703        if(this.postalCodeGeoCodePK != null) {
704            if(this.postalCodeGeoCodePK.equals(postalCodeGeoCodePK)) {
705                update = false;
706            }
707        } else if(postalCodeGeoCodePK == null) {
708            update = false;
709        }
710        
711        if(update) {
712            this.postalCodeGeoCodePK = postalCodeGeoCodePK;
713            postalCodeGeoCodePKHasBeenModified = true;
714            clearHashAndString();
715        }
716    }
717    
718    public boolean getPostalCodeGeoCodePKHasBeenModified() {
719        return postalCodeGeoCodePKHasBeenModified;
720    }
721    
722    public GeoCodePK getCountryGeoCodePK() {
723        return countryGeoCodePK;
724    }
725    
726    public void setCountryGeoCodePK(GeoCodePK countryGeoCodePK)
727            throws PersistenceNotNullException {
728        checkForNull(countryGeoCodePK);
729        
730        boolean update = true;
731        
732        if(this.countryGeoCodePK != null) {
733            if(this.countryGeoCodePK.equals(countryGeoCodePK)) {
734                update = false;
735            }
736        } else if(countryGeoCodePK == null) {
737            update = false;
738        }
739        
740        if(update) {
741            this.countryGeoCodePK = countryGeoCodePK;
742            countryGeoCodePKHasBeenModified = true;
743            clearHashAndString();
744        }
745    }
746    
747    public boolean getCountryGeoCodePKHasBeenModified() {
748        return countryGeoCodePKHasBeenModified;
749    }
750    
751    public Long getFromTime() {
752        return fromTime;
753    }
754    
755    public void setFromTime(Long fromTime)
756            throws PersistenceNotNullException {
757        checkForNull(fromTime);
758        
759        boolean update = true;
760        
761        if(this.fromTime != null) {
762            if(this.fromTime.equals(fromTime)) {
763                update = false;
764            }
765        } else if(fromTime == null) {
766            update = false;
767        }
768        
769        if(update) {
770            this.fromTime = fromTime;
771            fromTimeHasBeenModified = true;
772            clearHashAndString();
773        }
774    }
775    
776    public boolean getFromTimeHasBeenModified() {
777        return fromTimeHasBeenModified;
778    }
779    
780    public Long getThruTime() {
781        return thruTime;
782    }
783    
784    public void setThruTime(Long thruTime)
785            throws PersistenceNotNullException {
786        checkForNull(thruTime);
787        
788        boolean update = true;
789        
790        if(this.thruTime != null) {
791            if(this.thruTime.equals(thruTime)) {
792                update = false;
793            }
794        } else if(thruTime == null) {
795            update = false;
796        }
797        
798        if(update) {
799            this.thruTime = thruTime;
800            thruTimeHasBeenModified = true;
801            clearHashAndString();
802        }
803    }
804    
805    public boolean getThruTimeHasBeenModified() {
806        return thruTimeHasBeenModified;
807    }
808    
809}