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 * OrderDetailValue.java
021 */
022
023package com.echothree.model.data.order.server.value;
024
025import com.echothree.model.data.order.common.pk.OrderDetailPK;
026
027import com.echothree.model.data.order.server.factory.OrderDetailFactory;
028
029import com.echothree.model.data.order.common.pk.OrderPK;
030import com.echothree.model.data.order.common.pk.OrderTypePK;
031import com.echothree.model.data.order.common.pk.OrderPriorityPK;
032import com.echothree.model.data.accounting.common.pk.CurrencyPK;
033import com.echothree.model.data.term.common.pk.TermPK;
034import com.echothree.model.data.shipment.common.pk.FreeOnBoardPK;
035import com.echothree.model.data.cancellationpolicy.common.pk.CancellationPolicyPK;
036import com.echothree.model.data.returnpolicy.common.pk.ReturnPolicyPK;
037
038import com.echothree.util.common.exception.PersistenceCloneException;
039import com.echothree.util.common.exception.PersistenceNotNullException;
040
041import com.echothree.util.server.persistence.BaseValue;
042
043import java.io.Serializable;
044
045public class OrderDetailValue
046        extends BaseValue<OrderDetailPK>
047        implements Cloneable, Serializable {
048    
049    private OrderPK orderPK;
050    private boolean orderPKHasBeenModified = false;
051    private OrderTypePK orderTypePK;
052    private boolean orderTypePKHasBeenModified = false;
053    private String orderName;
054    private boolean orderNameHasBeenModified = false;
055    private OrderPriorityPK orderPriorityPK;
056    private boolean orderPriorityPKHasBeenModified = false;
057    private CurrencyPK currencyPK;
058    private boolean currencyPKHasBeenModified = false;
059    private Boolean holdUntilComplete;
060    private boolean holdUntilCompleteHasBeenModified = false;
061    private Boolean allowBackorders;
062    private boolean allowBackordersHasBeenModified = false;
063    private Boolean allowSubstitutions;
064    private boolean allowSubstitutionsHasBeenModified = false;
065    private Boolean allowCombiningShipments;
066    private boolean allowCombiningShipmentsHasBeenModified = false;
067    private TermPK termPK;
068    private boolean termPKHasBeenModified = false;
069    private FreeOnBoardPK freeOnBoardPK;
070    private boolean freeOnBoardPKHasBeenModified = false;
071    private String reference;
072    private boolean referenceHasBeenModified = false;
073    private String description;
074    private boolean descriptionHasBeenModified = false;
075    private CancellationPolicyPK cancellationPolicyPK;
076    private boolean cancellationPolicyPKHasBeenModified = false;
077    private ReturnPolicyPK returnPolicyPK;
078    private boolean returnPolicyPKHasBeenModified = false;
079    private Boolean taxable;
080    private boolean taxableHasBeenModified = false;
081    private Long fromTime;
082    private boolean fromTimeHasBeenModified = false;
083    private Long thruTime;
084    private boolean thruTimeHasBeenModified = false;
085    
086    private transient Integer _hashCode = null;
087    private transient String _stringValue = null;
088    
089    private void constructFields(OrderPK orderPK, OrderTypePK orderTypePK, String orderName, OrderPriorityPK orderPriorityPK, CurrencyPK currencyPK, Boolean holdUntilComplete, Boolean allowBackorders, Boolean allowSubstitutions, Boolean allowCombiningShipments, TermPK termPK, FreeOnBoardPK freeOnBoardPK, String reference, String description, CancellationPolicyPK cancellationPolicyPK, ReturnPolicyPK returnPolicyPK, Boolean taxable, Long fromTime, Long thruTime)
090            throws PersistenceNotNullException {
091        checkForNull(orderPK);
092        this.orderPK = orderPK;
093        checkForNull(orderTypePK);
094        this.orderTypePK = orderTypePK;
095        checkForNull(orderName);
096        this.orderName = orderName;
097        this.orderPriorityPK = orderPriorityPK;
098        checkForNull(currencyPK);
099        this.currencyPK = currencyPK;
100        this.holdUntilComplete = holdUntilComplete;
101        this.allowBackorders = allowBackorders;
102        this.allowSubstitutions = allowSubstitutions;
103        this.allowCombiningShipments = allowCombiningShipments;
104        this.termPK = termPK;
105        this.freeOnBoardPK = freeOnBoardPK;
106        this.reference = reference;
107        this.description = description;
108        this.cancellationPolicyPK = cancellationPolicyPK;
109        this.returnPolicyPK = returnPolicyPK;
110        this.taxable = taxable;
111        checkForNull(fromTime);
112        this.fromTime = fromTime;
113        checkForNull(thruTime);
114        this.thruTime = thruTime;
115    }
116    
117    /** Creates a new instance of OrderDetailValue */
118    public OrderDetailValue(OrderDetailPK orderDetailPK, OrderPK orderPK, OrderTypePK orderTypePK, String orderName, OrderPriorityPK orderPriorityPK, CurrencyPK currencyPK, Boolean holdUntilComplete, Boolean allowBackorders, Boolean allowSubstitutions, Boolean allowCombiningShipments, TermPK termPK, FreeOnBoardPK freeOnBoardPK, String reference, String description, CancellationPolicyPK cancellationPolicyPK, ReturnPolicyPK returnPolicyPK, Boolean taxable, Long fromTime, Long thruTime)
119            throws PersistenceNotNullException {
120        super(orderDetailPK);
121        constructFields(orderPK, orderTypePK, orderName, orderPriorityPK, currencyPK, holdUntilComplete, allowBackorders, allowSubstitutions, allowCombiningShipments, termPK, freeOnBoardPK, reference, description, cancellationPolicyPK, returnPolicyPK, taxable, fromTime, thruTime);
122    }
123    
124    /** Creates a new instance of OrderDetailValue */
125    public OrderDetailValue(OrderPK orderPK, OrderTypePK orderTypePK, String orderName, OrderPriorityPK orderPriorityPK, CurrencyPK currencyPK, Boolean holdUntilComplete, Boolean allowBackorders, Boolean allowSubstitutions, Boolean allowCombiningShipments, TermPK termPK, FreeOnBoardPK freeOnBoardPK, String reference, String description, CancellationPolicyPK cancellationPolicyPK, ReturnPolicyPK returnPolicyPK, Boolean taxable, Long fromTime, Long thruTime)
126            throws PersistenceNotNullException {
127        super();
128        constructFields(orderPK, orderTypePK, orderName, orderPriorityPK, currencyPK, holdUntilComplete, allowBackorders, allowSubstitutions, allowCombiningShipments, termPK, freeOnBoardPK, reference, description, cancellationPolicyPK, returnPolicyPK, taxable, fromTime, thruTime);
129    }
130    
131   @Override
132   public OrderDetailFactory getBaseFactoryInstance() {
133        return OrderDetailFactory.getInstance();
134    }
135    
136    @Override
137    public OrderDetailValue clone() {
138        Object result;
139        
140        try {
141            result = super.clone();
142        } catch (CloneNotSupportedException cnse) {
143            // This shouldn't happen, fail when it does.
144            throw new PersistenceCloneException(cnse);
145        }
146        
147        return (OrderDetailValue)result;
148    }
149    
150   @Override
151    public OrderDetailPK getPrimaryKey() {
152        if(_primaryKey == null) {
153            _primaryKey = new OrderDetailPK(entityId);
154        }
155        
156        return _primaryKey;
157    }
158    
159    private void clearHashAndString() {
160        _hashCode = null;
161        _stringValue = null;
162    }
163    
164    @Override
165    public int hashCode() {
166        if(_hashCode == null) {
167            int hashCode = 17;
168            
169            hashCode = 37 * hashCode + ((entityId != null) ? entityId.hashCode() : 0);
170            
171            hashCode = 37 * hashCode + ((orderPK != null) ? orderPK.hashCode() : 0);
172            hashCode = 37 * hashCode + ((orderTypePK != null) ? orderTypePK.hashCode() : 0);
173            hashCode = 37 * hashCode + ((orderName != null) ? orderName.hashCode() : 0);
174            hashCode = 37 * hashCode + ((orderPriorityPK != null) ? orderPriorityPK.hashCode() : 0);
175            hashCode = 37 * hashCode + ((currencyPK != null) ? currencyPK.hashCode() : 0);
176            hashCode = 37 * hashCode + ((holdUntilComplete != null) ? holdUntilComplete.hashCode() : 0);
177            hashCode = 37 * hashCode + ((allowBackorders != null) ? allowBackorders.hashCode() : 0);
178            hashCode = 37 * hashCode + ((allowSubstitutions != null) ? allowSubstitutions.hashCode() : 0);
179            hashCode = 37 * hashCode + ((allowCombiningShipments != null) ? allowCombiningShipments.hashCode() : 0);
180            hashCode = 37 * hashCode + ((termPK != null) ? termPK.hashCode() : 0);
181            hashCode = 37 * hashCode + ((freeOnBoardPK != null) ? freeOnBoardPK.hashCode() : 0);
182            hashCode = 37 * hashCode + ((reference != null) ? reference.hashCode() : 0);
183            hashCode = 37 * hashCode + ((description != null) ? description.hashCode() : 0);
184            hashCode = 37 * hashCode + ((cancellationPolicyPK != null) ? cancellationPolicyPK.hashCode() : 0);
185            hashCode = 37 * hashCode + ((returnPolicyPK != null) ? returnPolicyPK.hashCode() : 0);
186            hashCode = 37 * hashCode + ((taxable != null) ? taxable.hashCode() : 0);
187            hashCode = 37 * hashCode + ((fromTime != null) ? fromTime.hashCode() : 0);
188            hashCode = 37 * hashCode + ((thruTime != null) ? thruTime.hashCode() : 0);
189            
190            _hashCode = hashCode;
191        }
192        
193        return _hashCode;
194    }
195    
196    @Override
197    public String toString() {
198        if(_stringValue == null) {
199            StringBuilder stringValue = new StringBuilder("{");
200            
201            stringValue.append("entityId=").append(getEntityId());
202            
203            stringValue.append(", orderPK=").append(getOrderPK());
204            stringValue.append(", orderTypePK=").append(getOrderTypePK());
205            stringValue.append(", orderName=").append(getOrderName());
206            stringValue.append(", orderPriorityPK=").append(getOrderPriorityPK());
207            stringValue.append(", currencyPK=").append(getCurrencyPK());
208            stringValue.append(", holdUntilComplete=").append(getHoldUntilComplete());
209            stringValue.append(", allowBackorders=").append(getAllowBackorders());
210            stringValue.append(", allowSubstitutions=").append(getAllowSubstitutions());
211            stringValue.append(", allowCombiningShipments=").append(getAllowCombiningShipments());
212            stringValue.append(", termPK=").append(getTermPK());
213            stringValue.append(", freeOnBoardPK=").append(getFreeOnBoardPK());
214            stringValue.append(", reference=").append(getReference());
215            stringValue.append(", description=").append(getDescription());
216            stringValue.append(", cancellationPolicyPK=").append(getCancellationPolicyPK());
217            stringValue.append(", returnPolicyPK=").append(getReturnPolicyPK());
218            stringValue.append(", taxable=").append(getTaxable());
219            stringValue.append(", fromTime=").append(getFromTime());
220            stringValue.append(", thruTime=").append(getThruTime());
221            
222            stringValue.append('}');
223            
224            _stringValue = stringValue.toString();
225        }
226        return _stringValue;
227    }
228    
229    @Override
230    public boolean equals(Object other) {
231        if(this == other)
232            return true;
233        
234        if(!hasIdentity())
235            return false;
236        
237        if(other instanceof  OrderDetailValue) {
238            OrderDetailValue that = (OrderDetailValue)other;
239            
240            if(!that.hasIdentity())
241                return false;
242            
243            Long thisEntityId = getEntityId();
244            Long thatEntityId = that.getEntityId();
245            
246            boolean objectsEqual = thisEntityId.equals(thatEntityId);
247            if(objectsEqual)
248                objectsEqual = objectsEqual && isIdentical(that);
249            
250            return objectsEqual;
251        } else {
252            return false;
253        }
254    }
255    
256    public boolean isIdentical(Object other) {
257        if(other instanceof OrderDetailValue) {
258            OrderDetailValue that = (OrderDetailValue)other;
259            boolean objectsEqual = true;
260            
261            
262            if(objectsEqual) {
263                OrderPK thisOrderPK = getOrderPK();
264                OrderPK thatOrderPK = that.getOrderPK();
265                
266                if(thisOrderPK == null) {
267                    objectsEqual = objectsEqual && (thatOrderPK == null);
268                } else {
269                    objectsEqual = objectsEqual && thisOrderPK.equals(thatOrderPK);
270                }
271            }
272            
273            if(objectsEqual) {
274                OrderTypePK thisOrderTypePK = getOrderTypePK();
275                OrderTypePK thatOrderTypePK = that.getOrderTypePK();
276                
277                if(thisOrderTypePK == null) {
278                    objectsEqual = objectsEqual && (thatOrderTypePK == null);
279                } else {
280                    objectsEqual = objectsEqual && thisOrderTypePK.equals(thatOrderTypePK);
281                }
282            }
283            
284            if(objectsEqual) {
285                String thisOrderName = getOrderName();
286                String thatOrderName = that.getOrderName();
287                
288                if(thisOrderName == null) {
289                    objectsEqual = objectsEqual && (thatOrderName == null);
290                } else {
291                    objectsEqual = objectsEqual && thisOrderName.equals(thatOrderName);
292                }
293            }
294            
295            if(objectsEqual) {
296                OrderPriorityPK thisOrderPriorityPK = getOrderPriorityPK();
297                OrderPriorityPK thatOrderPriorityPK = that.getOrderPriorityPK();
298                
299                if(thisOrderPriorityPK == null) {
300                    objectsEqual = objectsEqual && (thatOrderPriorityPK == null);
301                } else {
302                    objectsEqual = objectsEqual && thisOrderPriorityPK.equals(thatOrderPriorityPK);
303                }
304            }
305            
306            if(objectsEqual) {
307                CurrencyPK thisCurrencyPK = getCurrencyPK();
308                CurrencyPK thatCurrencyPK = that.getCurrencyPK();
309                
310                if(thisCurrencyPK == null) {
311                    objectsEqual = objectsEqual && (thatCurrencyPK == null);
312                } else {
313                    objectsEqual = objectsEqual && thisCurrencyPK.equals(thatCurrencyPK);
314                }
315            }
316            
317            if(objectsEqual) {
318                Boolean thisHoldUntilComplete = getHoldUntilComplete();
319                Boolean thatHoldUntilComplete = that.getHoldUntilComplete();
320                
321                if(thisHoldUntilComplete == null) {
322                    objectsEqual = objectsEqual && (thatHoldUntilComplete == null);
323                } else {
324                    objectsEqual = objectsEqual && thisHoldUntilComplete.equals(thatHoldUntilComplete);
325                }
326            }
327            
328            if(objectsEqual) {
329                Boolean thisAllowBackorders = getAllowBackorders();
330                Boolean thatAllowBackorders = that.getAllowBackorders();
331                
332                if(thisAllowBackorders == null) {
333                    objectsEqual = objectsEqual && (thatAllowBackorders == null);
334                } else {
335                    objectsEqual = objectsEqual && thisAllowBackorders.equals(thatAllowBackorders);
336                }
337            }
338            
339            if(objectsEqual) {
340                Boolean thisAllowSubstitutions = getAllowSubstitutions();
341                Boolean thatAllowSubstitutions = that.getAllowSubstitutions();
342                
343                if(thisAllowSubstitutions == null) {
344                    objectsEqual = objectsEqual && (thatAllowSubstitutions == null);
345                } else {
346                    objectsEqual = objectsEqual && thisAllowSubstitutions.equals(thatAllowSubstitutions);
347                }
348            }
349            
350            if(objectsEqual) {
351                Boolean thisAllowCombiningShipments = getAllowCombiningShipments();
352                Boolean thatAllowCombiningShipments = that.getAllowCombiningShipments();
353                
354                if(thisAllowCombiningShipments == null) {
355                    objectsEqual = objectsEqual && (thatAllowCombiningShipments == null);
356                } else {
357                    objectsEqual = objectsEqual && thisAllowCombiningShipments.equals(thatAllowCombiningShipments);
358                }
359            }
360            
361            if(objectsEqual) {
362                TermPK thisTermPK = getTermPK();
363                TermPK thatTermPK = that.getTermPK();
364                
365                if(thisTermPK == null) {
366                    objectsEqual = objectsEqual && (thatTermPK == null);
367                } else {
368                    objectsEqual = objectsEqual && thisTermPK.equals(thatTermPK);
369                }
370            }
371            
372            if(objectsEqual) {
373                FreeOnBoardPK thisFreeOnBoardPK = getFreeOnBoardPK();
374                FreeOnBoardPK thatFreeOnBoardPK = that.getFreeOnBoardPK();
375                
376                if(thisFreeOnBoardPK == null) {
377                    objectsEqual = objectsEqual && (thatFreeOnBoardPK == null);
378                } else {
379                    objectsEqual = objectsEqual && thisFreeOnBoardPK.equals(thatFreeOnBoardPK);
380                }
381            }
382            
383            if(objectsEqual) {
384                String thisReference = getReference();
385                String thatReference = that.getReference();
386                
387                if(thisReference == null) {
388                    objectsEqual = objectsEqual && (thatReference == null);
389                } else {
390                    objectsEqual = objectsEqual && thisReference.equals(thatReference);
391                }
392            }
393            
394            if(objectsEqual) {
395                String thisDescription = getDescription();
396                String thatDescription = that.getDescription();
397                
398                if(thisDescription == null) {
399                    objectsEqual = objectsEqual && (thatDescription == null);
400                } else {
401                    objectsEqual = objectsEqual && thisDescription.equals(thatDescription);
402                }
403            }
404            
405            if(objectsEqual) {
406                CancellationPolicyPK thisCancellationPolicyPK = getCancellationPolicyPK();
407                CancellationPolicyPK thatCancellationPolicyPK = that.getCancellationPolicyPK();
408                
409                if(thisCancellationPolicyPK == null) {
410                    objectsEqual = objectsEqual && (thatCancellationPolicyPK == null);
411                } else {
412                    objectsEqual = objectsEqual && thisCancellationPolicyPK.equals(thatCancellationPolicyPK);
413                }
414            }
415            
416            if(objectsEqual) {
417                ReturnPolicyPK thisReturnPolicyPK = getReturnPolicyPK();
418                ReturnPolicyPK thatReturnPolicyPK = that.getReturnPolicyPK();
419                
420                if(thisReturnPolicyPK == null) {
421                    objectsEqual = objectsEqual && (thatReturnPolicyPK == null);
422                } else {
423                    objectsEqual = objectsEqual && thisReturnPolicyPK.equals(thatReturnPolicyPK);
424                }
425            }
426            
427            if(objectsEqual) {
428                Boolean thisTaxable = getTaxable();
429                Boolean thatTaxable = that.getTaxable();
430                
431                if(thisTaxable == null) {
432                    objectsEqual = objectsEqual && (thatTaxable == null);
433                } else {
434                    objectsEqual = objectsEqual && thisTaxable.equals(thatTaxable);
435                }
436            }
437            
438            if(objectsEqual) {
439                Long thisFromTime = getFromTime();
440                Long thatFromTime = that.getFromTime();
441                
442                if(thisFromTime == null) {
443                    objectsEqual = objectsEqual && (thatFromTime == null);
444                } else {
445                    objectsEqual = objectsEqual && thisFromTime.equals(thatFromTime);
446                }
447            }
448            
449            if(objectsEqual) {
450                Long thisThruTime = getThruTime();
451                Long thatThruTime = that.getThruTime();
452                
453                if(thisThruTime == null) {
454                    objectsEqual = objectsEqual && (thatThruTime == null);
455                } else {
456                    objectsEqual = objectsEqual && thisThruTime.equals(thatThruTime);
457                }
458            }
459            
460            return objectsEqual;
461        } else {
462            return false;
463        }
464    }
465    
466    @Override
467    public boolean hasBeenModified() {
468        return orderPKHasBeenModified || orderTypePKHasBeenModified || orderNameHasBeenModified || orderPriorityPKHasBeenModified || currencyPKHasBeenModified || holdUntilCompleteHasBeenModified || allowBackordersHasBeenModified || allowSubstitutionsHasBeenModified || allowCombiningShipmentsHasBeenModified || termPKHasBeenModified || freeOnBoardPKHasBeenModified || referenceHasBeenModified || descriptionHasBeenModified || cancellationPolicyPKHasBeenModified || returnPolicyPKHasBeenModified || taxableHasBeenModified || fromTimeHasBeenModified || thruTimeHasBeenModified;
469    }
470    
471    @Override
472    public void clearHasBeenModified() {
473        orderPKHasBeenModified = false;
474        orderTypePKHasBeenModified = false;
475        orderNameHasBeenModified = false;
476        orderPriorityPKHasBeenModified = false;
477        currencyPKHasBeenModified = false;
478        holdUntilCompleteHasBeenModified = false;
479        allowBackordersHasBeenModified = false;
480        allowSubstitutionsHasBeenModified = false;
481        allowCombiningShipmentsHasBeenModified = false;
482        termPKHasBeenModified = false;
483        freeOnBoardPKHasBeenModified = false;
484        referenceHasBeenModified = false;
485        descriptionHasBeenModified = false;
486        cancellationPolicyPKHasBeenModified = false;
487        returnPolicyPKHasBeenModified = false;
488        taxableHasBeenModified = false;
489        fromTimeHasBeenModified = false;
490        thruTimeHasBeenModified = false;
491    }
492    
493    public OrderPK getOrderPK() {
494        return orderPK;
495    }
496    
497    public void setOrderPK(OrderPK orderPK)
498            throws PersistenceNotNullException {
499        checkForNull(orderPK);
500        
501        boolean update = true;
502        
503        if(this.orderPK != null) {
504            if(this.orderPK.equals(orderPK)) {
505                update = false;
506            }
507        } else if(orderPK == null) {
508            update = false;
509        }
510        
511        if(update) {
512            this.orderPK = orderPK;
513            orderPKHasBeenModified = true;
514            clearHashAndString();
515        }
516    }
517    
518    public boolean getOrderPKHasBeenModified() {
519        return orderPKHasBeenModified;
520    }
521    
522    public OrderTypePK getOrderTypePK() {
523        return orderTypePK;
524    }
525    
526    public void setOrderTypePK(OrderTypePK orderTypePK)
527            throws PersistenceNotNullException {
528        checkForNull(orderTypePK);
529        
530        boolean update = true;
531        
532        if(this.orderTypePK != null) {
533            if(this.orderTypePK.equals(orderTypePK)) {
534                update = false;
535            }
536        } else if(orderTypePK == null) {
537            update = false;
538        }
539        
540        if(update) {
541            this.orderTypePK = orderTypePK;
542            orderTypePKHasBeenModified = true;
543            clearHashAndString();
544        }
545    }
546    
547    public boolean getOrderTypePKHasBeenModified() {
548        return orderTypePKHasBeenModified;
549    }
550    
551    public String getOrderName() {
552        return orderName;
553    }
554    
555    public void setOrderName(String orderName)
556            throws PersistenceNotNullException {
557        checkForNull(orderName);
558        
559        boolean update = true;
560        
561        if(this.orderName != null) {
562            if(this.orderName.equals(orderName)) {
563                update = false;
564            }
565        } else if(orderName == null) {
566            update = false;
567        }
568        
569        if(update) {
570            this.orderName = orderName;
571            orderNameHasBeenModified = true;
572            clearHashAndString();
573        }
574    }
575    
576    public boolean getOrderNameHasBeenModified() {
577        return orderNameHasBeenModified;
578    }
579    
580    public OrderPriorityPK getOrderPriorityPK() {
581        return orderPriorityPK;
582    }
583    
584    public void setOrderPriorityPK(OrderPriorityPK orderPriorityPK) {
585        boolean update = true;
586        
587        if(this.orderPriorityPK != null) {
588            if(this.orderPriorityPK.equals(orderPriorityPK)) {
589                update = false;
590            }
591        } else if(orderPriorityPK == null) {
592            update = false;
593        }
594        
595        if(update) {
596            this.orderPriorityPK = orderPriorityPK;
597            orderPriorityPKHasBeenModified = true;
598            clearHashAndString();
599        }
600    }
601    
602    public boolean getOrderPriorityPKHasBeenModified() {
603        return orderPriorityPKHasBeenModified;
604    }
605    
606    public CurrencyPK getCurrencyPK() {
607        return currencyPK;
608    }
609    
610    public void setCurrencyPK(CurrencyPK currencyPK)
611            throws PersistenceNotNullException {
612        checkForNull(currencyPK);
613        
614        boolean update = true;
615        
616        if(this.currencyPK != null) {
617            if(this.currencyPK.equals(currencyPK)) {
618                update = false;
619            }
620        } else if(currencyPK == null) {
621            update = false;
622        }
623        
624        if(update) {
625            this.currencyPK = currencyPK;
626            currencyPKHasBeenModified = true;
627            clearHashAndString();
628        }
629    }
630    
631    public boolean getCurrencyPKHasBeenModified() {
632        return currencyPKHasBeenModified;
633    }
634    
635    public Boolean getHoldUntilComplete() {
636        return holdUntilComplete;
637    }
638    
639    public void setHoldUntilComplete(Boolean holdUntilComplete) {
640        boolean update = true;
641        
642        if(this.holdUntilComplete != null) {
643            if(this.holdUntilComplete.equals(holdUntilComplete)) {
644                update = false;
645            }
646        } else if(holdUntilComplete == null) {
647            update = false;
648        }
649        
650        if(update) {
651            this.holdUntilComplete = holdUntilComplete;
652            holdUntilCompleteHasBeenModified = true;
653            clearHashAndString();
654        }
655    }
656    
657    public boolean getHoldUntilCompleteHasBeenModified() {
658        return holdUntilCompleteHasBeenModified;
659    }
660    
661    public Boolean getAllowBackorders() {
662        return allowBackorders;
663    }
664    
665    public void setAllowBackorders(Boolean allowBackorders) {
666        boolean update = true;
667        
668        if(this.allowBackorders != null) {
669            if(this.allowBackorders.equals(allowBackorders)) {
670                update = false;
671            }
672        } else if(allowBackorders == null) {
673            update = false;
674        }
675        
676        if(update) {
677            this.allowBackorders = allowBackorders;
678            allowBackordersHasBeenModified = true;
679            clearHashAndString();
680        }
681    }
682    
683    public boolean getAllowBackordersHasBeenModified() {
684        return allowBackordersHasBeenModified;
685    }
686    
687    public Boolean getAllowSubstitutions() {
688        return allowSubstitutions;
689    }
690    
691    public void setAllowSubstitutions(Boolean allowSubstitutions) {
692        boolean update = true;
693        
694        if(this.allowSubstitutions != null) {
695            if(this.allowSubstitutions.equals(allowSubstitutions)) {
696                update = false;
697            }
698        } else if(allowSubstitutions == null) {
699            update = false;
700        }
701        
702        if(update) {
703            this.allowSubstitutions = allowSubstitutions;
704            allowSubstitutionsHasBeenModified = true;
705            clearHashAndString();
706        }
707    }
708    
709    public boolean getAllowSubstitutionsHasBeenModified() {
710        return allowSubstitutionsHasBeenModified;
711    }
712    
713    public Boolean getAllowCombiningShipments() {
714        return allowCombiningShipments;
715    }
716    
717    public void setAllowCombiningShipments(Boolean allowCombiningShipments) {
718        boolean update = true;
719        
720        if(this.allowCombiningShipments != null) {
721            if(this.allowCombiningShipments.equals(allowCombiningShipments)) {
722                update = false;
723            }
724        } else if(allowCombiningShipments == null) {
725            update = false;
726        }
727        
728        if(update) {
729            this.allowCombiningShipments = allowCombiningShipments;
730            allowCombiningShipmentsHasBeenModified = true;
731            clearHashAndString();
732        }
733    }
734    
735    public boolean getAllowCombiningShipmentsHasBeenModified() {
736        return allowCombiningShipmentsHasBeenModified;
737    }
738    
739    public TermPK getTermPK() {
740        return termPK;
741    }
742    
743    public void setTermPK(TermPK termPK) {
744        boolean update = true;
745        
746        if(this.termPK != null) {
747            if(this.termPK.equals(termPK)) {
748                update = false;
749            }
750        } else if(termPK == null) {
751            update = false;
752        }
753        
754        if(update) {
755            this.termPK = termPK;
756            termPKHasBeenModified = true;
757            clearHashAndString();
758        }
759    }
760    
761    public boolean getTermPKHasBeenModified() {
762        return termPKHasBeenModified;
763    }
764    
765    public FreeOnBoardPK getFreeOnBoardPK() {
766        return freeOnBoardPK;
767    }
768    
769    public void setFreeOnBoardPK(FreeOnBoardPK freeOnBoardPK) {
770        boolean update = true;
771        
772        if(this.freeOnBoardPK != null) {
773            if(this.freeOnBoardPK.equals(freeOnBoardPK)) {
774                update = false;
775            }
776        } else if(freeOnBoardPK == null) {
777            update = false;
778        }
779        
780        if(update) {
781            this.freeOnBoardPK = freeOnBoardPK;
782            freeOnBoardPKHasBeenModified = true;
783            clearHashAndString();
784        }
785    }
786    
787    public boolean getFreeOnBoardPKHasBeenModified() {
788        return freeOnBoardPKHasBeenModified;
789    }
790    
791    public String getReference() {
792        return reference;
793    }
794    
795    public void setReference(String reference) {
796        boolean update = true;
797        
798        if(this.reference != null) {
799            if(this.reference.equals(reference)) {
800                update = false;
801            }
802        } else if(reference == null) {
803            update = false;
804        }
805        
806        if(update) {
807            this.reference = reference;
808            referenceHasBeenModified = true;
809            clearHashAndString();
810        }
811    }
812    
813    public boolean getReferenceHasBeenModified() {
814        return referenceHasBeenModified;
815    }
816    
817    public String getDescription() {
818        return description;
819    }
820    
821    public void setDescription(String description) {
822        boolean update = true;
823        
824        if(this.description != null) {
825            if(this.description.equals(description)) {
826                update = false;
827            }
828        } else if(description == null) {
829            update = false;
830        }
831        
832        if(update) {
833            this.description = description;
834            descriptionHasBeenModified = true;
835            clearHashAndString();
836        }
837    }
838    
839    public boolean getDescriptionHasBeenModified() {
840        return descriptionHasBeenModified;
841    }
842    
843    public CancellationPolicyPK getCancellationPolicyPK() {
844        return cancellationPolicyPK;
845    }
846    
847    public void setCancellationPolicyPK(CancellationPolicyPK cancellationPolicyPK) {
848        boolean update = true;
849        
850        if(this.cancellationPolicyPK != null) {
851            if(this.cancellationPolicyPK.equals(cancellationPolicyPK)) {
852                update = false;
853            }
854        } else if(cancellationPolicyPK == null) {
855            update = false;
856        }
857        
858        if(update) {
859            this.cancellationPolicyPK = cancellationPolicyPK;
860            cancellationPolicyPKHasBeenModified = true;
861            clearHashAndString();
862        }
863    }
864    
865    public boolean getCancellationPolicyPKHasBeenModified() {
866        return cancellationPolicyPKHasBeenModified;
867    }
868    
869    public ReturnPolicyPK getReturnPolicyPK() {
870        return returnPolicyPK;
871    }
872    
873    public void setReturnPolicyPK(ReturnPolicyPK returnPolicyPK) {
874        boolean update = true;
875        
876        if(this.returnPolicyPK != null) {
877            if(this.returnPolicyPK.equals(returnPolicyPK)) {
878                update = false;
879            }
880        } else if(returnPolicyPK == null) {
881            update = false;
882        }
883        
884        if(update) {
885            this.returnPolicyPK = returnPolicyPK;
886            returnPolicyPKHasBeenModified = true;
887            clearHashAndString();
888        }
889    }
890    
891    public boolean getReturnPolicyPKHasBeenModified() {
892        return returnPolicyPKHasBeenModified;
893    }
894    
895    public Boolean getTaxable() {
896        return taxable;
897    }
898    
899    public void setTaxable(Boolean taxable) {
900        boolean update = true;
901        
902        if(this.taxable != null) {
903            if(this.taxable.equals(taxable)) {
904                update = false;
905            }
906        } else if(taxable == null) {
907            update = false;
908        }
909        
910        if(update) {
911            this.taxable = taxable;
912            taxableHasBeenModified = true;
913            clearHashAndString();
914        }
915    }
916    
917    public boolean getTaxableHasBeenModified() {
918        return taxableHasBeenModified;
919    }
920    
921    public Long getFromTime() {
922        return fromTime;
923    }
924    
925    public void setFromTime(Long fromTime)
926            throws PersistenceNotNullException {
927        checkForNull(fromTime);
928        
929        boolean update = true;
930        
931        if(this.fromTime != null) {
932            if(this.fromTime.equals(fromTime)) {
933                update = false;
934            }
935        } else if(fromTime == null) {
936            update = false;
937        }
938        
939        if(update) {
940            this.fromTime = fromTime;
941            fromTimeHasBeenModified = true;
942            clearHashAndString();
943        }
944    }
945    
946    public boolean getFromTimeHasBeenModified() {
947        return fromTimeHasBeenModified;
948    }
949    
950    public Long getThruTime() {
951        return thruTime;
952    }
953    
954    public void setThruTime(Long thruTime)
955            throws PersistenceNotNullException {
956        checkForNull(thruTime);
957        
958        boolean update = true;
959        
960        if(this.thruTime != null) {
961            if(this.thruTime.equals(thruTime)) {
962                update = false;
963            }
964        } else if(thruTime == null) {
965            update = false;
966        }
967        
968        if(update) {
969            this.thruTime = thruTime;
970            thruTimeHasBeenModified = true;
971            clearHashAndString();
972        }
973    }
974    
975    public boolean getThruTimeHasBeenModified() {
976        return thruTimeHasBeenModified;
977    }
978    
979}