1   /**
2    * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portlet.shopping.model.impl;
24  
25  import com.liferay.portal.kernel.bean.ReadOnlyBeanHandler;
26  import com.liferay.portal.kernel.util.DateUtil;
27  import com.liferay.portal.kernel.util.GetterUtil;
28  import com.liferay.portal.kernel.util.HtmlUtil;
29  import com.liferay.portal.model.impl.BaseModelImpl;
30  import com.liferay.portal.util.PropsUtil;
31  
32  import com.liferay.portlet.shopping.model.ShoppingOrder;
33  import com.liferay.portlet.shopping.model.ShoppingOrderSoap;
34  
35  import java.io.Serializable;
36  
37  import java.lang.reflect.Proxy;
38  
39  import java.sql.Types;
40  
41  import java.util.ArrayList;
42  import java.util.Date;
43  import java.util.List;
44  
45  /**
46   * <a href="ShoppingOrderModelImpl.java.html"><b><i>View Source</i></b></a>
47   *
48   * <p>
49   * ServiceBuilder generated this class. Modifications in this class will be
50   * overwritten the next time is generated.
51   * </p>
52   *
53   * <p>
54   * This class is a model that represents the <code>ShoppingOrder</code> table
55   * in the database.
56   * </p>
57   *
58   * @author Brian Wing Shun Chan
59   *
60   * @see com.liferay.portlet.shopping.service.model.ShoppingOrder
61   * @see com.liferay.portlet.shopping.service.model.ShoppingOrderModel
62   * @see com.liferay.portlet.shopping.service.model.impl.ShoppingOrderImpl
63   *
64   */
65  public class ShoppingOrderModelImpl extends BaseModelImpl {
66      public static final String TABLE_NAME = "ShoppingOrder";
67      public static final Object[][] TABLE_COLUMNS = {
68              { "orderId", new Integer(Types.BIGINT) },
69              
70  
71              { "groupId", new Integer(Types.BIGINT) },
72              
73  
74              { "companyId", new Integer(Types.BIGINT) },
75              
76  
77              { "userId", new Integer(Types.BIGINT) },
78              
79  
80              { "userName", new Integer(Types.VARCHAR) },
81              
82  
83              { "createDate", new Integer(Types.TIMESTAMP) },
84              
85  
86              { "modifiedDate", new Integer(Types.TIMESTAMP) },
87              
88  
89              { "number_", new Integer(Types.VARCHAR) },
90              
91  
92              { "tax", new Integer(Types.DOUBLE) },
93              
94  
95              { "shipping", new Integer(Types.DOUBLE) },
96              
97  
98              { "altShipping", new Integer(Types.VARCHAR) },
99              
100 
101             { "requiresShipping", new Integer(Types.BOOLEAN) },
102             
103 
104             { "insure", new Integer(Types.BOOLEAN) },
105             
106 
107             { "insurance", new Integer(Types.DOUBLE) },
108             
109 
110             { "couponCodes", new Integer(Types.VARCHAR) },
111             
112 
113             { "couponDiscount", new Integer(Types.DOUBLE) },
114             
115 
116             { "billingFirstName", new Integer(Types.VARCHAR) },
117             
118 
119             { "billingLastName", new Integer(Types.VARCHAR) },
120             
121 
122             { "billingEmailAddress", new Integer(Types.VARCHAR) },
123             
124 
125             { "billingCompany", new Integer(Types.VARCHAR) },
126             
127 
128             { "billingStreet", new Integer(Types.VARCHAR) },
129             
130 
131             { "billingCity", new Integer(Types.VARCHAR) },
132             
133 
134             { "billingState", new Integer(Types.VARCHAR) },
135             
136 
137             { "billingZip", new Integer(Types.VARCHAR) },
138             
139 
140             { "billingCountry", new Integer(Types.VARCHAR) },
141             
142 
143             { "billingPhone", new Integer(Types.VARCHAR) },
144             
145 
146             { "shipToBilling", new Integer(Types.BOOLEAN) },
147             
148 
149             { "shippingFirstName", new Integer(Types.VARCHAR) },
150             
151 
152             { "shippingLastName", new Integer(Types.VARCHAR) },
153             
154 
155             { "shippingEmailAddress", new Integer(Types.VARCHAR) },
156             
157 
158             { "shippingCompany", new Integer(Types.VARCHAR) },
159             
160 
161             { "shippingStreet", new Integer(Types.VARCHAR) },
162             
163 
164             { "shippingCity", new Integer(Types.VARCHAR) },
165             
166 
167             { "shippingState", new Integer(Types.VARCHAR) },
168             
169 
170             { "shippingZip", new Integer(Types.VARCHAR) },
171             
172 
173             { "shippingCountry", new Integer(Types.VARCHAR) },
174             
175 
176             { "shippingPhone", new Integer(Types.VARCHAR) },
177             
178 
179             { "ccName", new Integer(Types.VARCHAR) },
180             
181 
182             { "ccType", new Integer(Types.VARCHAR) },
183             
184 
185             { "ccNumber", new Integer(Types.VARCHAR) },
186             
187 
188             { "ccExpMonth", new Integer(Types.INTEGER) },
189             
190 
191             { "ccExpYear", new Integer(Types.INTEGER) },
192             
193 
194             { "ccVerNumber", new Integer(Types.VARCHAR) },
195             
196 
197             { "comments", new Integer(Types.VARCHAR) },
198             
199 
200             { "ppTxnId", new Integer(Types.VARCHAR) },
201             
202 
203             { "ppPaymentStatus", new Integer(Types.VARCHAR) },
204             
205 
206             { "ppPaymentGross", new Integer(Types.DOUBLE) },
207             
208 
209             { "ppReceiverEmail", new Integer(Types.VARCHAR) },
210             
211 
212             { "ppPayerEmail", new Integer(Types.VARCHAR) },
213             
214 
215             { "sendOrderEmail", new Integer(Types.BOOLEAN) },
216             
217 
218             { "sendShippingEmail", new Integer(Types.BOOLEAN) }
219         };
220     public static final String TABLE_SQL_CREATE = "create table ShoppingOrder (orderId LONG not null primary key,groupId LONG,companyId LONG,userId LONG,userName VARCHAR(75) null,createDate DATE null,modifiedDate DATE null,number_ VARCHAR(75) null,tax DOUBLE,shipping DOUBLE,altShipping VARCHAR(75) null,requiresShipping BOOLEAN,insure BOOLEAN,insurance DOUBLE,couponCodes VARCHAR(75) null,couponDiscount DOUBLE,billingFirstName VARCHAR(75) null,billingLastName VARCHAR(75) null,billingEmailAddress VARCHAR(75) null,billingCompany VARCHAR(75) null,billingStreet VARCHAR(75) null,billingCity VARCHAR(75) null,billingState VARCHAR(75) null,billingZip VARCHAR(75) null,billingCountry VARCHAR(75) null,billingPhone VARCHAR(75) null,shipToBilling BOOLEAN,shippingFirstName VARCHAR(75) null,shippingLastName VARCHAR(75) null,shippingEmailAddress VARCHAR(75) null,shippingCompany VARCHAR(75) null,shippingStreet VARCHAR(75) null,shippingCity VARCHAR(75) null,shippingState VARCHAR(75) null,shippingZip VARCHAR(75) null,shippingCountry VARCHAR(75) null,shippingPhone VARCHAR(75) null,ccName VARCHAR(75) null,ccType VARCHAR(75) null,ccNumber VARCHAR(75) null,ccExpMonth INTEGER,ccExpYear INTEGER,ccVerNumber VARCHAR(75) null,comments STRING null,ppTxnId VARCHAR(75) null,ppPaymentStatus VARCHAR(75) null,ppPaymentGross DOUBLE,ppReceiverEmail VARCHAR(75) null,ppPayerEmail VARCHAR(75) null,sendOrderEmail BOOLEAN,sendShippingEmail BOOLEAN)";
221     public static final String TABLE_SQL_DROP = "drop table ShoppingOrder";
222     public static final boolean CACHE_ENABLED = GetterUtil.getBoolean(PropsUtil.get(
223                 "value.object.finder.cache.enabled.com.liferay.portlet.shopping.model.ShoppingOrder"),
224             true);
225 
226     public static ShoppingOrder toModel(ShoppingOrderSoap soapModel) {
227         ShoppingOrder model = new ShoppingOrderImpl();
228 
229         model.setOrderId(soapModel.getOrderId());
230         model.setGroupId(soapModel.getGroupId());
231         model.setCompanyId(soapModel.getCompanyId());
232         model.setUserId(soapModel.getUserId());
233         model.setUserName(soapModel.getUserName());
234         model.setCreateDate(soapModel.getCreateDate());
235         model.setModifiedDate(soapModel.getModifiedDate());
236         model.setNumber(soapModel.getNumber());
237         model.setTax(soapModel.getTax());
238         model.setShipping(soapModel.getShipping());
239         model.setAltShipping(soapModel.getAltShipping());
240         model.setRequiresShipping(soapModel.getRequiresShipping());
241         model.setInsure(soapModel.getInsure());
242         model.setInsurance(soapModel.getInsurance());
243         model.setCouponCodes(soapModel.getCouponCodes());
244         model.setCouponDiscount(soapModel.getCouponDiscount());
245         model.setBillingFirstName(soapModel.getBillingFirstName());
246         model.setBillingLastName(soapModel.getBillingLastName());
247         model.setBillingEmailAddress(soapModel.getBillingEmailAddress());
248         model.setBillingCompany(soapModel.getBillingCompany());
249         model.setBillingStreet(soapModel.getBillingStreet());
250         model.setBillingCity(soapModel.getBillingCity());
251         model.setBillingState(soapModel.getBillingState());
252         model.setBillingZip(soapModel.getBillingZip());
253         model.setBillingCountry(soapModel.getBillingCountry());
254         model.setBillingPhone(soapModel.getBillingPhone());
255         model.setShipToBilling(soapModel.getShipToBilling());
256         model.setShippingFirstName(soapModel.getShippingFirstName());
257         model.setShippingLastName(soapModel.getShippingLastName());
258         model.setShippingEmailAddress(soapModel.getShippingEmailAddress());
259         model.setShippingCompany(soapModel.getShippingCompany());
260         model.setShippingStreet(soapModel.getShippingStreet());
261         model.setShippingCity(soapModel.getShippingCity());
262         model.setShippingState(soapModel.getShippingState());
263         model.setShippingZip(soapModel.getShippingZip());
264         model.setShippingCountry(soapModel.getShippingCountry());
265         model.setShippingPhone(soapModel.getShippingPhone());
266         model.setCcName(soapModel.getCcName());
267         model.setCcType(soapModel.getCcType());
268         model.setCcNumber(soapModel.getCcNumber());
269         model.setCcExpMonth(soapModel.getCcExpMonth());
270         model.setCcExpYear(soapModel.getCcExpYear());
271         model.setCcVerNumber(soapModel.getCcVerNumber());
272         model.setComments(soapModel.getComments());
273         model.setPpTxnId(soapModel.getPpTxnId());
274         model.setPpPaymentStatus(soapModel.getPpPaymentStatus());
275         model.setPpPaymentGross(soapModel.getPpPaymentGross());
276         model.setPpReceiverEmail(soapModel.getPpReceiverEmail());
277         model.setPpPayerEmail(soapModel.getPpPayerEmail());
278         model.setSendOrderEmail(soapModel.getSendOrderEmail());
279         model.setSendShippingEmail(soapModel.getSendShippingEmail());
280 
281         return model;
282     }
283 
284     public static List<ShoppingOrder> toModels(ShoppingOrderSoap[] soapModels) {
285         List<ShoppingOrder> models = new ArrayList<ShoppingOrder>(soapModels.length);
286 
287         for (ShoppingOrderSoap soapModel : soapModels) {
288             models.add(toModel(soapModel));
289         }
290 
291         return models;
292     }
293 
294     public static final long LOCK_EXPIRATION_TIME = GetterUtil.getLong(PropsUtil.get(
295                 "lock.expiration.time.com.liferay.portlet.shopping.model.ShoppingOrder"));
296 
297     public ShoppingOrderModelImpl() {
298     }
299 
300     public long getPrimaryKey() {
301         return _orderId;
302     }
303 
304     public void setPrimaryKey(long pk) {
305         setOrderId(pk);
306     }
307 
308     public Serializable getPrimaryKeyObj() {
309         return new Long(_orderId);
310     }
311 
312     public long getOrderId() {
313         return _orderId;
314     }
315 
316     public void setOrderId(long orderId) {
317         if (orderId != _orderId) {
318             _orderId = orderId;
319         }
320     }
321 
322     public long getGroupId() {
323         return _groupId;
324     }
325 
326     public void setGroupId(long groupId) {
327         if (groupId != _groupId) {
328             _groupId = groupId;
329         }
330     }
331 
332     public long getCompanyId() {
333         return _companyId;
334     }
335 
336     public void setCompanyId(long companyId) {
337         if (companyId != _companyId) {
338             _companyId = companyId;
339         }
340     }
341 
342     public long getUserId() {
343         return _userId;
344     }
345 
346     public void setUserId(long userId) {
347         if (userId != _userId) {
348             _userId = userId;
349         }
350     }
351 
352     public String getUserName() {
353         return GetterUtil.getString(_userName);
354     }
355 
356     public void setUserName(String userName) {
357         if (((userName == null) && (_userName != null)) ||
358                 ((userName != null) && (_userName == null)) ||
359                 ((userName != null) && (_userName != null) &&
360                 !userName.equals(_userName))) {
361             _userName = userName;
362         }
363     }
364 
365     public Date getCreateDate() {
366         return _createDate;
367     }
368 
369     public void setCreateDate(Date createDate) {
370         if (((createDate == null) && (_createDate != null)) ||
371                 ((createDate != null) && (_createDate == null)) ||
372                 ((createDate != null) && (_createDate != null) &&
373                 !createDate.equals(_createDate))) {
374             _createDate = createDate;
375         }
376     }
377 
378     public Date getModifiedDate() {
379         return _modifiedDate;
380     }
381 
382     public void setModifiedDate(Date modifiedDate) {
383         if (((modifiedDate == null) && (_modifiedDate != null)) ||
384                 ((modifiedDate != null) && (_modifiedDate == null)) ||
385                 ((modifiedDate != null) && (_modifiedDate != null) &&
386                 !modifiedDate.equals(_modifiedDate))) {
387             _modifiedDate = modifiedDate;
388         }
389     }
390 
391     public String getNumber() {
392         return GetterUtil.getString(_number);
393     }
394 
395     public void setNumber(String number) {
396         if (((number == null) && (_number != null)) ||
397                 ((number != null) && (_number == null)) ||
398                 ((number != null) && (_number != null) &&
399                 !number.equals(_number))) {
400             _number = number;
401         }
402     }
403 
404     public double getTax() {
405         return _tax;
406     }
407 
408     public void setTax(double tax) {
409         if (tax != _tax) {
410             _tax = tax;
411         }
412     }
413 
414     public double getShipping() {
415         return _shipping;
416     }
417 
418     public void setShipping(double shipping) {
419         if (shipping != _shipping) {
420             _shipping = shipping;
421         }
422     }
423 
424     public String getAltShipping() {
425         return GetterUtil.getString(_altShipping);
426     }
427 
428     public void setAltShipping(String altShipping) {
429         if (((altShipping == null) && (_altShipping != null)) ||
430                 ((altShipping != null) && (_altShipping == null)) ||
431                 ((altShipping != null) && (_altShipping != null) &&
432                 !altShipping.equals(_altShipping))) {
433             _altShipping = altShipping;
434         }
435     }
436 
437     public boolean getRequiresShipping() {
438         return _requiresShipping;
439     }
440 
441     public boolean isRequiresShipping() {
442         return _requiresShipping;
443     }
444 
445     public void setRequiresShipping(boolean requiresShipping) {
446         if (requiresShipping != _requiresShipping) {
447             _requiresShipping = requiresShipping;
448         }
449     }
450 
451     public boolean getInsure() {
452         return _insure;
453     }
454 
455     public boolean isInsure() {
456         return _insure;
457     }
458 
459     public void setInsure(boolean insure) {
460         if (insure != _insure) {
461             _insure = insure;
462         }
463     }
464 
465     public double getInsurance() {
466         return _insurance;
467     }
468 
469     public void setInsurance(double insurance) {
470         if (insurance != _insurance) {
471             _insurance = insurance;
472         }
473     }
474 
475     public String getCouponCodes() {
476         return GetterUtil.getString(_couponCodes);
477     }
478 
479     public void setCouponCodes(String couponCodes) {
480         if (((couponCodes == null) && (_couponCodes != null)) ||
481                 ((couponCodes != null) && (_couponCodes == null)) ||
482                 ((couponCodes != null) && (_couponCodes != null) &&
483                 !couponCodes.equals(_couponCodes))) {
484             _couponCodes = couponCodes;
485         }
486     }
487 
488     public double getCouponDiscount() {
489         return _couponDiscount;
490     }
491 
492     public void setCouponDiscount(double couponDiscount) {
493         if (couponDiscount != _couponDiscount) {
494             _couponDiscount = couponDiscount;
495         }
496     }
497 
498     public String getBillingFirstName() {
499         return GetterUtil.getString(_billingFirstName);
500     }
501 
502     public void setBillingFirstName(String billingFirstName) {
503         if (((billingFirstName == null) && (_billingFirstName != null)) ||
504                 ((billingFirstName != null) && (_billingFirstName == null)) ||
505                 ((billingFirstName != null) && (_billingFirstName != null) &&
506                 !billingFirstName.equals(_billingFirstName))) {
507             _billingFirstName = billingFirstName;
508         }
509     }
510 
511     public String getBillingLastName() {
512         return GetterUtil.getString(_billingLastName);
513     }
514 
515     public void setBillingLastName(String billingLastName) {
516         if (((billingLastName == null) && (_billingLastName != null)) ||
517                 ((billingLastName != null) && (_billingLastName == null)) ||
518                 ((billingLastName != null) && (_billingLastName != null) &&
519                 !billingLastName.equals(_billingLastName))) {
520             _billingLastName = billingLastName;
521         }
522     }
523 
524     public String getBillingEmailAddress() {
525         return GetterUtil.getString(_billingEmailAddress);
526     }
527 
528     public void setBillingEmailAddress(String billingEmailAddress) {
529         if (((billingEmailAddress == null) && (_billingEmailAddress != null)) ||
530                 ((billingEmailAddress != null) &&
531                 (_billingEmailAddress == null)) ||
532                 ((billingEmailAddress != null) &&
533                 (_billingEmailAddress != null) &&
534                 !billingEmailAddress.equals(_billingEmailAddress))) {
535             _billingEmailAddress = billingEmailAddress;
536         }
537     }
538 
539     public String getBillingCompany() {
540         return GetterUtil.getString(_billingCompany);
541     }
542 
543     public void setBillingCompany(String billingCompany) {
544         if (((billingCompany == null) && (_billingCompany != null)) ||
545                 ((billingCompany != null) && (_billingCompany == null)) ||
546                 ((billingCompany != null) && (_billingCompany != null) &&
547                 !billingCompany.equals(_billingCompany))) {
548             _billingCompany = billingCompany;
549         }
550     }
551 
552     public String getBillingStreet() {
553         return GetterUtil.getString(_billingStreet);
554     }
555 
556     public void setBillingStreet(String billingStreet) {
557         if (((billingStreet == null) && (_billingStreet != null)) ||
558                 ((billingStreet != null) && (_billingStreet == null)) ||
559                 ((billingStreet != null) && (_billingStreet != null) &&
560                 !billingStreet.equals(_billingStreet))) {
561             _billingStreet = billingStreet;
562         }
563     }
564 
565     public String getBillingCity() {
566         return GetterUtil.getString(_billingCity);
567     }
568 
569     public void setBillingCity(String billingCity) {
570         if (((billingCity == null) && (_billingCity != null)) ||
571                 ((billingCity != null) && (_billingCity == null)) ||
572                 ((billingCity != null) && (_billingCity != null) &&
573                 !billingCity.equals(_billingCity))) {
574             _billingCity = billingCity;
575         }
576     }
577 
578     public String getBillingState() {
579         return GetterUtil.getString(_billingState);
580     }
581 
582     public void setBillingState(String billingState) {
583         if (((billingState == null) && (_billingState != null)) ||
584                 ((billingState != null) && (_billingState == null)) ||
585                 ((billingState != null) && (_billingState != null) &&
586                 !billingState.equals(_billingState))) {
587             _billingState = billingState;
588         }
589     }
590 
591     public String getBillingZip() {
592         return GetterUtil.getString(_billingZip);
593     }
594 
595     public void setBillingZip(String billingZip) {
596         if (((billingZip == null) && (_billingZip != null)) ||
597                 ((billingZip != null) && (_billingZip == null)) ||
598                 ((billingZip != null) && (_billingZip != null) &&
599                 !billingZip.equals(_billingZip))) {
600             _billingZip = billingZip;
601         }
602     }
603 
604     public String getBillingCountry() {
605         return GetterUtil.getString(_billingCountry);
606     }
607 
608     public void setBillingCountry(String billingCountry) {
609         if (((billingCountry == null) && (_billingCountry != null)) ||
610                 ((billingCountry != null) && (_billingCountry == null)) ||
611                 ((billingCountry != null) && (_billingCountry != null) &&
612                 !billingCountry.equals(_billingCountry))) {
613             _billingCountry = billingCountry;
614         }
615     }
616 
617     public String getBillingPhone() {
618         return GetterUtil.getString(_billingPhone);
619     }
620 
621     public void setBillingPhone(String billingPhone) {
622         if (((billingPhone == null) && (_billingPhone != null)) ||
623                 ((billingPhone != null) && (_billingPhone == null)) ||
624                 ((billingPhone != null) && (_billingPhone != null) &&
625                 !billingPhone.equals(_billingPhone))) {
626             _billingPhone = billingPhone;
627         }
628     }
629 
630     public boolean getShipToBilling() {
631         return _shipToBilling;
632     }
633 
634     public boolean isShipToBilling() {
635         return _shipToBilling;
636     }
637 
638     public void setShipToBilling(boolean shipToBilling) {
639         if (shipToBilling != _shipToBilling) {
640             _shipToBilling = shipToBilling;
641         }
642     }
643 
644     public String getShippingFirstName() {
645         return GetterUtil.getString(_shippingFirstName);
646     }
647 
648     public void setShippingFirstName(String shippingFirstName) {
649         if (((shippingFirstName == null) && (_shippingFirstName != null)) ||
650                 ((shippingFirstName != null) && (_shippingFirstName == null)) ||
651                 ((shippingFirstName != null) && (_shippingFirstName != null) &&
652                 !shippingFirstName.equals(_shippingFirstName))) {
653             _shippingFirstName = shippingFirstName;
654         }
655     }
656 
657     public String getShippingLastName() {
658         return GetterUtil.getString(_shippingLastName);
659     }
660 
661     public void setShippingLastName(String shippingLastName) {
662         if (((shippingLastName == null) && (_shippingLastName != null)) ||
663                 ((shippingLastName != null) && (_shippingLastName == null)) ||
664                 ((shippingLastName != null) && (_shippingLastName != null) &&
665                 !shippingLastName.equals(_shippingLastName))) {
666             _shippingLastName = shippingLastName;
667         }
668     }
669 
670     public String getShippingEmailAddress() {
671         return GetterUtil.getString(_shippingEmailAddress);
672     }
673 
674     public void setShippingEmailAddress(String shippingEmailAddress) {
675         if (((shippingEmailAddress == null) && (_shippingEmailAddress != null)) ||
676                 ((shippingEmailAddress != null) &&
677                 (_shippingEmailAddress == null)) ||
678                 ((shippingEmailAddress != null) &&
679                 (_shippingEmailAddress != null) &&
680                 !shippingEmailAddress.equals(_shippingEmailAddress))) {
681             _shippingEmailAddress = shippingEmailAddress;
682         }
683     }
684 
685     public String getShippingCompany() {
686         return GetterUtil.getString(_shippingCompany);
687     }
688 
689     public void setShippingCompany(String shippingCompany) {
690         if (((shippingCompany == null) && (_shippingCompany != null)) ||
691                 ((shippingCompany != null) && (_shippingCompany == null)) ||
692                 ((shippingCompany != null) && (_shippingCompany != null) &&
693                 !shippingCompany.equals(_shippingCompany))) {
694             _shippingCompany = shippingCompany;
695         }
696     }
697 
698     public String getShippingStreet() {
699         return GetterUtil.getString(_shippingStreet);
700     }
701 
702     public void setShippingStreet(String shippingStreet) {
703         if (((shippingStreet == null) && (_shippingStreet != null)) ||
704                 ((shippingStreet != null) && (_shippingStreet == null)) ||
705                 ((shippingStreet != null) && (_shippingStreet != null) &&
706                 !shippingStreet.equals(_shippingStreet))) {
707             _shippingStreet = shippingStreet;
708         }
709     }
710 
711     public String getShippingCity() {
712         return GetterUtil.getString(_shippingCity);
713     }
714 
715     public void setShippingCity(String shippingCity) {
716         if (((shippingCity == null) && (_shippingCity != null)) ||
717                 ((shippingCity != null) && (_shippingCity == null)) ||
718                 ((shippingCity != null) && (_shippingCity != null) &&
719                 !shippingCity.equals(_shippingCity))) {
720             _shippingCity = shippingCity;
721         }
722     }
723 
724     public String getShippingState() {
725         return GetterUtil.getString(_shippingState);
726     }
727 
728     public void setShippingState(String shippingState) {
729         if (((shippingState == null) && (_shippingState != null)) ||
730                 ((shippingState != null) && (_shippingState == null)) ||
731                 ((shippingState != null) && (_shippingState != null) &&
732                 !shippingState.equals(_shippingState))) {
733             _shippingState = shippingState;
734         }
735     }
736 
737     public String getShippingZip() {
738         return GetterUtil.getString(_shippingZip);
739     }
740 
741     public void setShippingZip(String shippingZip) {
742         if (((shippingZip == null) && (_shippingZip != null)) ||
743                 ((shippingZip != null) && (_shippingZip == null)) ||
744                 ((shippingZip != null) && (_shippingZip != null) &&
745                 !shippingZip.equals(_shippingZip))) {
746             _shippingZip = shippingZip;
747         }
748     }
749 
750     public String getShippingCountry() {
751         return GetterUtil.getString(_shippingCountry);
752     }
753 
754     public void setShippingCountry(String shippingCountry) {
755         if (((shippingCountry == null) && (_shippingCountry != null)) ||
756                 ((shippingCountry != null) && (_shippingCountry == null)) ||
757                 ((shippingCountry != null) && (_shippingCountry != null) &&
758                 !shippingCountry.equals(_shippingCountry))) {
759             _shippingCountry = shippingCountry;
760         }
761     }
762 
763     public String getShippingPhone() {
764         return GetterUtil.getString(_shippingPhone);
765     }
766 
767     public void setShippingPhone(String shippingPhone) {
768         if (((shippingPhone == null) && (_shippingPhone != null)) ||
769                 ((shippingPhone != null) && (_shippingPhone == null)) ||
770                 ((shippingPhone != null) && (_shippingPhone != null) &&
771                 !shippingPhone.equals(_shippingPhone))) {
772             _shippingPhone = shippingPhone;
773         }
774     }
775 
776     public String getCcName() {
777         return GetterUtil.getString(_ccName);
778     }
779 
780     public void setCcName(String ccName) {
781         if (((ccName == null) && (_ccName != null)) ||
782                 ((ccName != null) && (_ccName == null)) ||
783                 ((ccName != null) && (_ccName != null) &&
784                 !ccName.equals(_ccName))) {
785             _ccName = ccName;
786         }
787     }
788 
789     public String getCcType() {
790         return GetterUtil.getString(_ccType);
791     }
792 
793     public void setCcType(String ccType) {
794         if (((ccType == null) && (_ccType != null)) ||
795                 ((ccType != null) && (_ccType == null)) ||
796                 ((ccType != null) && (_ccType != null) &&
797                 !ccType.equals(_ccType))) {
798             _ccType = ccType;
799         }
800     }
801 
802     public String getCcNumber() {
803         return GetterUtil.getString(_ccNumber);
804     }
805 
806     public void setCcNumber(String ccNumber) {
807         if (((ccNumber == null) && (_ccNumber != null)) ||
808                 ((ccNumber != null) && (_ccNumber == null)) ||
809                 ((ccNumber != null) && (_ccNumber != null) &&
810                 !ccNumber.equals(_ccNumber))) {
811             _ccNumber = ccNumber;
812         }
813     }
814 
815     public int getCcExpMonth() {
816         return _ccExpMonth;
817     }
818 
819     public void setCcExpMonth(int ccExpMonth) {
820         if (ccExpMonth != _ccExpMonth) {
821             _ccExpMonth = ccExpMonth;
822         }
823     }
824 
825     public int getCcExpYear() {
826         return _ccExpYear;
827     }
828 
829     public void setCcExpYear(int ccExpYear) {
830         if (ccExpYear != _ccExpYear) {
831             _ccExpYear = ccExpYear;
832         }
833     }
834 
835     public String getCcVerNumber() {
836         return GetterUtil.getString(_ccVerNumber);
837     }
838 
839     public void setCcVerNumber(String ccVerNumber) {
840         if (((ccVerNumber == null) && (_ccVerNumber != null)) ||
841                 ((ccVerNumber != null) && (_ccVerNumber == null)) ||
842                 ((ccVerNumber != null) && (_ccVerNumber != null) &&
843                 !ccVerNumber.equals(_ccVerNumber))) {
844             _ccVerNumber = ccVerNumber;
845         }
846     }
847 
848     public String getComments() {
849         return GetterUtil.getString(_comments);
850     }
851 
852     public void setComments(String comments) {
853         if (((comments == null) && (_comments != null)) ||
854                 ((comments != null) && (_comments == null)) ||
855                 ((comments != null) && (_comments != null) &&
856                 !comments.equals(_comments))) {
857             _comments = comments;
858         }
859     }
860 
861     public String getPpTxnId() {
862         return GetterUtil.getString(_ppTxnId);
863     }
864 
865     public void setPpTxnId(String ppTxnId) {
866         if (((ppTxnId == null) && (_ppTxnId != null)) ||
867                 ((ppTxnId != null) && (_ppTxnId == null)) ||
868                 ((ppTxnId != null) && (_ppTxnId != null) &&
869                 !ppTxnId.equals(_ppTxnId))) {
870             _ppTxnId = ppTxnId;
871         }
872     }
873 
874     public String getPpPaymentStatus() {
875         return GetterUtil.getString(_ppPaymentStatus);
876     }
877 
878     public void setPpPaymentStatus(String ppPaymentStatus) {
879         if (((ppPaymentStatus == null) && (_ppPaymentStatus != null)) ||
880                 ((ppPaymentStatus != null) && (_ppPaymentStatus == null)) ||
881                 ((ppPaymentStatus != null) && (_ppPaymentStatus != null) &&
882                 !ppPaymentStatus.equals(_ppPaymentStatus))) {
883             _ppPaymentStatus = ppPaymentStatus;
884         }
885     }
886 
887     public double getPpPaymentGross() {
888         return _ppPaymentGross;
889     }
890 
891     public void setPpPaymentGross(double ppPaymentGross) {
892         if (ppPaymentGross != _ppPaymentGross) {
893             _ppPaymentGross = ppPaymentGross;
894         }
895     }
896 
897     public String getPpReceiverEmail() {
898         return GetterUtil.getString(_ppReceiverEmail);
899     }
900 
901     public void setPpReceiverEmail(String ppReceiverEmail) {
902         if (((ppReceiverEmail == null) && (_ppReceiverEmail != null)) ||
903                 ((ppReceiverEmail != null) && (_ppReceiverEmail == null)) ||
904                 ((ppReceiverEmail != null) && (_ppReceiverEmail != null) &&
905                 !ppReceiverEmail.equals(_ppReceiverEmail))) {
906             _ppReceiverEmail = ppReceiverEmail;
907         }
908     }
909 
910     public String getPpPayerEmail() {
911         return GetterUtil.getString(_ppPayerEmail);
912     }
913 
914     public void setPpPayerEmail(String ppPayerEmail) {
915         if (((ppPayerEmail == null) && (_ppPayerEmail != null)) ||
916                 ((ppPayerEmail != null) && (_ppPayerEmail == null)) ||
917                 ((ppPayerEmail != null) && (_ppPayerEmail != null) &&
918                 !ppPayerEmail.equals(_ppPayerEmail))) {
919             _ppPayerEmail = ppPayerEmail;
920         }
921     }
922 
923     public boolean getSendOrderEmail() {
924         return _sendOrderEmail;
925     }
926 
927     public boolean isSendOrderEmail() {
928         return _sendOrderEmail;
929     }
930 
931     public void setSendOrderEmail(boolean sendOrderEmail) {
932         if (sendOrderEmail != _sendOrderEmail) {
933             _sendOrderEmail = sendOrderEmail;
934         }
935     }
936 
937     public boolean getSendShippingEmail() {
938         return _sendShippingEmail;
939     }
940 
941     public boolean isSendShippingEmail() {
942         return _sendShippingEmail;
943     }
944 
945     public void setSendShippingEmail(boolean sendShippingEmail) {
946         if (sendShippingEmail != _sendShippingEmail) {
947             _sendShippingEmail = sendShippingEmail;
948         }
949     }
950 
951     public ShoppingOrder toEscapedModel() {
952         if (isEscapedModel()) {
953             return (ShoppingOrder)this;
954         }
955         else {
956             ShoppingOrder model = new ShoppingOrderImpl();
957 
958             model.setEscapedModel(true);
959 
960             model.setOrderId(getOrderId());
961             model.setGroupId(getGroupId());
962             model.setCompanyId(getCompanyId());
963             model.setUserId(getUserId());
964             model.setUserName(HtmlUtil.escape(getUserName()));
965             model.setCreateDate(getCreateDate());
966             model.setModifiedDate(getModifiedDate());
967             model.setNumber(HtmlUtil.escape(getNumber()));
968             model.setTax(getTax());
969             model.setShipping(getShipping());
970             model.setAltShipping(HtmlUtil.escape(getAltShipping()));
971             model.setRequiresShipping(getRequiresShipping());
972             model.setInsure(getInsure());
973             model.setInsurance(getInsurance());
974             model.setCouponCodes(HtmlUtil.escape(getCouponCodes()));
975             model.setCouponDiscount(getCouponDiscount());
976             model.setBillingFirstName(HtmlUtil.escape(getBillingFirstName()));
977             model.setBillingLastName(HtmlUtil.escape(getBillingLastName()));
978             model.setBillingEmailAddress(HtmlUtil.escape(
979                     getBillingEmailAddress()));
980             model.setBillingCompany(HtmlUtil.escape(getBillingCompany()));
981             model.setBillingStreet(HtmlUtil.escape(getBillingStreet()));
982             model.setBillingCity(HtmlUtil.escape(getBillingCity()));
983             model.setBillingState(HtmlUtil.escape(getBillingState()));
984             model.setBillingZip(HtmlUtil.escape(getBillingZip()));
985             model.setBillingCountry(HtmlUtil.escape(getBillingCountry()));
986             model.setBillingPhone(HtmlUtil.escape(getBillingPhone()));
987             model.setShipToBilling(getShipToBilling());
988             model.setShippingFirstName(HtmlUtil.escape(getShippingFirstName()));
989             model.setShippingLastName(HtmlUtil.escape(getShippingLastName()));
990             model.setShippingEmailAddress(HtmlUtil.escape(
991                     getShippingEmailAddress()));
992             model.setShippingCompany(HtmlUtil.escape(getShippingCompany()));
993             model.setShippingStreet(HtmlUtil.escape(getShippingStreet()));
994             model.setShippingCity(HtmlUtil.escape(getShippingCity()));
995             model.setShippingState(HtmlUtil.escape(getShippingState()));
996             model.setShippingZip(HtmlUtil.escape(getShippingZip()));
997             model.setShippingCountry(HtmlUtil.escape(getShippingCountry()));
998             model.setShippingPhone(HtmlUtil.escape(getShippingPhone()));
999             model.setCcName(HtmlUtil.escape(getCcName()));
1000            model.setCcType(HtmlUtil.escape(getCcType()));
1001            model.setCcNumber(HtmlUtil.escape(getCcNumber()));
1002            model.setCcExpMonth(getCcExpMonth());
1003            model.setCcExpYear(getCcExpYear());
1004            model.setCcVerNumber(HtmlUtil.escape(getCcVerNumber()));
1005            model.setComments(HtmlUtil.escape(getComments()));
1006            model.setPpTxnId(HtmlUtil.escape(getPpTxnId()));
1007            model.setPpPaymentStatus(HtmlUtil.escape(getPpPaymentStatus()));
1008            model.setPpPaymentGross(getPpPaymentGross());
1009            model.setPpReceiverEmail(HtmlUtil.escape(getPpReceiverEmail()));
1010            model.setPpPayerEmail(HtmlUtil.escape(getPpPayerEmail()));
1011            model.setSendOrderEmail(getSendOrderEmail());
1012            model.setSendShippingEmail(getSendShippingEmail());
1013
1014            model = (ShoppingOrder)Proxy.newProxyInstance(ShoppingOrder.class.getClassLoader(),
1015                    new Class[] { ShoppingOrder.class },
1016                    new ReadOnlyBeanHandler(model));
1017
1018            return model;
1019        }
1020    }
1021
1022    public Object clone() {
1023        ShoppingOrderImpl clone = new ShoppingOrderImpl();
1024
1025        clone.setOrderId(getOrderId());
1026        clone.setGroupId(getGroupId());
1027        clone.setCompanyId(getCompanyId());
1028        clone.setUserId(getUserId());
1029        clone.setUserName(getUserName());
1030        clone.setCreateDate(getCreateDate());
1031        clone.setModifiedDate(getModifiedDate());
1032        clone.setNumber(getNumber());
1033        clone.setTax(getTax());
1034        clone.setShipping(getShipping());
1035        clone.setAltShipping(getAltShipping());
1036        clone.setRequiresShipping(getRequiresShipping());
1037        clone.setInsure(getInsure());
1038        clone.setInsurance(getInsurance());
1039        clone.setCouponCodes(getCouponCodes());
1040        clone.setCouponDiscount(getCouponDiscount());
1041        clone.setBillingFirstName(getBillingFirstName());
1042        clone.setBillingLastName(getBillingLastName());
1043        clone.setBillingEmailAddress(getBillingEmailAddress());
1044        clone.setBillingCompany(getBillingCompany());
1045        clone.setBillingStreet(getBillingStreet());
1046        clone.setBillingCity(getBillingCity());
1047        clone.setBillingState(getBillingState());
1048        clone.setBillingZip(getBillingZip());
1049        clone.setBillingCountry(getBillingCountry());
1050        clone.setBillingPhone(getBillingPhone());
1051        clone.setShipToBilling(getShipToBilling());
1052        clone.setShippingFirstName(getShippingFirstName());
1053        clone.setShippingLastName(getShippingLastName());
1054        clone.setShippingEmailAddress(getShippingEmailAddress());
1055        clone.setShippingCompany(getShippingCompany());
1056        clone.setShippingStreet(getShippingStreet());
1057        clone.setShippingCity(getShippingCity());
1058        clone.setShippingState(getShippingState());
1059        clone.setShippingZip(getShippingZip());
1060        clone.setShippingCountry(getShippingCountry());
1061        clone.setShippingPhone(getShippingPhone());
1062        clone.setCcName(getCcName());
1063        clone.setCcType(getCcType());
1064        clone.setCcNumber(getCcNumber());
1065        clone.setCcExpMonth(getCcExpMonth());
1066        clone.setCcExpYear(getCcExpYear());
1067        clone.setCcVerNumber(getCcVerNumber());
1068        clone.setComments(getComments());
1069        clone.setPpTxnId(getPpTxnId());
1070        clone.setPpPaymentStatus(getPpPaymentStatus());
1071        clone.setPpPaymentGross(getPpPaymentGross());
1072        clone.setPpReceiverEmail(getPpReceiverEmail());
1073        clone.setPpPayerEmail(getPpPayerEmail());
1074        clone.setSendOrderEmail(getSendOrderEmail());
1075        clone.setSendShippingEmail(getSendShippingEmail());
1076
1077        return clone;
1078    }
1079
1080    public int compareTo(Object obj) {
1081        if (obj == null) {
1082            return -1;
1083        }
1084
1085        ShoppingOrderImpl shoppingOrder = (ShoppingOrderImpl)obj;
1086
1087        int value = 0;
1088
1089        value = DateUtil.compareTo(getCreateDate(),
1090                shoppingOrder.getCreateDate());
1091
1092        value = value * -1;
1093
1094        if (value != 0) {
1095            return value;
1096        }
1097
1098        return 0;
1099    }
1100
1101    public boolean equals(Object obj) {
1102        if (obj == null) {
1103            return false;
1104        }
1105
1106        ShoppingOrderImpl shoppingOrder = null;
1107
1108        try {
1109            shoppingOrder = (ShoppingOrderImpl)obj;
1110        }
1111        catch (ClassCastException cce) {
1112            return false;
1113        }
1114
1115        long pk = shoppingOrder.getPrimaryKey();
1116
1117        if (getPrimaryKey() == pk) {
1118            return true;
1119        }
1120        else {
1121            return false;
1122        }
1123    }
1124
1125    public int hashCode() {
1126        return (int)getPrimaryKey();
1127    }
1128
1129    private long _orderId;
1130    private long _groupId;
1131    private long _companyId;
1132    private long _userId;
1133    private String _userName;
1134    private Date _createDate;
1135    private Date _modifiedDate;
1136    private String _number;
1137    private double _tax;
1138    private double _shipping;
1139    private String _altShipping;
1140    private boolean _requiresShipping;
1141    private boolean _insure;
1142    private double _insurance;
1143    private String _couponCodes;
1144    private double _couponDiscount;
1145    private String _billingFirstName;
1146    private String _billingLastName;
1147    private String _billingEmailAddress;
1148    private String _billingCompany;
1149    private String _billingStreet;
1150    private String _billingCity;
1151    private String _billingState;
1152    private String _billingZip;
1153    private String _billingCountry;
1154    private String _billingPhone;
1155    private boolean _shipToBilling;
1156    private String _shippingFirstName;
1157    private String _shippingLastName;
1158    private String _shippingEmailAddress;
1159    private String _shippingCompany;
1160    private String _shippingStreet;
1161    private String _shippingCity;
1162    private String _shippingState;
1163    private String _shippingZip;
1164    private String _shippingCountry;
1165    private String _shippingPhone;
1166    private String _ccName;
1167    private String _ccType;
1168    private String _ccNumber;
1169    private int _ccExpMonth;
1170    private int _ccExpYear;
1171    private String _ccVerNumber;
1172    private String _comments;
1173    private String _ppTxnId;
1174    private String _ppPaymentStatus;
1175    private double _ppPaymentGross;
1176    private String _ppReceiverEmail;
1177    private String _ppPayerEmail;
1178    private boolean _sendOrderEmail;
1179    private boolean _sendShippingEmail;
1180}