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