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