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 * 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            StringBuilder stringValue = new StringBuilder("{");
172            
173            stringValue.append("entityId=").append(getEntityId());
174            
175            stringValue.append(", communicationEventPK=").append(getCommunicationEventPK());
176            stringValue.append(", communicationEventName=").append(getCommunicationEventName());
177            stringValue.append(", communicationEventTypePK=").append(getCommunicationEventTypePK());
178            stringValue.append(", communicationSourcePK=").append(getCommunicationSourcePK());
179            stringValue.append(", communicationEventPurposePK=").append(getCommunicationEventPurposePK());
180            stringValue.append(", originalCommunicationEventPK=").append(getOriginalCommunicationEventPK());
181            stringValue.append(", parentCommunicationEventPK=").append(getParentCommunicationEventPK());
182            stringValue.append(", partyContactMechanismPK=").append(getPartyContactMechanismPK());
183            stringValue.append(", documentPK=").append(getDocumentPK());
184            stringValue.append(", fromTime=").append(getFromTime());
185            stringValue.append(", thruTime=").append(getThruTime());
186            
187            stringValue.append('}');
188            
189            _stringValue = stringValue.toString();
190        }
191        return _stringValue;
192    }
193    
194    @Override
195    public boolean equals(Object other) {
196        if(this == other)
197            return true;
198        
199        if(!hasIdentity())
200            return false;
201        
202        if(other instanceof  CommunicationEventDetailValue) {
203            CommunicationEventDetailValue that = (CommunicationEventDetailValue)other;
204            
205            if(!that.hasIdentity())
206                return false;
207            
208            Long thisEntityId = getEntityId();
209            Long thatEntityId = that.getEntityId();
210            
211            boolean objectsEqual = thisEntityId.equals(thatEntityId);
212            if(objectsEqual)
213                objectsEqual = objectsEqual && isIdentical(that);
214            
215            return objectsEqual;
216        } else {
217            return false;
218        }
219    }
220    
221    public boolean isIdentical(Object other) {
222        if(other instanceof CommunicationEventDetailValue) {
223            CommunicationEventDetailValue that = (CommunicationEventDetailValue)other;
224            boolean objectsEqual = true;
225            
226            
227            if(objectsEqual) {
228                CommunicationEventPK thisCommunicationEventPK = getCommunicationEventPK();
229                CommunicationEventPK thatCommunicationEventPK = that.getCommunicationEventPK();
230                
231                if(thisCommunicationEventPK == null) {
232                    objectsEqual = objectsEqual && (thatCommunicationEventPK == null);
233                } else {
234                    objectsEqual = objectsEqual && thisCommunicationEventPK.equals(thatCommunicationEventPK);
235                }
236            }
237            
238            if(objectsEqual) {
239                String thisCommunicationEventName = getCommunicationEventName();
240                String thatCommunicationEventName = that.getCommunicationEventName();
241                
242                if(thisCommunicationEventName == null) {
243                    objectsEqual = objectsEqual && (thatCommunicationEventName == null);
244                } else {
245                    objectsEqual = objectsEqual && thisCommunicationEventName.equals(thatCommunicationEventName);
246                }
247            }
248            
249            if(objectsEqual) {
250                CommunicationEventTypePK thisCommunicationEventTypePK = getCommunicationEventTypePK();
251                CommunicationEventTypePK thatCommunicationEventTypePK = that.getCommunicationEventTypePK();
252                
253                if(thisCommunicationEventTypePK == null) {
254                    objectsEqual = objectsEqual && (thatCommunicationEventTypePK == null);
255                } else {
256                    objectsEqual = objectsEqual && thisCommunicationEventTypePK.equals(thatCommunicationEventTypePK);
257                }
258            }
259            
260            if(objectsEqual) {
261                CommunicationSourcePK thisCommunicationSourcePK = getCommunicationSourcePK();
262                CommunicationSourcePK thatCommunicationSourcePK = that.getCommunicationSourcePK();
263                
264                if(thisCommunicationSourcePK == null) {
265                    objectsEqual = objectsEqual && (thatCommunicationSourcePK == null);
266                } else {
267                    objectsEqual = objectsEqual && thisCommunicationSourcePK.equals(thatCommunicationSourcePK);
268                }
269            }
270            
271            if(objectsEqual) {
272                CommunicationEventPurposePK thisCommunicationEventPurposePK = getCommunicationEventPurposePK();
273                CommunicationEventPurposePK thatCommunicationEventPurposePK = that.getCommunicationEventPurposePK();
274                
275                if(thisCommunicationEventPurposePK == null) {
276                    objectsEqual = objectsEqual && (thatCommunicationEventPurposePK == null);
277                } else {
278                    objectsEqual = objectsEqual && thisCommunicationEventPurposePK.equals(thatCommunicationEventPurposePK);
279                }
280            }
281            
282            if(objectsEqual) {
283                CommunicationEventPK thisOriginalCommunicationEventPK = getOriginalCommunicationEventPK();
284                CommunicationEventPK thatOriginalCommunicationEventPK = that.getOriginalCommunicationEventPK();
285                
286                if(thisOriginalCommunicationEventPK == null) {
287                    objectsEqual = objectsEqual && (thatOriginalCommunicationEventPK == null);
288                } else {
289                    objectsEqual = objectsEqual && thisOriginalCommunicationEventPK.equals(thatOriginalCommunicationEventPK);
290                }
291            }
292            
293            if(objectsEqual) {
294                CommunicationEventPK thisParentCommunicationEventPK = getParentCommunicationEventPK();
295                CommunicationEventPK thatParentCommunicationEventPK = that.getParentCommunicationEventPK();
296                
297                if(thisParentCommunicationEventPK == null) {
298                    objectsEqual = objectsEqual && (thatParentCommunicationEventPK == null);
299                } else {
300                    objectsEqual = objectsEqual && thisParentCommunicationEventPK.equals(thatParentCommunicationEventPK);
301                }
302            }
303            
304            if(objectsEqual) {
305                PartyContactMechanismPK thisPartyContactMechanismPK = getPartyContactMechanismPK();
306                PartyContactMechanismPK thatPartyContactMechanismPK = that.getPartyContactMechanismPK();
307                
308                if(thisPartyContactMechanismPK == null) {
309                    objectsEqual = objectsEqual && (thatPartyContactMechanismPK == null);
310                } else {
311                    objectsEqual = objectsEqual && thisPartyContactMechanismPK.equals(thatPartyContactMechanismPK);
312                }
313            }
314            
315            if(objectsEqual) {
316                DocumentPK thisDocumentPK = getDocumentPK();
317                DocumentPK thatDocumentPK = that.getDocumentPK();
318                
319                if(thisDocumentPK == null) {
320                    objectsEqual = objectsEqual && (thatDocumentPK == null);
321                } else {
322                    objectsEqual = objectsEqual && thisDocumentPK.equals(thatDocumentPK);
323                }
324            }
325            
326            if(objectsEqual) {
327                Long thisFromTime = getFromTime();
328                Long thatFromTime = that.getFromTime();
329                
330                if(thisFromTime == null) {
331                    objectsEqual = objectsEqual && (thatFromTime == null);
332                } else {
333                    objectsEqual = objectsEqual && thisFromTime.equals(thatFromTime);
334                }
335            }
336            
337            if(objectsEqual) {
338                Long thisThruTime = getThruTime();
339                Long thatThruTime = that.getThruTime();
340                
341                if(thisThruTime == null) {
342                    objectsEqual = objectsEqual && (thatThruTime == null);
343                } else {
344                    objectsEqual = objectsEqual && thisThruTime.equals(thatThruTime);
345                }
346            }
347            
348            return objectsEqual;
349        } else {
350            return false;
351        }
352    }
353    
354    @Override
355    public boolean hasBeenModified() {
356        return communicationEventPKHasBeenModified || communicationEventNameHasBeenModified || communicationEventTypePKHasBeenModified || communicationSourcePKHasBeenModified || communicationEventPurposePKHasBeenModified || originalCommunicationEventPKHasBeenModified || parentCommunicationEventPKHasBeenModified || partyContactMechanismPKHasBeenModified || documentPKHasBeenModified || fromTimeHasBeenModified || thruTimeHasBeenModified;
357    }
358    
359    @Override
360    public void clearHasBeenModified() {
361        communicationEventPKHasBeenModified = false;
362        communicationEventNameHasBeenModified = false;
363        communicationEventTypePKHasBeenModified = false;
364        communicationSourcePKHasBeenModified = false;
365        communicationEventPurposePKHasBeenModified = false;
366        originalCommunicationEventPKHasBeenModified = false;
367        parentCommunicationEventPKHasBeenModified = false;
368        partyContactMechanismPKHasBeenModified = false;
369        documentPKHasBeenModified = false;
370        fromTimeHasBeenModified = false;
371        thruTimeHasBeenModified = false;
372    }
373    
374    public CommunicationEventPK getCommunicationEventPK() {
375        return communicationEventPK;
376    }
377    
378    public void setCommunicationEventPK(CommunicationEventPK communicationEventPK)
379            throws PersistenceNotNullException {
380        checkForNull(communicationEventPK);
381        
382        boolean update = true;
383        
384        if(this.communicationEventPK != null) {
385            if(this.communicationEventPK.equals(communicationEventPK)) {
386                update = false;
387            }
388        } else if(communicationEventPK == null) {
389            update = false;
390        }
391        
392        if(update) {
393            this.communicationEventPK = communicationEventPK;
394            communicationEventPKHasBeenModified = true;
395            clearHashAndString();
396        }
397    }
398    
399    public boolean getCommunicationEventPKHasBeenModified() {
400        return communicationEventPKHasBeenModified;
401    }
402    
403    public String getCommunicationEventName() {
404        return communicationEventName;
405    }
406    
407    public void setCommunicationEventName(String communicationEventName)
408            throws PersistenceNotNullException {
409        checkForNull(communicationEventName);
410        
411        boolean update = true;
412        
413        if(this.communicationEventName != null) {
414            if(this.communicationEventName.equals(communicationEventName)) {
415                update = false;
416            }
417        } else if(communicationEventName == null) {
418            update = false;
419        }
420        
421        if(update) {
422            this.communicationEventName = communicationEventName;
423            communicationEventNameHasBeenModified = true;
424            clearHashAndString();
425        }
426    }
427    
428    public boolean getCommunicationEventNameHasBeenModified() {
429        return communicationEventNameHasBeenModified;
430    }
431    
432    public CommunicationEventTypePK getCommunicationEventTypePK() {
433        return communicationEventTypePK;
434    }
435    
436    public void setCommunicationEventTypePK(CommunicationEventTypePK communicationEventTypePK)
437            throws PersistenceNotNullException {
438        checkForNull(communicationEventTypePK);
439        
440        boolean update = true;
441        
442        if(this.communicationEventTypePK != null) {
443            if(this.communicationEventTypePK.equals(communicationEventTypePK)) {
444                update = false;
445            }
446        } else if(communicationEventTypePK == null) {
447            update = false;
448        }
449        
450        if(update) {
451            this.communicationEventTypePK = communicationEventTypePK;
452            communicationEventTypePKHasBeenModified = true;
453            clearHashAndString();
454        }
455    }
456    
457    public boolean getCommunicationEventTypePKHasBeenModified() {
458        return communicationEventTypePKHasBeenModified;
459    }
460    
461    public CommunicationSourcePK getCommunicationSourcePK() {
462        return communicationSourcePK;
463    }
464    
465    public void setCommunicationSourcePK(CommunicationSourcePK communicationSourcePK) {
466        boolean update = true;
467        
468        if(this.communicationSourcePK != null) {
469            if(this.communicationSourcePK.equals(communicationSourcePK)) {
470                update = false;
471            }
472        } else if(communicationSourcePK == null) {
473            update = false;
474        }
475        
476        if(update) {
477            this.communicationSourcePK = communicationSourcePK;
478            communicationSourcePKHasBeenModified = true;
479            clearHashAndString();
480        }
481    }
482    
483    public boolean getCommunicationSourcePKHasBeenModified() {
484        return communicationSourcePKHasBeenModified;
485    }
486    
487    public CommunicationEventPurposePK getCommunicationEventPurposePK() {
488        return communicationEventPurposePK;
489    }
490    
491    public void setCommunicationEventPurposePK(CommunicationEventPurposePK communicationEventPurposePK)
492            throws PersistenceNotNullException {
493        checkForNull(communicationEventPurposePK);
494        
495        boolean update = true;
496        
497        if(this.communicationEventPurposePK != null) {
498            if(this.communicationEventPurposePK.equals(communicationEventPurposePK)) {
499                update = false;
500            }
501        } else if(communicationEventPurposePK == null) {
502            update = false;
503        }
504        
505        if(update) {
506            this.communicationEventPurposePK = communicationEventPurposePK;
507            communicationEventPurposePKHasBeenModified = true;
508            clearHashAndString();
509        }
510    }
511    
512    public boolean getCommunicationEventPurposePKHasBeenModified() {
513        return communicationEventPurposePKHasBeenModified;
514    }
515    
516    public CommunicationEventPK getOriginalCommunicationEventPK() {
517        return originalCommunicationEventPK;
518    }
519    
520    public void setOriginalCommunicationEventPK(CommunicationEventPK originalCommunicationEventPK) {
521        boolean update = true;
522        
523        if(this.originalCommunicationEventPK != null) {
524            if(this.originalCommunicationEventPK.equals(originalCommunicationEventPK)) {
525                update = false;
526            }
527        } else if(originalCommunicationEventPK == null) {
528            update = false;
529        }
530        
531        if(update) {
532            this.originalCommunicationEventPK = originalCommunicationEventPK;
533            originalCommunicationEventPKHasBeenModified = true;
534            clearHashAndString();
535        }
536    }
537    
538    public boolean getOriginalCommunicationEventPKHasBeenModified() {
539        return originalCommunicationEventPKHasBeenModified;
540    }
541    
542    public CommunicationEventPK getParentCommunicationEventPK() {
543        return parentCommunicationEventPK;
544    }
545    
546    public void setParentCommunicationEventPK(CommunicationEventPK parentCommunicationEventPK) {
547        boolean update = true;
548        
549        if(this.parentCommunicationEventPK != null) {
550            if(this.parentCommunicationEventPK.equals(parentCommunicationEventPK)) {
551                update = false;
552            }
553        } else if(parentCommunicationEventPK == null) {
554            update = false;
555        }
556        
557        if(update) {
558            this.parentCommunicationEventPK = parentCommunicationEventPK;
559            parentCommunicationEventPKHasBeenModified = true;
560            clearHashAndString();
561        }
562    }
563    
564    public boolean getParentCommunicationEventPKHasBeenModified() {
565        return parentCommunicationEventPKHasBeenModified;
566    }
567    
568    public PartyContactMechanismPK getPartyContactMechanismPK() {
569        return partyContactMechanismPK;
570    }
571    
572    public void setPartyContactMechanismPK(PartyContactMechanismPK partyContactMechanismPK)
573            throws PersistenceNotNullException {
574        checkForNull(partyContactMechanismPK);
575        
576        boolean update = true;
577        
578        if(this.partyContactMechanismPK != null) {
579            if(this.partyContactMechanismPK.equals(partyContactMechanismPK)) {
580                update = false;
581            }
582        } else if(partyContactMechanismPK == null) {
583            update = false;
584        }
585        
586        if(update) {
587            this.partyContactMechanismPK = partyContactMechanismPK;
588            partyContactMechanismPKHasBeenModified = true;
589            clearHashAndString();
590        }
591    }
592    
593    public boolean getPartyContactMechanismPKHasBeenModified() {
594        return partyContactMechanismPKHasBeenModified;
595    }
596    
597    public DocumentPK getDocumentPK() {
598        return documentPK;
599    }
600    
601    public void setDocumentPK(DocumentPK documentPK)
602            throws PersistenceNotNullException {
603        checkForNull(documentPK);
604        
605        boolean update = true;
606        
607        if(this.documentPK != null) {
608            if(this.documentPK.equals(documentPK)) {
609                update = false;
610            }
611        } else if(documentPK == null) {
612            update = false;
613        }
614        
615        if(update) {
616            this.documentPK = documentPK;
617            documentPKHasBeenModified = true;
618            clearHashAndString();
619        }
620    }
621    
622    public boolean getDocumentPKHasBeenModified() {
623        return documentPKHasBeenModified;
624    }
625    
626    public Long getFromTime() {
627        return fromTime;
628    }
629    
630    public void setFromTime(Long fromTime)
631            throws PersistenceNotNullException {
632        checkForNull(fromTime);
633        
634        boolean update = true;
635        
636        if(this.fromTime != null) {
637            if(this.fromTime.equals(fromTime)) {
638                update = false;
639            }
640        } else if(fromTime == null) {
641            update = false;
642        }
643        
644        if(update) {
645            this.fromTime = fromTime;
646            fromTimeHasBeenModified = true;
647            clearHashAndString();
648        }
649    }
650    
651    public boolean getFromTimeHasBeenModified() {
652        return fromTimeHasBeenModified;
653    }
654    
655    public Long getThruTime() {
656        return thruTime;
657    }
658    
659    public void setThruTime(Long thruTime)
660            throws PersistenceNotNullException {
661        checkForNull(thruTime);
662        
663        boolean update = true;
664        
665        if(this.thruTime != null) {
666            if(this.thruTime.equals(thruTime)) {
667                update = false;
668            }
669        } else if(thruTime == null) {
670            update = false;
671        }
672        
673        if(update) {
674            this.thruTime = thruTime;
675            thruTimeHasBeenModified = true;
676            clearHashAndString();
677        }
678    }
679    
680    public boolean getThruTimeHasBeenModified() {
681        return thruTimeHasBeenModified;
682    }
683    
684}