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