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