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 * TransactionGlEntryValue.java
021 */
022
023package com.echothree.model.data.accounting.server.value;
024
025import com.echothree.model.data.accounting.common.pk.TransactionGlEntryPK;
026
027import com.echothree.model.data.accounting.server.factory.TransactionGlEntryFactory;
028
029import com.echothree.model.data.accounting.common.pk.TransactionPK;
030import com.echothree.model.data.party.common.pk.PartyPK;
031import com.echothree.model.data.accounting.common.pk.TransactionGlAccountCategoryPK;
032import com.echothree.model.data.accounting.common.pk.GlAccountPK;
033import com.echothree.model.data.accounting.common.pk.CurrencyPK;
034
035import com.echothree.util.common.exception.PersistenceCloneException;
036import com.echothree.util.common.exception.PersistenceNotNullException;
037
038import com.echothree.util.server.persistence.BaseValue;
039
040import java.io.Serializable;
041
042import javax.annotation.Nonnull;
043import javax.annotation.Nullable;
044
045public class TransactionGlEntryValue
046        extends BaseValue<TransactionGlEntryPK>
047        implements Cloneable, Serializable {
048    
049    private TransactionPK transactionPK;
050    private boolean transactionPKHasBeenModified = false;
051    private Integer transactionGlEntrySequence;
052    private boolean transactionGlEntrySequenceHasBeenModified = false;
053    private PartyPK groupPartyPK;
054    private boolean groupPartyPKHasBeenModified = false;
055    private TransactionGlAccountCategoryPK transactionGlAccountCategoryPK;
056    private boolean transactionGlAccountCategoryPKHasBeenModified = false;
057    private GlAccountPK glAccountPK;
058    private boolean glAccountPKHasBeenModified = false;
059    private CurrencyPK originalCurrencyPK;
060    private boolean originalCurrencyPKHasBeenModified = false;
061    private Long originalDebit;
062    private boolean originalDebitHasBeenModified = false;
063    private Long originalCredit;
064    private boolean originalCreditHasBeenModified = false;
065    private Long debit;
066    private boolean debitHasBeenModified = false;
067    private Long credit;
068    private boolean creditHasBeenModified = false;
069    private Long fromTime;
070    private boolean fromTimeHasBeenModified = false;
071    private Long thruTime;
072    private boolean thruTimeHasBeenModified = false;
073    
074    private transient Integer _hashCode = null;
075    private transient String _stringValue = null;
076    
077    private void constructFields(TransactionPK transactionPK, Integer transactionGlEntrySequence, PartyPK groupPartyPK, TransactionGlAccountCategoryPK transactionGlAccountCategoryPK, GlAccountPK glAccountPK, CurrencyPK originalCurrencyPK, Long originalDebit, Long originalCredit, Long debit, Long credit, Long fromTime, Long thruTime)
078            throws PersistenceNotNullException {
079        checkForNull(transactionPK);
080        this.transactionPK = transactionPK;
081        checkForNull(transactionGlEntrySequence);
082        this.transactionGlEntrySequence = transactionGlEntrySequence;
083        checkForNull(groupPartyPK);
084        this.groupPartyPK = groupPartyPK;
085        this.transactionGlAccountCategoryPK = transactionGlAccountCategoryPK;
086        checkForNull(glAccountPK);
087        this.glAccountPK = glAccountPK;
088        checkForNull(originalCurrencyPK);
089        this.originalCurrencyPK = originalCurrencyPK;
090        this.originalDebit = originalDebit;
091        this.originalCredit = originalCredit;
092        this.debit = debit;
093        this.credit = credit;
094        checkForNull(fromTime);
095        this.fromTime = fromTime;
096        checkForNull(thruTime);
097        this.thruTime = thruTime;
098    }
099    
100    /** Creates a new instance of TransactionGlEntryValue */
101    public TransactionGlEntryValue(TransactionGlEntryPK transactionGlEntryPK, TransactionPK transactionPK, Integer transactionGlEntrySequence, PartyPK groupPartyPK, TransactionGlAccountCategoryPK transactionGlAccountCategoryPK, GlAccountPK glAccountPK, CurrencyPK originalCurrencyPK, Long originalDebit, Long originalCredit, Long debit, Long credit, Long fromTime, Long thruTime)
102            throws PersistenceNotNullException {
103        super(transactionGlEntryPK);
104        constructFields(transactionPK, transactionGlEntrySequence, groupPartyPK, transactionGlAccountCategoryPK, glAccountPK, originalCurrencyPK, originalDebit, originalCredit, debit, credit, fromTime, thruTime);
105    }
106    
107    /** Creates a new instance of TransactionGlEntryValue */
108    public TransactionGlEntryValue(TransactionPK transactionPK, Integer transactionGlEntrySequence, PartyPK groupPartyPK, TransactionGlAccountCategoryPK transactionGlAccountCategoryPK, GlAccountPK glAccountPK, CurrencyPK originalCurrencyPK, Long originalDebit, Long originalCredit, Long debit, Long credit, Long fromTime, Long thruTime)
109            throws PersistenceNotNullException {
110        super();
111        constructFields(transactionPK, transactionGlEntrySequence, groupPartyPK, transactionGlAccountCategoryPK, glAccountPK, originalCurrencyPK, originalDebit, originalCredit, debit, credit, fromTime, thruTime);
112    }
113    
114    @Override
115    @Nonnull
116    public TransactionGlEntryFactory getBaseFactoryInstance() {
117        return TransactionGlEntryFactory.getInstance();
118    }
119    
120    @Override
121    @Nonnull
122    public TransactionGlEntryValue clone() {
123        Object result;
124        
125        try {
126            result = super.clone();
127        } catch (CloneNotSupportedException cnse) {
128            // This shouldn't happen, fail when it does.
129            throw new PersistenceCloneException(cnse);
130        }
131        
132        return (TransactionGlEntryValue)result;
133    }
134    
135    @Override
136    @Nonnull
137    public TransactionGlEntryPK getPrimaryKey() {
138        if(_primaryKey == null) {
139            _primaryKey = new TransactionGlEntryPK(entityId);
140        }
141        
142        return _primaryKey;
143    }
144    
145    private void clearHashAndString() {
146        _hashCode = null;
147        _stringValue = null;
148    }
149    
150    @Override
151    public int hashCode() {
152        if(_hashCode == null) {
153            int hashCode = 17;
154            
155            hashCode = 37 * hashCode + ((entityId != null) ? entityId.hashCode() : 0);
156            
157            hashCode = 37 * hashCode + ((transactionPK != null) ? transactionPK.hashCode() : 0);
158            hashCode = 37 * hashCode + ((transactionGlEntrySequence != null) ? transactionGlEntrySequence.hashCode() : 0);
159            hashCode = 37 * hashCode + ((groupPartyPK != null) ? groupPartyPK.hashCode() : 0);
160            hashCode = 37 * hashCode + ((transactionGlAccountCategoryPK != null) ? transactionGlAccountCategoryPK.hashCode() : 0);
161            hashCode = 37 * hashCode + ((glAccountPK != null) ? glAccountPK.hashCode() : 0);
162            hashCode = 37 * hashCode + ((originalCurrencyPK != null) ? originalCurrencyPK.hashCode() : 0);
163            hashCode = 37 * hashCode + ((originalDebit != null) ? originalDebit.hashCode() : 0);
164            hashCode = 37 * hashCode + ((originalCredit != null) ? originalCredit.hashCode() : 0);
165            hashCode = 37 * hashCode + ((debit != null) ? debit.hashCode() : 0);
166            hashCode = 37 * hashCode + ((credit != null) ? credit.hashCode() : 0);
167            hashCode = 37 * hashCode + ((fromTime != null) ? fromTime.hashCode() : 0);
168            hashCode = 37 * hashCode + ((thruTime != null) ? thruTime.hashCode() : 0);
169            
170            _hashCode = hashCode;
171        }
172        
173        return _hashCode;
174    }
175    
176    @Override
177    @Nonnull
178    public String toString() {
179        if(_stringValue == null) {
180            _stringValue = "{" + 
181                    "entityId=" + getEntityId() +
182                    ", transactionPK=" + getTransactionPK() +
183                    ", transactionGlEntrySequence=" + getTransactionGlEntrySequence() +
184                    ", groupPartyPK=" + getGroupPartyPK() +
185                    ", transactionGlAccountCategoryPK=" + getTransactionGlAccountCategoryPK() +
186                    ", glAccountPK=" + getGlAccountPK() +
187                    ", originalCurrencyPK=" + getOriginalCurrencyPK() +
188                    ", originalDebit=" + getOriginalDebit() +
189                    ", originalCredit=" + getOriginalCredit() +
190                    ", debit=" + getDebit() +
191                    ", credit=" + getCredit() +
192                    ", fromTime=" + getFromTime() +
193                    ", thruTime=" + getThruTime() +
194                    "}";
195        }
196        return _stringValue;
197    }
198    
199    @Override
200    public boolean equals(Object other) {
201        if(this == other)
202            return true;
203        
204        if(!hasIdentity())
205            return false;
206        
207        if(other instanceof  TransactionGlEntryValue that) {
208            if(!that.hasIdentity())
209                return false;
210            
211            Long thisEntityId = getEntityId();
212            Long thatEntityId = that.getEntityId();
213            
214            boolean objectsEqual = thisEntityId.equals(thatEntityId);
215            if(objectsEqual)
216                objectsEqual = isIdentical(that);
217            
218            return objectsEqual;
219        } else {
220            return false;
221        }
222    }
223    
224    public boolean isIdentical(Object other) {
225        if(other instanceof TransactionGlEntryValue that) {
226            boolean objectsEqual = true;
227            
228            
229            if(objectsEqual) {
230                TransactionPK thisTransactionPK = getTransactionPK();
231                TransactionPK thatTransactionPK = that.getTransactionPK();
232                
233                if(thisTransactionPK == null) {
234                    objectsEqual = objectsEqual && (thatTransactionPK == null);
235                } else {
236                    objectsEqual = objectsEqual && thisTransactionPK.equals(thatTransactionPK);
237                }
238            }
239            
240            if(objectsEqual) {
241                Integer thisTransactionGlEntrySequence = getTransactionGlEntrySequence();
242                Integer thatTransactionGlEntrySequence = that.getTransactionGlEntrySequence();
243                
244                if(thisTransactionGlEntrySequence == null) {
245                    objectsEqual = objectsEqual && (thatTransactionGlEntrySequence == null);
246                } else {
247                    objectsEqual = objectsEqual && thisTransactionGlEntrySequence.equals(thatTransactionGlEntrySequence);
248                }
249            }
250            
251            if(objectsEqual) {
252                PartyPK thisGroupPartyPK = getGroupPartyPK();
253                PartyPK thatGroupPartyPK = that.getGroupPartyPK();
254                
255                if(thisGroupPartyPK == null) {
256                    objectsEqual = objectsEqual && (thatGroupPartyPK == null);
257                } else {
258                    objectsEqual = objectsEqual && thisGroupPartyPK.equals(thatGroupPartyPK);
259                }
260            }
261            
262            if(objectsEqual) {
263                TransactionGlAccountCategoryPK thisTransactionGlAccountCategoryPK = getTransactionGlAccountCategoryPK();
264                TransactionGlAccountCategoryPK thatTransactionGlAccountCategoryPK = that.getTransactionGlAccountCategoryPK();
265                
266                if(thisTransactionGlAccountCategoryPK == null) {
267                    objectsEqual = objectsEqual && (thatTransactionGlAccountCategoryPK == null);
268                } else {
269                    objectsEqual = objectsEqual && thisTransactionGlAccountCategoryPK.equals(thatTransactionGlAccountCategoryPK);
270                }
271            }
272            
273            if(objectsEqual) {
274                GlAccountPK thisGlAccountPK = getGlAccountPK();
275                GlAccountPK thatGlAccountPK = that.getGlAccountPK();
276                
277                if(thisGlAccountPK == null) {
278                    objectsEqual = objectsEqual && (thatGlAccountPK == null);
279                } else {
280                    objectsEqual = objectsEqual && thisGlAccountPK.equals(thatGlAccountPK);
281                }
282            }
283            
284            if(objectsEqual) {
285                CurrencyPK thisOriginalCurrencyPK = getOriginalCurrencyPK();
286                CurrencyPK thatOriginalCurrencyPK = that.getOriginalCurrencyPK();
287                
288                if(thisOriginalCurrencyPK == null) {
289                    objectsEqual = objectsEqual && (thatOriginalCurrencyPK == null);
290                } else {
291                    objectsEqual = objectsEqual && thisOriginalCurrencyPK.equals(thatOriginalCurrencyPK);
292                }
293            }
294            
295            if(objectsEqual) {
296                Long thisOriginalDebit = getOriginalDebit();
297                Long thatOriginalDebit = that.getOriginalDebit();
298                
299                if(thisOriginalDebit == null) {
300                    objectsEqual = objectsEqual && (thatOriginalDebit == null);
301                } else {
302                    objectsEqual = objectsEqual && thisOriginalDebit.equals(thatOriginalDebit);
303                }
304            }
305            
306            if(objectsEqual) {
307                Long thisOriginalCredit = getOriginalCredit();
308                Long thatOriginalCredit = that.getOriginalCredit();
309                
310                if(thisOriginalCredit == null) {
311                    objectsEqual = objectsEqual && (thatOriginalCredit == null);
312                } else {
313                    objectsEqual = objectsEqual && thisOriginalCredit.equals(thatOriginalCredit);
314                }
315            }
316            
317            if(objectsEqual) {
318                Long thisDebit = getDebit();
319                Long thatDebit = that.getDebit();
320                
321                if(thisDebit == null) {
322                    objectsEqual = objectsEqual && (thatDebit == null);
323                } else {
324                    objectsEqual = objectsEqual && thisDebit.equals(thatDebit);
325                }
326            }
327            
328            if(objectsEqual) {
329                Long thisCredit = getCredit();
330                Long thatCredit = that.getCredit();
331                
332                if(thisCredit == null) {
333                    objectsEqual = objectsEqual && (thatCredit == null);
334                } else {
335                    objectsEqual = objectsEqual && thisCredit.equals(thatCredit);
336                }
337            }
338            
339            if(objectsEqual) {
340                Long thisFromTime = getFromTime();
341                Long thatFromTime = that.getFromTime();
342                
343                if(thisFromTime == null) {
344                    objectsEqual = objectsEqual && (thatFromTime == null);
345                } else {
346                    objectsEqual = objectsEqual && thisFromTime.equals(thatFromTime);
347                }
348            }
349            
350            if(objectsEqual) {
351                Long thisThruTime = getThruTime();
352                Long thatThruTime = that.getThruTime();
353                
354                if(thisThruTime == null) {
355                    objectsEqual = objectsEqual && (thatThruTime == null);
356                } else {
357                    objectsEqual = objectsEqual && thisThruTime.equals(thatThruTime);
358                }
359            }
360            
361            return objectsEqual;
362        } else {
363            return false;
364        }
365    }
366    
367    @Override
368    public boolean hasBeenModified() {
369        return transactionPKHasBeenModified || transactionGlEntrySequenceHasBeenModified || groupPartyPKHasBeenModified || transactionGlAccountCategoryPKHasBeenModified || glAccountPKHasBeenModified || originalCurrencyPKHasBeenModified || originalDebitHasBeenModified || originalCreditHasBeenModified || debitHasBeenModified || creditHasBeenModified || fromTimeHasBeenModified || thruTimeHasBeenModified;
370    }
371    
372    @Override
373    public void clearHasBeenModified() {
374        transactionPKHasBeenModified = false;
375        transactionGlEntrySequenceHasBeenModified = false;
376        groupPartyPKHasBeenModified = false;
377        transactionGlAccountCategoryPKHasBeenModified = false;
378        glAccountPKHasBeenModified = false;
379        originalCurrencyPKHasBeenModified = false;
380        originalDebitHasBeenModified = false;
381        originalCreditHasBeenModified = false;
382        debitHasBeenModified = false;
383        creditHasBeenModified = false;
384        fromTimeHasBeenModified = false;
385        thruTimeHasBeenModified = false;
386    }
387    
388    @Nonnull
389    public TransactionPK getTransactionPK() {
390        return transactionPK;
391    }
392    
393    public void setTransactionPK(@Nonnull TransactionPK transactionPK)
394            throws PersistenceNotNullException {
395        checkForNull(transactionPK);
396        
397        boolean update = true;
398        
399        if(this.transactionPK != null) {
400            if(this.transactionPK.equals(transactionPK)) {
401                update = false;
402            }
403        } else if(transactionPK == null) {
404            update = false;
405        }
406        
407        if(update) {
408            this.transactionPK = transactionPK;
409            transactionPKHasBeenModified = true;
410            clearHashAndString();
411        }
412    }
413    
414    public boolean getTransactionPKHasBeenModified() {
415        return transactionPKHasBeenModified;
416    }
417    
418    @Nonnull
419    public Integer getTransactionGlEntrySequence() {
420        return transactionGlEntrySequence;
421    }
422    
423    public void setTransactionGlEntrySequence(@Nonnull Integer transactionGlEntrySequence)
424            throws PersistenceNotNullException {
425        checkForNull(transactionGlEntrySequence);
426        
427        boolean update = true;
428        
429        if(this.transactionGlEntrySequence != null) {
430            if(this.transactionGlEntrySequence.equals(transactionGlEntrySequence)) {
431                update = false;
432            }
433        } else if(transactionGlEntrySequence == null) {
434            update = false;
435        }
436        
437        if(update) {
438            this.transactionGlEntrySequence = transactionGlEntrySequence;
439            transactionGlEntrySequenceHasBeenModified = true;
440            clearHashAndString();
441        }
442    }
443    
444    public boolean getTransactionGlEntrySequenceHasBeenModified() {
445        return transactionGlEntrySequenceHasBeenModified;
446    }
447    
448    @Nonnull
449    public PartyPK getGroupPartyPK() {
450        return groupPartyPK;
451    }
452    
453    public void setGroupPartyPK(@Nonnull PartyPK groupPartyPK)
454            throws PersistenceNotNullException {
455        checkForNull(groupPartyPK);
456        
457        boolean update = true;
458        
459        if(this.groupPartyPK != null) {
460            if(this.groupPartyPK.equals(groupPartyPK)) {
461                update = false;
462            }
463        } else if(groupPartyPK == null) {
464            update = false;
465        }
466        
467        if(update) {
468            this.groupPartyPK = groupPartyPK;
469            groupPartyPKHasBeenModified = true;
470            clearHashAndString();
471        }
472    }
473    
474    public boolean getGroupPartyPKHasBeenModified() {
475        return groupPartyPKHasBeenModified;
476    }
477    
478    @Nullable
479    public TransactionGlAccountCategoryPK getTransactionGlAccountCategoryPK() {
480        return transactionGlAccountCategoryPK;
481    }
482    
483    public void setTransactionGlAccountCategoryPK(@Nullable TransactionGlAccountCategoryPK transactionGlAccountCategoryPK) {
484        boolean update = true;
485        
486        if(this.transactionGlAccountCategoryPK != null) {
487            if(this.transactionGlAccountCategoryPK.equals(transactionGlAccountCategoryPK)) {
488                update = false;
489            }
490        } else if(transactionGlAccountCategoryPK == null) {
491            update = false;
492        }
493        
494        if(update) {
495            this.transactionGlAccountCategoryPK = transactionGlAccountCategoryPK;
496            transactionGlAccountCategoryPKHasBeenModified = true;
497            clearHashAndString();
498        }
499    }
500    
501    public boolean getTransactionGlAccountCategoryPKHasBeenModified() {
502        return transactionGlAccountCategoryPKHasBeenModified;
503    }
504    
505    @Nonnull
506    public GlAccountPK getGlAccountPK() {
507        return glAccountPK;
508    }
509    
510    public void setGlAccountPK(@Nonnull GlAccountPK glAccountPK)
511            throws PersistenceNotNullException {
512        checkForNull(glAccountPK);
513        
514        boolean update = true;
515        
516        if(this.glAccountPK != null) {
517            if(this.glAccountPK.equals(glAccountPK)) {
518                update = false;
519            }
520        } else if(glAccountPK == null) {
521            update = false;
522        }
523        
524        if(update) {
525            this.glAccountPK = glAccountPK;
526            glAccountPKHasBeenModified = true;
527            clearHashAndString();
528        }
529    }
530    
531    public boolean getGlAccountPKHasBeenModified() {
532        return glAccountPKHasBeenModified;
533    }
534    
535    @Nonnull
536    public CurrencyPK getOriginalCurrencyPK() {
537        return originalCurrencyPK;
538    }
539    
540    public void setOriginalCurrencyPK(@Nonnull CurrencyPK originalCurrencyPK)
541            throws PersistenceNotNullException {
542        checkForNull(originalCurrencyPK);
543        
544        boolean update = true;
545        
546        if(this.originalCurrencyPK != null) {
547            if(this.originalCurrencyPK.equals(originalCurrencyPK)) {
548                update = false;
549            }
550        } else if(originalCurrencyPK == null) {
551            update = false;
552        }
553        
554        if(update) {
555            this.originalCurrencyPK = originalCurrencyPK;
556            originalCurrencyPKHasBeenModified = true;
557            clearHashAndString();
558        }
559    }
560    
561    public boolean getOriginalCurrencyPKHasBeenModified() {
562        return originalCurrencyPKHasBeenModified;
563    }
564    
565    @Nullable
566    public Long getOriginalDebit() {
567        return originalDebit;
568    }
569    
570    public void setOriginalDebit(@Nullable Long originalDebit) {
571        boolean update = true;
572        
573        if(this.originalDebit != null) {
574            if(this.originalDebit.equals(originalDebit)) {
575                update = false;
576            }
577        } else if(originalDebit == null) {
578            update = false;
579        }
580        
581        if(update) {
582            this.originalDebit = originalDebit;
583            originalDebitHasBeenModified = true;
584            clearHashAndString();
585        }
586    }
587    
588    public boolean getOriginalDebitHasBeenModified() {
589        return originalDebitHasBeenModified;
590    }
591    
592    @Nullable
593    public Long getOriginalCredit() {
594        return originalCredit;
595    }
596    
597    public void setOriginalCredit(@Nullable Long originalCredit) {
598        boolean update = true;
599        
600        if(this.originalCredit != null) {
601            if(this.originalCredit.equals(originalCredit)) {
602                update = false;
603            }
604        } else if(originalCredit == null) {
605            update = false;
606        }
607        
608        if(update) {
609            this.originalCredit = originalCredit;
610            originalCreditHasBeenModified = true;
611            clearHashAndString();
612        }
613    }
614    
615    public boolean getOriginalCreditHasBeenModified() {
616        return originalCreditHasBeenModified;
617    }
618    
619    @Nullable
620    public Long getDebit() {
621        return debit;
622    }
623    
624    public void setDebit(@Nullable Long debit) {
625        boolean update = true;
626        
627        if(this.debit != null) {
628            if(this.debit.equals(debit)) {
629                update = false;
630            }
631        } else if(debit == null) {
632            update = false;
633        }
634        
635        if(update) {
636            this.debit = debit;
637            debitHasBeenModified = true;
638            clearHashAndString();
639        }
640    }
641    
642    public boolean getDebitHasBeenModified() {
643        return debitHasBeenModified;
644    }
645    
646    @Nullable
647    public Long getCredit() {
648        return credit;
649    }
650    
651    public void setCredit(@Nullable Long credit) {
652        boolean update = true;
653        
654        if(this.credit != null) {
655            if(this.credit.equals(credit)) {
656                update = false;
657            }
658        } else if(credit == null) {
659            update = false;
660        }
661        
662        if(update) {
663            this.credit = credit;
664            creditHasBeenModified = true;
665            clearHashAndString();
666        }
667    }
668    
669    public boolean getCreditHasBeenModified() {
670        return creditHasBeenModified;
671    }
672    
673    @Nonnull
674    public Long getFromTime() {
675        return fromTime;
676    }
677    
678    public void setFromTime(@Nonnull Long fromTime)
679            throws PersistenceNotNullException {
680        checkForNull(fromTime);
681        
682        boolean update = true;
683        
684        if(this.fromTime != null) {
685            if(this.fromTime.equals(fromTime)) {
686                update = false;
687            }
688        } else if(fromTime == null) {
689            update = false;
690        }
691        
692        if(update) {
693            this.fromTime = fromTime;
694            fromTimeHasBeenModified = true;
695            clearHashAndString();
696        }
697    }
698    
699    public boolean getFromTimeHasBeenModified() {
700        return fromTimeHasBeenModified;
701    }
702    
703    @Nonnull
704    public Long getThruTime() {
705        return thruTime;
706    }
707    
708    public void setThruTime(@Nonnull Long thruTime)
709            throws PersistenceNotNullException {
710        checkForNull(thruTime);
711        
712        boolean update = true;
713        
714        if(this.thruTime != null) {
715            if(this.thruTime.equals(thruTime)) {
716                update = false;
717            }
718        } else if(thruTime == null) {
719            update = false;
720        }
721        
722        if(update) {
723            this.thruTime = thruTime;
724            thruTimeHasBeenModified = true;
725            clearHashAndString();
726        }
727    }
728    
729    public boolean getThruTimeHasBeenModified() {
730        return thruTimeHasBeenModified;
731    }
732    
733}