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