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 * CommunicationEventDetailValue.java
021 */
022
023package com.echothree.model.data.communication.server.value;
024
025import com.echothree.model.data.communication.common.pk.CommunicationEventDetailPK;
026
027import com.echothree.model.data.communication.server.factory.CommunicationEventDetailFactory;
028
029import com.echothree.model.data.communication.common.pk.CommunicationEventPK;
030import com.echothree.model.data.communication.common.pk.CommunicationEventTypePK;
031import com.echothree.model.data.communication.common.pk.CommunicationSourcePK;
032import com.echothree.model.data.communication.common.pk.CommunicationEventPurposePK;
033import com.echothree.model.data.contact.common.pk.PartyContactMechanismPK;
034import com.echothree.model.data.document.common.pk.DocumentPK;
035
036import com.echothree.util.common.exception.PersistenceCloneException;
037import com.echothree.util.common.exception.PersistenceNotNullException;
038
039import com.echothree.util.server.persistence.BaseValue;
040
041import java.io.Serializable;
042
043public class CommunicationEventDetailValue
044        extends BaseValue<CommunicationEventDetailPK>
045        implements Cloneable, Serializable {
046    
047    private CommunicationEventPK communicationEventPK;
048    private boolean communicationEventPKHasBeenModified = false;
049    private String communicationEventName;
050    private boolean communicationEventNameHasBeenModified = false;
051    private CommunicationEventTypePK communicationEventTypePK;
052    private boolean communicationEventTypePKHasBeenModified = false;
053    private CommunicationSourcePK communicationSourcePK;
054    private boolean communicationSourcePKHasBeenModified = false;
055    private CommunicationEventPurposePK communicationEventPurposePK;
056    private boolean communicationEventPurposePKHasBeenModified = false;
057    private CommunicationEventPK originalCommunicationEventPK;
058    private boolean originalCommunicationEventPKHasBeenModified = false;
059    private CommunicationEventPK parentCommunicationEventPK;
060    private boolean parentCommunicationEventPKHasBeenModified = false;
061    private PartyContactMechanismPK partyContactMechanismPK;
062    private boolean partyContactMechanismPKHasBeenModified = false;
063    private DocumentPK documentPK;
064    private boolean documentPKHasBeenModified = false;
065    private Long fromTime;
066    private boolean fromTimeHasBeenModified = false;
067    private Long thruTime;
068    private boolean thruTimeHasBeenModified = false;
069    
070    private transient Integer _hashCode = null;
071    private transient String _stringValue = null;
072    
073    private void constructFields(CommunicationEventPK communicationEventPK, String communicationEventName, CommunicationEventTypePK communicationEventTypePK, CommunicationSourcePK communicationSourcePK, CommunicationEventPurposePK communicationEventPurposePK, CommunicationEventPK originalCommunicationEventPK, CommunicationEventPK parentCommunicationEventPK, PartyContactMechanismPK partyContactMechanismPK, DocumentPK documentPK, Long fromTime, Long thruTime)
074            throws PersistenceNotNullException {
075        checkForNull(communicationEventPK);
076        this.communicationEventPK = communicationEventPK;
077        checkForNull(communicationEventName);
078        this.communicationEventName = communicationEventName;
079        checkForNull(communicationEventTypePK);
080        this.communicationEventTypePK = communicationEventTypePK;
081        this.communicationSourcePK = communicationSourcePK;
082        checkForNull(communicationEventPurposePK);
083        this.communicationEventPurposePK = communicationEventPurposePK;
084        this.originalCommunicationEventPK = originalCommunicationEventPK;
085        this.parentCommunicationEventPK = parentCommunicationEventPK;
086        checkForNull(partyContactMechanismPK);
087        this.partyContactMechanismPK = partyContactMechanismPK;
088        checkForNull(documentPK);
089        this.documentPK = documentPK;
090        checkForNull(fromTime);
091        this.fromTime = fromTime;
092        checkForNull(thruTime);
093        this.thruTime = thruTime;
094    }
095    
096    /** Creates a new instance of CommunicationEventDetailValue */
097    public CommunicationEventDetailValue(CommunicationEventDetailPK communicationEventDetailPK, CommunicationEventPK communicationEventPK, String communicationEventName, CommunicationEventTypePK communicationEventTypePK, CommunicationSourcePK communicationSourcePK, CommunicationEventPurposePK communicationEventPurposePK, CommunicationEventPK originalCommunicationEventPK, CommunicationEventPK parentCommunicationEventPK, PartyContactMechanismPK partyContactMechanismPK, DocumentPK documentPK, Long fromTime, Long thruTime)
098            throws PersistenceNotNullException {
099        super(communicationEventDetailPK);
100        constructFields(communicationEventPK, communicationEventName, communicationEventTypePK, communicationSourcePK, communicationEventPurposePK, originalCommunicationEventPK, parentCommunicationEventPK, partyContactMechanismPK, documentPK, fromTime, thruTime);
101    }
102    
103    /** Creates a new instance of CommunicationEventDetailValue */
104    public CommunicationEventDetailValue(CommunicationEventPK communicationEventPK, String communicationEventName, CommunicationEventTypePK communicationEventTypePK, CommunicationSourcePK communicationSourcePK, CommunicationEventPurposePK communicationEventPurposePK, CommunicationEventPK originalCommunicationEventPK, CommunicationEventPK parentCommunicationEventPK, PartyContactMechanismPK partyContactMechanismPK, DocumentPK documentPK, Long fromTime, Long thruTime)
105            throws PersistenceNotNullException {
106        super();
107        constructFields(communicationEventPK, communicationEventName, communicationEventTypePK, communicationSourcePK, communicationEventPurposePK, originalCommunicationEventPK, parentCommunicationEventPK, partyContactMechanismPK, documentPK, fromTime, thruTime);
108    }
109    
110   @Override
111   public CommunicationEventDetailFactory getBaseFactoryInstance() {
112        return CommunicationEventDetailFactory.getInstance();
113    }
114    
115    @Override
116    public CommunicationEventDetailValue clone() {
117        Object result;
118        
119        try {
120            result = super.clone();
121        } catch (CloneNotSupportedException cnse) {
122            // This shouldn't happen, fail when it does.
123            throw new PersistenceCloneException(cnse);
124        }
125        
126        return (CommunicationEventDetailValue)result;
127    }
128    
129   @Override
130    public CommunicationEventDetailPK getPrimaryKey() {
131        if(_primaryKey == null) {
132            _primaryKey = new CommunicationEventDetailPK(entityId);
133        }
134        
135        return _primaryKey;
136    }
137    
138    private void clearHashAndString() {
139        _hashCode = null;
140        _stringValue = null;
141    }
142    
143    @Override
144    public int hashCode() {
145        if(_hashCode == null) {
146            int hashCode = 17;
147            
148            hashCode = 37 * hashCode + ((entityId != null) ? entityId.hashCode() : 0);
149            
150            hashCode = 37 * hashCode + ((communicationEventPK != null) ? communicationEventPK.hashCode() : 0);
151            hashCode = 37 * hashCode + ((communicationEventName != null) ? communicationEventName.hashCode() : 0);
152            hashCode = 37 * hashCode + ((communicationEventTypePK != null) ? communicationEventTypePK.hashCode() : 0);
153            hashCode = 37 * hashCode + ((communicationSourcePK != null) ? communicationSourcePK.hashCode() : 0);
154            hashCode = 37 * hashCode + ((communicationEventPurposePK != null) ? communicationEventPurposePK.hashCode() : 0);
155            hashCode = 37 * hashCode + ((originalCommunicationEventPK != null) ? originalCommunicationEventPK.hashCode() : 0);
156            hashCode = 37 * hashCode + ((parentCommunicationEventPK != null) ? parentCommunicationEventPK.hashCode() : 0);
157            hashCode = 37 * hashCode + ((partyContactMechanismPK != null) ? partyContactMechanismPK.hashCode() : 0);
158            hashCode = 37 * hashCode + ((documentPK != null) ? documentPK.hashCode() : 0);
159            hashCode = 37 * hashCode + ((fromTime != null) ? fromTime.hashCode() : 0);
160            hashCode = 37 * hashCode + ((thruTime != null) ? thruTime.hashCode() : 0);
161            
162            _hashCode = hashCode;
163        }
164        
165        return _hashCode;
166    }
167    
168    @Override
169    public String toString() {
170        if(_stringValue == null) {
171            _stringValue = "{" + 
172                    "entityId=" + getEntityId() +
173                    ", communicationEventPK=" + getCommunicationEventPK() +
174                    ", communicationEventName=" + getCommunicationEventName() +
175                    ", communicationEventTypePK=" + getCommunicationEventTypePK() +
176                    ", communicationSourcePK=" + getCommunicationSourcePK() +
177                    ", communicationEventPurposePK=" + getCommunicationEventPurposePK() +
178                    ", originalCommunicationEventPK=" + getOriginalCommunicationEventPK() +
179                    ", parentCommunicationEventPK=" + getParentCommunicationEventPK() +
180                    ", partyContactMechanismPK=" + getPartyContactMechanismPK() +
181                    ", documentPK=" + getDocumentPK() +
182                    ", fromTime=" + getFromTime() +
183                    ", thruTime=" + getThruTime() +
184                    "}";
185        }
186        return _stringValue;
187    }
188    
189    @Override
190    public boolean equals(Object other) {
191        if(this == other)
192            return true;
193        
194        if(!hasIdentity())
195            return false;
196        
197        if(other instanceof  CommunicationEventDetailValue that) {
198            if(!that.hasIdentity())
199                return false;
200            
201            Long thisEntityId = getEntityId();
202            Long thatEntityId = that.getEntityId();
203            
204            boolean objectsEqual = thisEntityId.equals(thatEntityId);
205            if(objectsEqual)
206                objectsEqual = isIdentical(that);
207            
208            return objectsEqual;
209        } else {
210            return false;
211        }
212    }
213    
214    public boolean isIdentical(Object other) {
215        if(other instanceof CommunicationEventDetailValue that) {
216            boolean objectsEqual = true;
217            
218            
219            if(objectsEqual) {
220                CommunicationEventPK thisCommunicationEventPK = getCommunicationEventPK();
221                CommunicationEventPK thatCommunicationEventPK = that.getCommunicationEventPK();
222                
223                if(thisCommunicationEventPK == null) {
224                    objectsEqual = objectsEqual && (thatCommunicationEventPK == null);
225                } else {
226                    objectsEqual = objectsEqual && thisCommunicationEventPK.equals(thatCommunicationEventPK);
227                }
228            }
229            
230            if(objectsEqual) {
231                String thisCommunicationEventName = getCommunicationEventName();
232                String thatCommunicationEventName = that.getCommunicationEventName();
233                
234                if(thisCommunicationEventName == null) {
235                    objectsEqual = objectsEqual && (thatCommunicationEventName == null);
236                } else {
237                    objectsEqual = objectsEqual && thisCommunicationEventName.equals(thatCommunicationEventName);
238                }
239            }
240            
241            if(objectsEqual) {
242                CommunicationEventTypePK thisCommunicationEventTypePK = getCommunicationEventTypePK();
243                CommunicationEventTypePK thatCommunicationEventTypePK = that.getCommunicationEventTypePK();
244                
245                if(thisCommunicationEventTypePK == null) {
246                    objectsEqual = objectsEqual && (thatCommunicationEventTypePK == null);
247                } else {
248                    objectsEqual = objectsEqual && thisCommunicationEventTypePK.equals(thatCommunicationEventTypePK);
249                }
250            }
251            
252            if(objectsEqual) {
253                CommunicationSourcePK thisCommunicationSourcePK = getCommunicationSourcePK();
254                CommunicationSourcePK thatCommunicationSourcePK = that.getCommunicationSourcePK();
255                
256                if(thisCommunicationSourcePK == null) {
257                    objectsEqual = objectsEqual && (thatCommunicationSourcePK == null);
258                } else {
259                    objectsEqual = objectsEqual && thisCommunicationSourcePK.equals(thatCommunicationSourcePK);
260                }
261            }
262            
263            if(objectsEqual) {
264                CommunicationEventPurposePK thisCommunicationEventPurposePK = getCommunicationEventPurposePK();
265                CommunicationEventPurposePK thatCommunicationEventPurposePK = that.getCommunicationEventPurposePK();
266                
267                if(thisCommunicationEventPurposePK == null) {
268                    objectsEqual = objectsEqual && (thatCommunicationEventPurposePK == null);
269                } else {
270                    objectsEqual = objectsEqual && thisCommunicationEventPurposePK.equals(thatCommunicationEventPurposePK);
271                }
272            }
273            
274            if(objectsEqual) {
275                CommunicationEventPK thisOriginalCommunicationEventPK = getOriginalCommunicationEventPK();
276                CommunicationEventPK thatOriginalCommunicationEventPK = that.getOriginalCommunicationEventPK();
277                
278                if(thisOriginalCommunicationEventPK == null) {
279                    objectsEqual = objectsEqual && (thatOriginalCommunicationEventPK == null);
280                } else {
281                    objectsEqual = objectsEqual && thisOriginalCommunicationEventPK.equals(thatOriginalCommunicationEventPK);
282                }
283            }
284            
285            if(objectsEqual) {
286                CommunicationEventPK thisParentCommunicationEventPK = getParentCommunicationEventPK();
287                CommunicationEventPK thatParentCommunicationEventPK = that.getParentCommunicationEventPK();
288                
289                if(thisParentCommunicationEventPK == null) {
290                    objectsEqual = objectsEqual && (thatParentCommunicationEventPK == null);
291                } else {
292                    objectsEqual = objectsEqual && thisParentCommunicationEventPK.equals(thatParentCommunicationEventPK);
293                }
294            }
295            
296            if(objectsEqual) {
297                PartyContactMechanismPK thisPartyContactMechanismPK = getPartyContactMechanismPK();
298                PartyContactMechanismPK thatPartyContactMechanismPK = that.getPartyContactMechanismPK();
299                
300                if(thisPartyContactMechanismPK == null) {
301                    objectsEqual = objectsEqual && (thatPartyContactMechanismPK == null);
302                } else {
303                    objectsEqual = objectsEqual && thisPartyContactMechanismPK.equals(thatPartyContactMechanismPK);
304                }
305            }
306            
307            if(objectsEqual) {
308                DocumentPK thisDocumentPK = getDocumentPK();
309                DocumentPK thatDocumentPK = that.getDocumentPK();
310                
311                if(thisDocumentPK == null) {
312                    objectsEqual = objectsEqual && (thatDocumentPK == null);
313                } else {
314                    objectsEqual = objectsEqual && thisDocumentPK.equals(thatDocumentPK);
315                }
316            }
317            
318            if(objectsEqual) {
319                Long thisFromTime = getFromTime();
320                Long thatFromTime = that.getFromTime();
321                
322                if(thisFromTime == null) {
323                    objectsEqual = objectsEqual && (thatFromTime == null);
324                } else {
325                    objectsEqual = objectsEqual && thisFromTime.equals(thatFromTime);
326                }
327            }
328            
329            if(objectsEqual) {
330                Long thisThruTime = getThruTime();
331                Long thatThruTime = that.getThruTime();
332                
333                if(thisThruTime == null) {
334                    objectsEqual = objectsEqual && (thatThruTime == null);
335                } else {
336                    objectsEqual = objectsEqual && thisThruTime.equals(thatThruTime);
337                }
338            }
339            
340            return objectsEqual;
341        } else {
342            return false;
343        }
344    }
345    
346    @Override
347    public boolean hasBeenModified() {
348        return communicationEventPKHasBeenModified || communicationEventNameHasBeenModified || communicationEventTypePKHasBeenModified || communicationSourcePKHasBeenModified || communicationEventPurposePKHasBeenModified || originalCommunicationEventPKHasBeenModified || parentCommunicationEventPKHasBeenModified || partyContactMechanismPKHasBeenModified || documentPKHasBeenModified || fromTimeHasBeenModified || thruTimeHasBeenModified;
349    }
350    
351    @Override
352    public void clearHasBeenModified() {
353        communicationEventPKHasBeenModified = false;
354        communicationEventNameHasBeenModified = false;
355        communicationEventTypePKHasBeenModified = false;
356        communicationSourcePKHasBeenModified = false;
357        communicationEventPurposePKHasBeenModified = false;
358        originalCommunicationEventPKHasBeenModified = false;
359        parentCommunicationEventPKHasBeenModified = false;
360        partyContactMechanismPKHasBeenModified = false;
361        documentPKHasBeenModified = false;
362        fromTimeHasBeenModified = false;
363        thruTimeHasBeenModified = false;
364    }
365    
366    public CommunicationEventPK getCommunicationEventPK() {
367        return communicationEventPK;
368    }
369    
370    public void setCommunicationEventPK(CommunicationEventPK communicationEventPK)
371            throws PersistenceNotNullException {
372        checkForNull(communicationEventPK);
373        
374        boolean update = true;
375        
376        if(this.communicationEventPK != null) {
377            if(this.communicationEventPK.equals(communicationEventPK)) {
378                update = false;
379            }
380        } else if(communicationEventPK == null) {
381            update = false;
382        }
383        
384        if(update) {
385            this.communicationEventPK = communicationEventPK;
386            communicationEventPKHasBeenModified = true;
387            clearHashAndString();
388        }
389    }
390    
391    public boolean getCommunicationEventPKHasBeenModified() {
392        return communicationEventPKHasBeenModified;
393    }
394    
395    public String getCommunicationEventName() {
396        return communicationEventName;
397    }
398    
399    public void setCommunicationEventName(String communicationEventName)
400            throws PersistenceNotNullException {
401        checkForNull(communicationEventName);
402        
403        boolean update = true;
404        
405        if(this.communicationEventName != null) {
406            if(this.communicationEventName.equals(communicationEventName)) {
407                update = false;
408            }
409        } else if(communicationEventName == null) {
410            update = false;
411        }
412        
413        if(update) {
414            this.communicationEventName = communicationEventName;
415            communicationEventNameHasBeenModified = true;
416            clearHashAndString();
417        }
418    }
419    
420    public boolean getCommunicationEventNameHasBeenModified() {
421        return communicationEventNameHasBeenModified;
422    }
423    
424    public CommunicationEventTypePK getCommunicationEventTypePK() {
425        return communicationEventTypePK;
426    }
427    
428    public void setCommunicationEventTypePK(CommunicationEventTypePK communicationEventTypePK)
429            throws PersistenceNotNullException {
430        checkForNull(communicationEventTypePK);
431        
432        boolean update = true;
433        
434        if(this.communicationEventTypePK != null) {
435            if(this.communicationEventTypePK.equals(communicationEventTypePK)) {
436                update = false;
437            }
438        } else if(communicationEventTypePK == null) {
439            update = false;
440        }
441        
442        if(update) {
443            this.communicationEventTypePK = communicationEventTypePK;
444            communicationEventTypePKHasBeenModified = true;
445            clearHashAndString();
446        }
447    }
448    
449    public boolean getCommunicationEventTypePKHasBeenModified() {
450        return communicationEventTypePKHasBeenModified;
451    }
452    
453    public CommunicationSourcePK getCommunicationSourcePK() {
454        return communicationSourcePK;
455    }
456    
457    public void setCommunicationSourcePK(CommunicationSourcePK communicationSourcePK) {
458        boolean update = true;
459        
460        if(this.communicationSourcePK != null) {
461            if(this.communicationSourcePK.equals(communicationSourcePK)) {
462                update = false;
463            }
464        } else if(communicationSourcePK == null) {
465            update = false;
466        }
467        
468        if(update) {
469            this.communicationSourcePK = communicationSourcePK;
470            communicationSourcePKHasBeenModified = true;
471            clearHashAndString();
472        }
473    }
474    
475    public boolean getCommunicationSourcePKHasBeenModified() {
476        return communicationSourcePKHasBeenModified;
477    }
478    
479    public CommunicationEventPurposePK getCommunicationEventPurposePK() {
480        return communicationEventPurposePK;
481    }
482    
483    public void setCommunicationEventPurposePK(CommunicationEventPurposePK communicationEventPurposePK)
484            throws PersistenceNotNullException {
485        checkForNull(communicationEventPurposePK);
486        
487        boolean update = true;
488        
489        if(this.communicationEventPurposePK != null) {
490            if(this.communicationEventPurposePK.equals(communicationEventPurposePK)) {
491                update = false;
492            }
493        } else if(communicationEventPurposePK == null) {
494            update = false;
495        }
496        
497        if(update) {
498            this.communicationEventPurposePK = communicationEventPurposePK;
499            communicationEventPurposePKHasBeenModified = true;
500            clearHashAndString();
501        }
502    }
503    
504    public boolean getCommunicationEventPurposePKHasBeenModified() {
505        return communicationEventPurposePKHasBeenModified;
506    }
507    
508    public CommunicationEventPK getOriginalCommunicationEventPK() {
509        return originalCommunicationEventPK;
510    }
511    
512    public void setOriginalCommunicationEventPK(CommunicationEventPK originalCommunicationEventPK) {
513        boolean update = true;
514        
515        if(this.originalCommunicationEventPK != null) {
516            if(this.originalCommunicationEventPK.equals(originalCommunicationEventPK)) {
517                update = false;
518            }
519        } else if(originalCommunicationEventPK == null) {
520            update = false;
521        }
522        
523        if(update) {
524            this.originalCommunicationEventPK = originalCommunicationEventPK;
525            originalCommunicationEventPKHasBeenModified = true;
526            clearHashAndString();
527        }
528    }
529    
530    public boolean getOriginalCommunicationEventPKHasBeenModified() {
531        return originalCommunicationEventPKHasBeenModified;
532    }
533    
534    public CommunicationEventPK getParentCommunicationEventPK() {
535        return parentCommunicationEventPK;
536    }
537    
538    public void setParentCommunicationEventPK(CommunicationEventPK parentCommunicationEventPK) {
539        boolean update = true;
540        
541        if(this.parentCommunicationEventPK != null) {
542            if(this.parentCommunicationEventPK.equals(parentCommunicationEventPK)) {
543                update = false;
544            }
545        } else if(parentCommunicationEventPK == null) {
546            update = false;
547        }
548        
549        if(update) {
550            this.parentCommunicationEventPK = parentCommunicationEventPK;
551            parentCommunicationEventPKHasBeenModified = true;
552            clearHashAndString();
553        }
554    }
555    
556    public boolean getParentCommunicationEventPKHasBeenModified() {
557        return parentCommunicationEventPKHasBeenModified;
558    }
559    
560    public PartyContactMechanismPK getPartyContactMechanismPK() {
561        return partyContactMechanismPK;
562    }
563    
564    public void setPartyContactMechanismPK(PartyContactMechanismPK partyContactMechanismPK)
565            throws PersistenceNotNullException {
566        checkForNull(partyContactMechanismPK);
567        
568        boolean update = true;
569        
570        if(this.partyContactMechanismPK != null) {
571            if(this.partyContactMechanismPK.equals(partyContactMechanismPK)) {
572                update = false;
573            }
574        } else if(partyContactMechanismPK == null) {
575            update = false;
576        }
577        
578        if(update) {
579            this.partyContactMechanismPK = partyContactMechanismPK;
580            partyContactMechanismPKHasBeenModified = true;
581            clearHashAndString();
582        }
583    }
584    
585    public boolean getPartyContactMechanismPKHasBeenModified() {
586        return partyContactMechanismPKHasBeenModified;
587    }
588    
589    public DocumentPK getDocumentPK() {
590        return documentPK;
591    }
592    
593    public void setDocumentPK(DocumentPK documentPK)
594            throws PersistenceNotNullException {
595        checkForNull(documentPK);
596        
597        boolean update = true;
598        
599        if(this.documentPK != null) {
600            if(this.documentPK.equals(documentPK)) {
601                update = false;
602            }
603        } else if(documentPK == null) {
604            update = false;
605        }
606        
607        if(update) {
608            this.documentPK = documentPK;
609            documentPKHasBeenModified = true;
610            clearHashAndString();
611        }
612    }
613    
614    public boolean getDocumentPKHasBeenModified() {
615        return documentPKHasBeenModified;
616    }
617    
618    public Long getFromTime() {
619        return fromTime;
620    }
621    
622    public void setFromTime(Long fromTime)
623            throws PersistenceNotNullException {
624        checkForNull(fromTime);
625        
626        boolean update = true;
627        
628        if(this.fromTime != null) {
629            if(this.fromTime.equals(fromTime)) {
630                update = false;
631            }
632        } else if(fromTime == null) {
633            update = false;
634        }
635        
636        if(update) {
637            this.fromTime = fromTime;
638            fromTimeHasBeenModified = true;
639            clearHashAndString();
640        }
641    }
642    
643    public boolean getFromTimeHasBeenModified() {
644        return fromTimeHasBeenModified;
645    }
646    
647    public Long getThruTime() {
648        return thruTime;
649    }
650    
651    public void setThruTime(Long thruTime)
652            throws PersistenceNotNullException {
653        checkForNull(thruTime);
654        
655        boolean update = true;
656        
657        if(this.thruTime != null) {
658            if(this.thruTime.equals(thruTime)) {
659                update = false;
660            }
661        } else if(thruTime == null) {
662            update = false;
663        }
664        
665        if(update) {
666            this.thruTime = thruTime;
667            thruTimeHasBeenModified = true;
668            clearHashAndString();
669        }
670    }
671    
672    public boolean getThruTimeHasBeenModified() {
673        return thruTimeHasBeenModified;
674    }
675    
676}