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