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 * GeoCodeCountryValue.java
021 */
022
023package com.echothree.model.data.geo.server.value;
024
025import com.echothree.model.data.geo.common.pk.GeoCodeCountryPK;
026
027import com.echothree.model.data.geo.server.factory.GeoCodeCountryFactory;
028
029import com.echothree.model.data.geo.common.pk.GeoCodePK;
030import com.echothree.model.data.contact.common.pk.PostalAddressFormatPK;
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 GeoCodeCountryValue
040        extends BaseValue<GeoCodeCountryPK>
041        implements Cloneable, Serializable {
042    
043    private GeoCodePK geoCodePK;
044    private boolean geoCodePKHasBeenModified = false;
045    private String telephoneCode;
046    private boolean telephoneCodeHasBeenModified = false;
047    private String areaCodePattern;
048    private boolean areaCodePatternHasBeenModified = false;
049    private Boolean areaCodeRequired;
050    private boolean areaCodeRequiredHasBeenModified = false;
051    private String areaCodeExample;
052    private boolean areaCodeExampleHasBeenModified = false;
053    private String telephoneNumberPattern;
054    private boolean telephoneNumberPatternHasBeenModified = false;
055    private String telephoneNumberExample;
056    private boolean telephoneNumberExampleHasBeenModified = false;
057    private PostalAddressFormatPK postalAddressFormatPK;
058    private boolean postalAddressFormatPKHasBeenModified = false;
059    private Boolean cityRequired;
060    private boolean cityRequiredHasBeenModified = false;
061    private Boolean cityGeoCodeRequired;
062    private boolean cityGeoCodeRequiredHasBeenModified = false;
063    private Boolean stateRequired;
064    private boolean stateRequiredHasBeenModified = false;
065    private Boolean stateGeoCodeRequired;
066    private boolean stateGeoCodeRequiredHasBeenModified = false;
067    private String postalCodePattern;
068    private boolean postalCodePatternHasBeenModified = false;
069    private Boolean postalCodeRequired;
070    private boolean postalCodeRequiredHasBeenModified = false;
071    private Boolean postalCodeGeoCodeRequired;
072    private boolean postalCodeGeoCodeRequiredHasBeenModified = false;
073    private Integer postalCodeLength;
074    private boolean postalCodeLengthHasBeenModified = false;
075    private Integer postalCodeGeoCodeLength;
076    private boolean postalCodeGeoCodeLengthHasBeenModified = false;
077    private String postalCodeExample;
078    private boolean postalCodeExampleHasBeenModified = false;
079    private Long fromTime;
080    private boolean fromTimeHasBeenModified = false;
081    private Long thruTime;
082    private boolean thruTimeHasBeenModified = false;
083    
084    private transient Integer _hashCode = null;
085    private transient String _stringValue = null;
086    
087    private void constructFields(GeoCodePK geoCodePK, String telephoneCode, String areaCodePattern, Boolean areaCodeRequired, String areaCodeExample, String telephoneNumberPattern, String telephoneNumberExample, PostalAddressFormatPK postalAddressFormatPK, Boolean cityRequired, Boolean cityGeoCodeRequired, Boolean stateRequired, Boolean stateGeoCodeRequired, String postalCodePattern, Boolean postalCodeRequired, Boolean postalCodeGeoCodeRequired, Integer postalCodeLength, Integer postalCodeGeoCodeLength, String postalCodeExample, Long fromTime, Long thruTime)
088            throws PersistenceNotNullException {
089        checkForNull(geoCodePK);
090        this.geoCodePK = geoCodePK;
091        this.telephoneCode = telephoneCode;
092        this.areaCodePattern = areaCodePattern;
093        checkForNull(areaCodeRequired);
094        this.areaCodeRequired = areaCodeRequired;
095        this.areaCodeExample = areaCodeExample;
096        this.telephoneNumberPattern = telephoneNumberPattern;
097        this.telephoneNumberExample = telephoneNumberExample;
098        checkForNull(postalAddressFormatPK);
099        this.postalAddressFormatPK = postalAddressFormatPK;
100        checkForNull(cityRequired);
101        this.cityRequired = cityRequired;
102        checkForNull(cityGeoCodeRequired);
103        this.cityGeoCodeRequired = cityGeoCodeRequired;
104        checkForNull(stateRequired);
105        this.stateRequired = stateRequired;
106        checkForNull(stateGeoCodeRequired);
107        this.stateGeoCodeRequired = stateGeoCodeRequired;
108        this.postalCodePattern = postalCodePattern;
109        checkForNull(postalCodeRequired);
110        this.postalCodeRequired = postalCodeRequired;
111        checkForNull(postalCodeGeoCodeRequired);
112        this.postalCodeGeoCodeRequired = postalCodeGeoCodeRequired;
113        this.postalCodeLength = postalCodeLength;
114        this.postalCodeGeoCodeLength = postalCodeGeoCodeLength;
115        this.postalCodeExample = postalCodeExample;
116        checkForNull(fromTime);
117        this.fromTime = fromTime;
118        checkForNull(thruTime);
119        this.thruTime = thruTime;
120    }
121    
122    /** Creates a new instance of GeoCodeCountryValue */
123    public GeoCodeCountryValue(GeoCodeCountryPK geoCodeCountryPK, GeoCodePK geoCodePK, String telephoneCode, String areaCodePattern, Boolean areaCodeRequired, String areaCodeExample, String telephoneNumberPattern, String telephoneNumberExample, PostalAddressFormatPK postalAddressFormatPK, Boolean cityRequired, Boolean cityGeoCodeRequired, Boolean stateRequired, Boolean stateGeoCodeRequired, String postalCodePattern, Boolean postalCodeRequired, Boolean postalCodeGeoCodeRequired, Integer postalCodeLength, Integer postalCodeGeoCodeLength, String postalCodeExample, Long fromTime, Long thruTime)
124            throws PersistenceNotNullException {
125        super(geoCodeCountryPK);
126        constructFields(geoCodePK, telephoneCode, areaCodePattern, areaCodeRequired, areaCodeExample, telephoneNumberPattern, telephoneNumberExample, postalAddressFormatPK, cityRequired, cityGeoCodeRequired, stateRequired, stateGeoCodeRequired, postalCodePattern, postalCodeRequired, postalCodeGeoCodeRequired, postalCodeLength, postalCodeGeoCodeLength, postalCodeExample, fromTime, thruTime);
127    }
128    
129    /** Creates a new instance of GeoCodeCountryValue */
130    public GeoCodeCountryValue(GeoCodePK geoCodePK, String telephoneCode, String areaCodePattern, Boolean areaCodeRequired, String areaCodeExample, String telephoneNumberPattern, String telephoneNumberExample, PostalAddressFormatPK postalAddressFormatPK, Boolean cityRequired, Boolean cityGeoCodeRequired, Boolean stateRequired, Boolean stateGeoCodeRequired, String postalCodePattern, Boolean postalCodeRequired, Boolean postalCodeGeoCodeRequired, Integer postalCodeLength, Integer postalCodeGeoCodeLength, String postalCodeExample, Long fromTime, Long thruTime)
131            throws PersistenceNotNullException {
132        super();
133        constructFields(geoCodePK, telephoneCode, areaCodePattern, areaCodeRequired, areaCodeExample, telephoneNumberPattern, telephoneNumberExample, postalAddressFormatPK, cityRequired, cityGeoCodeRequired, stateRequired, stateGeoCodeRequired, postalCodePattern, postalCodeRequired, postalCodeGeoCodeRequired, postalCodeLength, postalCodeGeoCodeLength, postalCodeExample, fromTime, thruTime);
134    }
135    
136   @Override
137   public GeoCodeCountryFactory getBaseFactoryInstance() {
138        return GeoCodeCountryFactory.getInstance();
139    }
140    
141    @Override
142    public GeoCodeCountryValue clone() {
143        Object result;
144        
145        try {
146            result = super.clone();
147        } catch (CloneNotSupportedException cnse) {
148            // This shouldn't happen, fail when it does.
149            throw new PersistenceCloneException(cnse);
150        }
151        
152        return (GeoCodeCountryValue)result;
153    }
154    
155   @Override
156    public GeoCodeCountryPK getPrimaryKey() {
157        if(_primaryKey == null) {
158            _primaryKey = new GeoCodeCountryPK(entityId);
159        }
160        
161        return _primaryKey;
162    }
163    
164    private void clearHashAndString() {
165        _hashCode = null;
166        _stringValue = null;
167    }
168    
169    @Override
170    public int hashCode() {
171        if(_hashCode == null) {
172            int hashCode = 17;
173            
174            hashCode = 37 * hashCode + ((entityId != null) ? entityId.hashCode() : 0);
175            
176            hashCode = 37 * hashCode + ((geoCodePK != null) ? geoCodePK.hashCode() : 0);
177            hashCode = 37 * hashCode + ((telephoneCode != null) ? telephoneCode.hashCode() : 0);
178            hashCode = 37 * hashCode + ((areaCodePattern != null) ? areaCodePattern.hashCode() : 0);
179            hashCode = 37 * hashCode + ((areaCodeRequired != null) ? areaCodeRequired.hashCode() : 0);
180            hashCode = 37 * hashCode + ((areaCodeExample != null) ? areaCodeExample.hashCode() : 0);
181            hashCode = 37 * hashCode + ((telephoneNumberPattern != null) ? telephoneNumberPattern.hashCode() : 0);
182            hashCode = 37 * hashCode + ((telephoneNumberExample != null) ? telephoneNumberExample.hashCode() : 0);
183            hashCode = 37 * hashCode + ((postalAddressFormatPK != null) ? postalAddressFormatPK.hashCode() : 0);
184            hashCode = 37 * hashCode + ((cityRequired != null) ? cityRequired.hashCode() : 0);
185            hashCode = 37 * hashCode + ((cityGeoCodeRequired != null) ? cityGeoCodeRequired.hashCode() : 0);
186            hashCode = 37 * hashCode + ((stateRequired != null) ? stateRequired.hashCode() : 0);
187            hashCode = 37 * hashCode + ((stateGeoCodeRequired != null) ? stateGeoCodeRequired.hashCode() : 0);
188            hashCode = 37 * hashCode + ((postalCodePattern != null) ? postalCodePattern.hashCode() : 0);
189            hashCode = 37 * hashCode + ((postalCodeRequired != null) ? postalCodeRequired.hashCode() : 0);
190            hashCode = 37 * hashCode + ((postalCodeGeoCodeRequired != null) ? postalCodeGeoCodeRequired.hashCode() : 0);
191            hashCode = 37 * hashCode + ((postalCodeLength != null) ? postalCodeLength.hashCode() : 0);
192            hashCode = 37 * hashCode + ((postalCodeGeoCodeLength != null) ? postalCodeGeoCodeLength.hashCode() : 0);
193            hashCode = 37 * hashCode + ((postalCodeExample != null) ? postalCodeExample.hashCode() : 0);
194            hashCode = 37 * hashCode + ((fromTime != null) ? fromTime.hashCode() : 0);
195            hashCode = 37 * hashCode + ((thruTime != null) ? thruTime.hashCode() : 0);
196            
197            _hashCode = hashCode;
198        }
199        
200        return _hashCode;
201    }
202    
203    @Override
204    public String toString() {
205        if(_stringValue == null) {
206            StringBuilder stringValue = new StringBuilder("{");
207            
208            stringValue.append("entityId=").append(getEntityId());
209            
210            stringValue.append(", geoCodePK=").append(getGeoCodePK());
211            stringValue.append(", telephoneCode=").append(getTelephoneCode());
212            stringValue.append(", areaCodePattern=").append(getAreaCodePattern());
213            stringValue.append(", areaCodeRequired=").append(getAreaCodeRequired());
214            stringValue.append(", areaCodeExample=").append(getAreaCodeExample());
215            stringValue.append(", telephoneNumberPattern=").append(getTelephoneNumberPattern());
216            stringValue.append(", telephoneNumberExample=").append(getTelephoneNumberExample());
217            stringValue.append(", postalAddressFormatPK=").append(getPostalAddressFormatPK());
218            stringValue.append(", cityRequired=").append(getCityRequired());
219            stringValue.append(", cityGeoCodeRequired=").append(getCityGeoCodeRequired());
220            stringValue.append(", stateRequired=").append(getStateRequired());
221            stringValue.append(", stateGeoCodeRequired=").append(getStateGeoCodeRequired());
222            stringValue.append(", postalCodePattern=").append(getPostalCodePattern());
223            stringValue.append(", postalCodeRequired=").append(getPostalCodeRequired());
224            stringValue.append(", postalCodeGeoCodeRequired=").append(getPostalCodeGeoCodeRequired());
225            stringValue.append(", postalCodeLength=").append(getPostalCodeLength());
226            stringValue.append(", postalCodeGeoCodeLength=").append(getPostalCodeGeoCodeLength());
227            stringValue.append(", postalCodeExample=").append(getPostalCodeExample());
228            stringValue.append(", fromTime=").append(getFromTime());
229            stringValue.append(", thruTime=").append(getThruTime());
230            
231            stringValue.append('}');
232            
233            _stringValue = stringValue.toString();
234        }
235        return _stringValue;
236    }
237    
238    @Override
239    public boolean equals(Object other) {
240        if(this == other)
241            return true;
242        
243        if(!hasIdentity())
244            return false;
245        
246        if(other instanceof  GeoCodeCountryValue) {
247            GeoCodeCountryValue that = (GeoCodeCountryValue)other;
248            
249            if(!that.hasIdentity())
250                return false;
251            
252            Long thisEntityId = getEntityId();
253            Long thatEntityId = that.getEntityId();
254            
255            boolean objectsEqual = thisEntityId.equals(thatEntityId);
256            if(objectsEqual)
257                objectsEqual = objectsEqual && isIdentical(that);
258            
259            return objectsEqual;
260        } else {
261            return false;
262        }
263    }
264    
265    public boolean isIdentical(Object other) {
266        if(other instanceof GeoCodeCountryValue) {
267            GeoCodeCountryValue that = (GeoCodeCountryValue)other;
268            boolean objectsEqual = true;
269            
270            
271            if(objectsEqual) {
272                GeoCodePK thisGeoCodePK = getGeoCodePK();
273                GeoCodePK thatGeoCodePK = that.getGeoCodePK();
274                
275                if(thisGeoCodePK == null) {
276                    objectsEqual = objectsEqual && (thatGeoCodePK == null);
277                } else {
278                    objectsEqual = objectsEqual && thisGeoCodePK.equals(thatGeoCodePK);
279                }
280            }
281            
282            if(objectsEqual) {
283                String thisTelephoneCode = getTelephoneCode();
284                String thatTelephoneCode = that.getTelephoneCode();
285                
286                if(thisTelephoneCode == null) {
287                    objectsEqual = objectsEqual && (thatTelephoneCode == null);
288                } else {
289                    objectsEqual = objectsEqual && thisTelephoneCode.equals(thatTelephoneCode);
290                }
291            }
292            
293            if(objectsEqual) {
294                String thisAreaCodePattern = getAreaCodePattern();
295                String thatAreaCodePattern = that.getAreaCodePattern();
296                
297                if(thisAreaCodePattern == null) {
298                    objectsEqual = objectsEqual && (thatAreaCodePattern == null);
299                } else {
300                    objectsEqual = objectsEqual && thisAreaCodePattern.equals(thatAreaCodePattern);
301                }
302            }
303            
304            if(objectsEqual) {
305                Boolean thisAreaCodeRequired = getAreaCodeRequired();
306                Boolean thatAreaCodeRequired = that.getAreaCodeRequired();
307                
308                if(thisAreaCodeRequired == null) {
309                    objectsEqual = objectsEqual && (thatAreaCodeRequired == null);
310                } else {
311                    objectsEqual = objectsEqual && thisAreaCodeRequired.equals(thatAreaCodeRequired);
312                }
313            }
314            
315            if(objectsEqual) {
316                String thisAreaCodeExample = getAreaCodeExample();
317                String thatAreaCodeExample = that.getAreaCodeExample();
318                
319                if(thisAreaCodeExample == null) {
320                    objectsEqual = objectsEqual && (thatAreaCodeExample == null);
321                } else {
322                    objectsEqual = objectsEqual && thisAreaCodeExample.equals(thatAreaCodeExample);
323                }
324            }
325            
326            if(objectsEqual) {
327                String thisTelephoneNumberPattern = getTelephoneNumberPattern();
328                String thatTelephoneNumberPattern = that.getTelephoneNumberPattern();
329                
330                if(thisTelephoneNumberPattern == null) {
331                    objectsEqual = objectsEqual && (thatTelephoneNumberPattern == null);
332                } else {
333                    objectsEqual = objectsEqual && thisTelephoneNumberPattern.equals(thatTelephoneNumberPattern);
334                }
335            }
336            
337            if(objectsEqual) {
338                String thisTelephoneNumberExample = getTelephoneNumberExample();
339                String thatTelephoneNumberExample = that.getTelephoneNumberExample();
340                
341                if(thisTelephoneNumberExample == null) {
342                    objectsEqual = objectsEqual && (thatTelephoneNumberExample == null);
343                } else {
344                    objectsEqual = objectsEqual && thisTelephoneNumberExample.equals(thatTelephoneNumberExample);
345                }
346            }
347            
348            if(objectsEqual) {
349                PostalAddressFormatPK thisPostalAddressFormatPK = getPostalAddressFormatPK();
350                PostalAddressFormatPK thatPostalAddressFormatPK = that.getPostalAddressFormatPK();
351                
352                if(thisPostalAddressFormatPK == null) {
353                    objectsEqual = objectsEqual && (thatPostalAddressFormatPK == null);
354                } else {
355                    objectsEqual = objectsEqual && thisPostalAddressFormatPK.equals(thatPostalAddressFormatPK);
356                }
357            }
358            
359            if(objectsEqual) {
360                Boolean thisCityRequired = getCityRequired();
361                Boolean thatCityRequired = that.getCityRequired();
362                
363                if(thisCityRequired == null) {
364                    objectsEqual = objectsEqual && (thatCityRequired == null);
365                } else {
366                    objectsEqual = objectsEqual && thisCityRequired.equals(thatCityRequired);
367                }
368            }
369            
370            if(objectsEqual) {
371                Boolean thisCityGeoCodeRequired = getCityGeoCodeRequired();
372                Boolean thatCityGeoCodeRequired = that.getCityGeoCodeRequired();
373                
374                if(thisCityGeoCodeRequired == null) {
375                    objectsEqual = objectsEqual && (thatCityGeoCodeRequired == null);
376                } else {
377                    objectsEqual = objectsEqual && thisCityGeoCodeRequired.equals(thatCityGeoCodeRequired);
378                }
379            }
380            
381            if(objectsEqual) {
382                Boolean thisStateRequired = getStateRequired();
383                Boolean thatStateRequired = that.getStateRequired();
384                
385                if(thisStateRequired == null) {
386                    objectsEqual = objectsEqual && (thatStateRequired == null);
387                } else {
388                    objectsEqual = objectsEqual && thisStateRequired.equals(thatStateRequired);
389                }
390            }
391            
392            if(objectsEqual) {
393                Boolean thisStateGeoCodeRequired = getStateGeoCodeRequired();
394                Boolean thatStateGeoCodeRequired = that.getStateGeoCodeRequired();
395                
396                if(thisStateGeoCodeRequired == null) {
397                    objectsEqual = objectsEqual && (thatStateGeoCodeRequired == null);
398                } else {
399                    objectsEqual = objectsEqual && thisStateGeoCodeRequired.equals(thatStateGeoCodeRequired);
400                }
401            }
402            
403            if(objectsEqual) {
404                String thisPostalCodePattern = getPostalCodePattern();
405                String thatPostalCodePattern = that.getPostalCodePattern();
406                
407                if(thisPostalCodePattern == null) {
408                    objectsEqual = objectsEqual && (thatPostalCodePattern == null);
409                } else {
410                    objectsEqual = objectsEqual && thisPostalCodePattern.equals(thatPostalCodePattern);
411                }
412            }
413            
414            if(objectsEqual) {
415                Boolean thisPostalCodeRequired = getPostalCodeRequired();
416                Boolean thatPostalCodeRequired = that.getPostalCodeRequired();
417                
418                if(thisPostalCodeRequired == null) {
419                    objectsEqual = objectsEqual && (thatPostalCodeRequired == null);
420                } else {
421                    objectsEqual = objectsEqual && thisPostalCodeRequired.equals(thatPostalCodeRequired);
422                }
423            }
424            
425            if(objectsEqual) {
426                Boolean thisPostalCodeGeoCodeRequired = getPostalCodeGeoCodeRequired();
427                Boolean thatPostalCodeGeoCodeRequired = that.getPostalCodeGeoCodeRequired();
428                
429                if(thisPostalCodeGeoCodeRequired == null) {
430                    objectsEqual = objectsEqual && (thatPostalCodeGeoCodeRequired == null);
431                } else {
432                    objectsEqual = objectsEqual && thisPostalCodeGeoCodeRequired.equals(thatPostalCodeGeoCodeRequired);
433                }
434            }
435            
436            if(objectsEqual) {
437                Integer thisPostalCodeLength = getPostalCodeLength();
438                Integer thatPostalCodeLength = that.getPostalCodeLength();
439                
440                if(thisPostalCodeLength == null) {
441                    objectsEqual = objectsEqual && (thatPostalCodeLength == null);
442                } else {
443                    objectsEqual = objectsEqual && thisPostalCodeLength.equals(thatPostalCodeLength);
444                }
445            }
446            
447            if(objectsEqual) {
448                Integer thisPostalCodeGeoCodeLength = getPostalCodeGeoCodeLength();
449                Integer thatPostalCodeGeoCodeLength = that.getPostalCodeGeoCodeLength();
450                
451                if(thisPostalCodeGeoCodeLength == null) {
452                    objectsEqual = objectsEqual && (thatPostalCodeGeoCodeLength == null);
453                } else {
454                    objectsEqual = objectsEqual && thisPostalCodeGeoCodeLength.equals(thatPostalCodeGeoCodeLength);
455                }
456            }
457            
458            if(objectsEqual) {
459                String thisPostalCodeExample = getPostalCodeExample();
460                String thatPostalCodeExample = that.getPostalCodeExample();
461                
462                if(thisPostalCodeExample == null) {
463                    objectsEqual = objectsEqual && (thatPostalCodeExample == null);
464                } else {
465                    objectsEqual = objectsEqual && thisPostalCodeExample.equals(thatPostalCodeExample);
466                }
467            }
468            
469            if(objectsEqual) {
470                Long thisFromTime = getFromTime();
471                Long thatFromTime = that.getFromTime();
472                
473                if(thisFromTime == null) {
474                    objectsEqual = objectsEqual && (thatFromTime == null);
475                } else {
476                    objectsEqual = objectsEqual && thisFromTime.equals(thatFromTime);
477                }
478            }
479            
480            if(objectsEqual) {
481                Long thisThruTime = getThruTime();
482                Long thatThruTime = that.getThruTime();
483                
484                if(thisThruTime == null) {
485                    objectsEqual = objectsEqual && (thatThruTime == null);
486                } else {
487                    objectsEqual = objectsEqual && thisThruTime.equals(thatThruTime);
488                }
489            }
490            
491            return objectsEqual;
492        } else {
493            return false;
494        }
495    }
496    
497    @Override
498    public boolean hasBeenModified() {
499        return geoCodePKHasBeenModified || telephoneCodeHasBeenModified || areaCodePatternHasBeenModified || areaCodeRequiredHasBeenModified || areaCodeExampleHasBeenModified || telephoneNumberPatternHasBeenModified || telephoneNumberExampleHasBeenModified || postalAddressFormatPKHasBeenModified || cityRequiredHasBeenModified || cityGeoCodeRequiredHasBeenModified || stateRequiredHasBeenModified || stateGeoCodeRequiredHasBeenModified || postalCodePatternHasBeenModified || postalCodeRequiredHasBeenModified || postalCodeGeoCodeRequiredHasBeenModified || postalCodeLengthHasBeenModified || postalCodeGeoCodeLengthHasBeenModified || postalCodeExampleHasBeenModified || fromTimeHasBeenModified || thruTimeHasBeenModified;
500    }
501    
502    @Override
503    public void clearHasBeenModified() {
504        geoCodePKHasBeenModified = false;
505        telephoneCodeHasBeenModified = false;
506        areaCodePatternHasBeenModified = false;
507        areaCodeRequiredHasBeenModified = false;
508        areaCodeExampleHasBeenModified = false;
509        telephoneNumberPatternHasBeenModified = false;
510        telephoneNumberExampleHasBeenModified = false;
511        postalAddressFormatPKHasBeenModified = false;
512        cityRequiredHasBeenModified = false;
513        cityGeoCodeRequiredHasBeenModified = false;
514        stateRequiredHasBeenModified = false;
515        stateGeoCodeRequiredHasBeenModified = false;
516        postalCodePatternHasBeenModified = false;
517        postalCodeRequiredHasBeenModified = false;
518        postalCodeGeoCodeRequiredHasBeenModified = false;
519        postalCodeLengthHasBeenModified = false;
520        postalCodeGeoCodeLengthHasBeenModified = false;
521        postalCodeExampleHasBeenModified = false;
522        fromTimeHasBeenModified = false;
523        thruTimeHasBeenModified = false;
524    }
525    
526    public GeoCodePK getGeoCodePK() {
527        return geoCodePK;
528    }
529    
530    public void setGeoCodePK(GeoCodePK geoCodePK)
531            throws PersistenceNotNullException {
532        checkForNull(geoCodePK);
533        
534        boolean update = true;
535        
536        if(this.geoCodePK != null) {
537            if(this.geoCodePK.equals(geoCodePK)) {
538                update = false;
539            }
540        } else if(geoCodePK == null) {
541            update = false;
542        }
543        
544        if(update) {
545            this.geoCodePK = geoCodePK;
546            geoCodePKHasBeenModified = true;
547            clearHashAndString();
548        }
549    }
550    
551    public boolean getGeoCodePKHasBeenModified() {
552        return geoCodePKHasBeenModified;
553    }
554    
555    public String getTelephoneCode() {
556        return telephoneCode;
557    }
558    
559    public void setTelephoneCode(String telephoneCode) {
560        boolean update = true;
561        
562        if(this.telephoneCode != null) {
563            if(this.telephoneCode.equals(telephoneCode)) {
564                update = false;
565            }
566        } else if(telephoneCode == null) {
567            update = false;
568        }
569        
570        if(update) {
571            this.telephoneCode = telephoneCode;
572            telephoneCodeHasBeenModified = true;
573            clearHashAndString();
574        }
575    }
576    
577    public boolean getTelephoneCodeHasBeenModified() {
578        return telephoneCodeHasBeenModified;
579    }
580    
581    public String getAreaCodePattern() {
582        return areaCodePattern;
583    }
584    
585    public void setAreaCodePattern(String areaCodePattern) {
586        boolean update = true;
587        
588        if(this.areaCodePattern != null) {
589            if(this.areaCodePattern.equals(areaCodePattern)) {
590                update = false;
591            }
592        } else if(areaCodePattern == null) {
593            update = false;
594        }
595        
596        if(update) {
597            this.areaCodePattern = areaCodePattern;
598            areaCodePatternHasBeenModified = true;
599            clearHashAndString();
600        }
601    }
602    
603    public boolean getAreaCodePatternHasBeenModified() {
604        return areaCodePatternHasBeenModified;
605    }
606    
607    public Boolean getAreaCodeRequired() {
608        return areaCodeRequired;
609    }
610    
611    public void setAreaCodeRequired(Boolean areaCodeRequired)
612            throws PersistenceNotNullException {
613        checkForNull(areaCodeRequired);
614        
615        boolean update = true;
616        
617        if(this.areaCodeRequired != null) {
618            if(this.areaCodeRequired.equals(areaCodeRequired)) {
619                update = false;
620            }
621        } else if(areaCodeRequired == null) {
622            update = false;
623        }
624        
625        if(update) {
626            this.areaCodeRequired = areaCodeRequired;
627            areaCodeRequiredHasBeenModified = true;
628            clearHashAndString();
629        }
630    }
631    
632    public boolean getAreaCodeRequiredHasBeenModified() {
633        return areaCodeRequiredHasBeenModified;
634    }
635    
636    public String getAreaCodeExample() {
637        return areaCodeExample;
638    }
639    
640    public void setAreaCodeExample(String areaCodeExample) {
641        boolean update = true;
642        
643        if(this.areaCodeExample != null) {
644            if(this.areaCodeExample.equals(areaCodeExample)) {
645                update = false;
646            }
647        } else if(areaCodeExample == null) {
648            update = false;
649        }
650        
651        if(update) {
652            this.areaCodeExample = areaCodeExample;
653            areaCodeExampleHasBeenModified = true;
654            clearHashAndString();
655        }
656    }
657    
658    public boolean getAreaCodeExampleHasBeenModified() {
659        return areaCodeExampleHasBeenModified;
660    }
661    
662    public String getTelephoneNumberPattern() {
663        return telephoneNumberPattern;
664    }
665    
666    public void setTelephoneNumberPattern(String telephoneNumberPattern) {
667        boolean update = true;
668        
669        if(this.telephoneNumberPattern != null) {
670            if(this.telephoneNumberPattern.equals(telephoneNumberPattern)) {
671                update = false;
672            }
673        } else if(telephoneNumberPattern == null) {
674            update = false;
675        }
676        
677        if(update) {
678            this.telephoneNumberPattern = telephoneNumberPattern;
679            telephoneNumberPatternHasBeenModified = true;
680            clearHashAndString();
681        }
682    }
683    
684    public boolean getTelephoneNumberPatternHasBeenModified() {
685        return telephoneNumberPatternHasBeenModified;
686    }
687    
688    public String getTelephoneNumberExample() {
689        return telephoneNumberExample;
690    }
691    
692    public void setTelephoneNumberExample(String telephoneNumberExample) {
693        boolean update = true;
694        
695        if(this.telephoneNumberExample != null) {
696            if(this.telephoneNumberExample.equals(telephoneNumberExample)) {
697                update = false;
698            }
699        } else if(telephoneNumberExample == null) {
700            update = false;
701        }
702        
703        if(update) {
704            this.telephoneNumberExample = telephoneNumberExample;
705            telephoneNumberExampleHasBeenModified = true;
706            clearHashAndString();
707        }
708    }
709    
710    public boolean getTelephoneNumberExampleHasBeenModified() {
711        return telephoneNumberExampleHasBeenModified;
712    }
713    
714    public PostalAddressFormatPK getPostalAddressFormatPK() {
715        return postalAddressFormatPK;
716    }
717    
718    public void setPostalAddressFormatPK(PostalAddressFormatPK postalAddressFormatPK)
719            throws PersistenceNotNullException {
720        checkForNull(postalAddressFormatPK);
721        
722        boolean update = true;
723        
724        if(this.postalAddressFormatPK != null) {
725            if(this.postalAddressFormatPK.equals(postalAddressFormatPK)) {
726                update = false;
727            }
728        } else if(postalAddressFormatPK == null) {
729            update = false;
730        }
731        
732        if(update) {
733            this.postalAddressFormatPK = postalAddressFormatPK;
734            postalAddressFormatPKHasBeenModified = true;
735            clearHashAndString();
736        }
737    }
738    
739    public boolean getPostalAddressFormatPKHasBeenModified() {
740        return postalAddressFormatPKHasBeenModified;
741    }
742    
743    public Boolean getCityRequired() {
744        return cityRequired;
745    }
746    
747    public void setCityRequired(Boolean cityRequired)
748            throws PersistenceNotNullException {
749        checkForNull(cityRequired);
750        
751        boolean update = true;
752        
753        if(this.cityRequired != null) {
754            if(this.cityRequired.equals(cityRequired)) {
755                update = false;
756            }
757        } else if(cityRequired == null) {
758            update = false;
759        }
760        
761        if(update) {
762            this.cityRequired = cityRequired;
763            cityRequiredHasBeenModified = true;
764            clearHashAndString();
765        }
766    }
767    
768    public boolean getCityRequiredHasBeenModified() {
769        return cityRequiredHasBeenModified;
770    }
771    
772    public Boolean getCityGeoCodeRequired() {
773        return cityGeoCodeRequired;
774    }
775    
776    public void setCityGeoCodeRequired(Boolean cityGeoCodeRequired)
777            throws PersistenceNotNullException {
778        checkForNull(cityGeoCodeRequired);
779        
780        boolean update = true;
781        
782        if(this.cityGeoCodeRequired != null) {
783            if(this.cityGeoCodeRequired.equals(cityGeoCodeRequired)) {
784                update = false;
785            }
786        } else if(cityGeoCodeRequired == null) {
787            update = false;
788        }
789        
790        if(update) {
791            this.cityGeoCodeRequired = cityGeoCodeRequired;
792            cityGeoCodeRequiredHasBeenModified = true;
793            clearHashAndString();
794        }
795    }
796    
797    public boolean getCityGeoCodeRequiredHasBeenModified() {
798        return cityGeoCodeRequiredHasBeenModified;
799    }
800    
801    public Boolean getStateRequired() {
802        return stateRequired;
803    }
804    
805    public void setStateRequired(Boolean stateRequired)
806            throws PersistenceNotNullException {
807        checkForNull(stateRequired);
808        
809        boolean update = true;
810        
811        if(this.stateRequired != null) {
812            if(this.stateRequired.equals(stateRequired)) {
813                update = false;
814            }
815        } else if(stateRequired == null) {
816            update = false;
817        }
818        
819        if(update) {
820            this.stateRequired = stateRequired;
821            stateRequiredHasBeenModified = true;
822            clearHashAndString();
823        }
824    }
825    
826    public boolean getStateRequiredHasBeenModified() {
827        return stateRequiredHasBeenModified;
828    }
829    
830    public Boolean getStateGeoCodeRequired() {
831        return stateGeoCodeRequired;
832    }
833    
834    public void setStateGeoCodeRequired(Boolean stateGeoCodeRequired)
835            throws PersistenceNotNullException {
836        checkForNull(stateGeoCodeRequired);
837        
838        boolean update = true;
839        
840        if(this.stateGeoCodeRequired != null) {
841            if(this.stateGeoCodeRequired.equals(stateGeoCodeRequired)) {
842                update = false;
843            }
844        } else if(stateGeoCodeRequired == null) {
845            update = false;
846        }
847        
848        if(update) {
849            this.stateGeoCodeRequired = stateGeoCodeRequired;
850            stateGeoCodeRequiredHasBeenModified = true;
851            clearHashAndString();
852        }
853    }
854    
855    public boolean getStateGeoCodeRequiredHasBeenModified() {
856        return stateGeoCodeRequiredHasBeenModified;
857    }
858    
859    public String getPostalCodePattern() {
860        return postalCodePattern;
861    }
862    
863    public void setPostalCodePattern(String postalCodePattern) {
864        boolean update = true;
865        
866        if(this.postalCodePattern != null) {
867            if(this.postalCodePattern.equals(postalCodePattern)) {
868                update = false;
869            }
870        } else if(postalCodePattern == null) {
871            update = false;
872        }
873        
874        if(update) {
875            this.postalCodePattern = postalCodePattern;
876            postalCodePatternHasBeenModified = true;
877            clearHashAndString();
878        }
879    }
880    
881    public boolean getPostalCodePatternHasBeenModified() {
882        return postalCodePatternHasBeenModified;
883    }
884    
885    public Boolean getPostalCodeRequired() {
886        return postalCodeRequired;
887    }
888    
889    public void setPostalCodeRequired(Boolean postalCodeRequired)
890            throws PersistenceNotNullException {
891        checkForNull(postalCodeRequired);
892        
893        boolean update = true;
894        
895        if(this.postalCodeRequired != null) {
896            if(this.postalCodeRequired.equals(postalCodeRequired)) {
897                update = false;
898            }
899        } else if(postalCodeRequired == null) {
900            update = false;
901        }
902        
903        if(update) {
904            this.postalCodeRequired = postalCodeRequired;
905            postalCodeRequiredHasBeenModified = true;
906            clearHashAndString();
907        }
908    }
909    
910    public boolean getPostalCodeRequiredHasBeenModified() {
911        return postalCodeRequiredHasBeenModified;
912    }
913    
914    public Boolean getPostalCodeGeoCodeRequired() {
915        return postalCodeGeoCodeRequired;
916    }
917    
918    public void setPostalCodeGeoCodeRequired(Boolean postalCodeGeoCodeRequired)
919            throws PersistenceNotNullException {
920        checkForNull(postalCodeGeoCodeRequired);
921        
922        boolean update = true;
923        
924        if(this.postalCodeGeoCodeRequired != null) {
925            if(this.postalCodeGeoCodeRequired.equals(postalCodeGeoCodeRequired)) {
926                update = false;
927            }
928        } else if(postalCodeGeoCodeRequired == null) {
929            update = false;
930        }
931        
932        if(update) {
933            this.postalCodeGeoCodeRequired = postalCodeGeoCodeRequired;
934            postalCodeGeoCodeRequiredHasBeenModified = true;
935            clearHashAndString();
936        }
937    }
938    
939    public boolean getPostalCodeGeoCodeRequiredHasBeenModified() {
940        return postalCodeGeoCodeRequiredHasBeenModified;
941    }
942    
943    public Integer getPostalCodeLength() {
944        return postalCodeLength;
945    }
946    
947    public void setPostalCodeLength(Integer postalCodeLength) {
948        boolean update = true;
949        
950        if(this.postalCodeLength != null) {
951            if(this.postalCodeLength.equals(postalCodeLength)) {
952                update = false;
953            }
954        } else if(postalCodeLength == null) {
955            update = false;
956        }
957        
958        if(update) {
959            this.postalCodeLength = postalCodeLength;
960            postalCodeLengthHasBeenModified = true;
961            clearHashAndString();
962        }
963    }
964    
965    public boolean getPostalCodeLengthHasBeenModified() {
966        return postalCodeLengthHasBeenModified;
967    }
968    
969    public Integer getPostalCodeGeoCodeLength() {
970        return postalCodeGeoCodeLength;
971    }
972    
973    public void setPostalCodeGeoCodeLength(Integer postalCodeGeoCodeLength) {
974        boolean update = true;
975        
976        if(this.postalCodeGeoCodeLength != null) {
977            if(this.postalCodeGeoCodeLength.equals(postalCodeGeoCodeLength)) {
978                update = false;
979            }
980        } else if(postalCodeGeoCodeLength == null) {
981            update = false;
982        }
983        
984        if(update) {
985            this.postalCodeGeoCodeLength = postalCodeGeoCodeLength;
986            postalCodeGeoCodeLengthHasBeenModified = true;
987            clearHashAndString();
988        }
989    }
990    
991    public boolean getPostalCodeGeoCodeLengthHasBeenModified() {
992        return postalCodeGeoCodeLengthHasBeenModified;
993    }
994    
995    public String getPostalCodeExample() {
996        return postalCodeExample;
997    }
998    
999    public void setPostalCodeExample(String postalCodeExample) {
1000        boolean update = true;
1001        
1002        if(this.postalCodeExample != null) {
1003            if(this.postalCodeExample.equals(postalCodeExample)) {
1004                update = false;
1005            }
1006        } else if(postalCodeExample == null) {
1007            update = false;
1008        }
1009        
1010        if(update) {
1011            this.postalCodeExample = postalCodeExample;
1012            postalCodeExampleHasBeenModified = true;
1013            clearHashAndString();
1014        }
1015    }
1016    
1017    public boolean getPostalCodeExampleHasBeenModified() {
1018        return postalCodeExampleHasBeenModified;
1019    }
1020    
1021    public Long getFromTime() {
1022        return fromTime;
1023    }
1024    
1025    public void setFromTime(Long fromTime)
1026            throws PersistenceNotNullException {
1027        checkForNull(fromTime);
1028        
1029        boolean update = true;
1030        
1031        if(this.fromTime != null) {
1032            if(this.fromTime.equals(fromTime)) {
1033                update = false;
1034            }
1035        } else if(fromTime == null) {
1036            update = false;
1037        }
1038        
1039        if(update) {
1040            this.fromTime = fromTime;
1041            fromTimeHasBeenModified = true;
1042            clearHashAndString();
1043        }
1044    }
1045    
1046    public boolean getFromTimeHasBeenModified() {
1047        return fromTimeHasBeenModified;
1048    }
1049    
1050    public Long getThruTime() {
1051        return thruTime;
1052    }
1053    
1054    public void setThruTime(Long thruTime)
1055            throws PersistenceNotNullException {
1056        checkForNull(thruTime);
1057        
1058        boolean update = true;
1059        
1060        if(this.thruTime != null) {
1061            if(this.thruTime.equals(thruTime)) {
1062                update = false;
1063            }
1064        } else if(thruTime == null) {
1065            update = false;
1066        }
1067        
1068        if(update) {
1069            this.thruTime = thruTime;
1070            thruTimeHasBeenModified = true;
1071            clearHashAndString();
1072        }
1073    }
1074    
1075    public boolean getThruTimeHasBeenModified() {
1076        return thruTimeHasBeenModified;
1077    }
1078    
1079}