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