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