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