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