1 package org.campware.cream.om; 2 3 4 import java.math.BigDecimal ; 5 import java.sql.Connection ; 6 import java.util.ArrayList ; 7 import java.util.Collections ; 8 import java.util.Date ; 9 import java.util.List ; 10 11 import org.apache.commons.lang.ObjectUtils; 12 import org.apache.turbine.om.Retrievable; 13 import org.apache.torque.TorqueException; 14 import org.apache.torque.om.BaseObject; 15 import org.apache.torque.om.ComboKey; 16 import org.apache.torque.om.DateKey; 17 import org.apache.torque.om.NumberKey; 18 import org.apache.torque.om.ObjectKey; 19 import org.apache.torque.om.SimpleKey; 20 import org.apache.torque.om.StringKey; 21 import org.apache.torque.om.Persistent; 22 import org.apache.torque.util.Criteria; 23 import org.apache.torque.util.Transaction; 24 25 26 27 28 29 30 31 32 40 public abstract class BaseCustomer extends BaseObject 41 implements org.apache.turbine.om.Retrievable 42 { 43 44 private static final CustomerPeer peer = 45 new CustomerPeer(); 46 47 48 49 private int customerId; 50 51 52 private String customerCode = "AUTO"; 53 54 55 private int status = 30; 56 57 58 private int priority = 30; 59 60 61 private int customerType = 10; 62 63 64 private int customerCatId = 1000; 65 66 67 private String customerName1; 68 69 70 private String customerName2; 71 72 73 private String customerDisplay; 74 75 76 private String dear; 77 78 79 private String address1; 80 81 82 private String address2; 83 84 85 private String city; 86 87 88 private String zip; 89 90 91 private String state; 92 93 94 private int countryId = 1000; 95 96 97 private int regionId = 1000; 98 99 100 private String phone1; 101 102 103 private String phone2; 104 105 106 private String fax; 107 108 109 private String email; 110 111 112 private int emailFormat = 10; 113 114 115 private int sendNews = 20; 116 117 118 private String webUrl; 119 120 121 private int languageId = 1000; 122 123 124 private int gender = 10; 125 126 127 private int educationCatId = 1000; 128 129 130 private int householdCatId = 1000; 131 132 133 private String custom1; 134 135 136 private String custom2; 137 138 139 private String custom3; 140 141 142 private String custom4; 143 144 145 private String custom5; 146 147 148 private String custom6; 149 150 151 private String notes; 152 153 154 private Date created; 155 156 157 private Date modified; 158 159 160 private String createdBy; 161 162 163 private String modifiedBy; 164 165 166 171 public int getCustomerId() 172 { 173 return customerId; 174 } 175 176 177 182 public void setCustomerId(int v) throws TorqueException 183 { 184 185 if (this.customerId != v) 186 { 187 this.customerId = v; 188 setModified(true); 189 } 190 191 192 193 if (collSordersRelatedByCustomerId != null) 195 { 196 for (int i = 0; i < collSordersRelatedByCustomerId.size(); i++) 197 { 198 ((Sorder) collSordersRelatedByCustomerId.get(i)) 199 .setCustomerId(v); 200 } 201 } 202 203 if (collSordersRelatedByRecipientId != null) 205 { 206 for (int i = 0; i < collSordersRelatedByRecipientId.size(); i++) 207 { 208 ((Sorder) collSordersRelatedByRecipientId.get(i)) 209 .setRecipientId(v); 210 } 211 } 212 213 if (collPayments != null) 215 { 216 for (int i = 0; i < collPayments.size(); i++) 217 { 218 ((Payment) collPayments.get(i)) 219 .setCustomerId(v); 220 } 221 } 222 223 if (collServicesRelatedByCustomerId != null) 225 { 226 for (int i = 0; i < collServicesRelatedByCustomerId.size(); i++) 227 { 228 ((Service) collServicesRelatedByCustomerId.get(i)) 229 .setCustomerId(v); 230 } 231 } 232 233 if (collServicesRelatedByRecipientId != null) 235 { 236 for (int i = 0; i < collServicesRelatedByRecipientId.size(); i++) 237 { 238 ((Service) collServicesRelatedByRecipientId.get(i)) 239 .setRecipientId(v); 240 } 241 } 242 243 if (collShipmentsRelatedByCustomerId != null) 245 { 246 for (int i = 0; i < collShipmentsRelatedByCustomerId.size(); i++) 247 { 248 ((Shipment) collShipmentsRelatedByCustomerId.get(i)) 249 .setCustomerId(v); 250 } 251 } 252 253 if (collShipmentsRelatedByRecipientId != null) 255 { 256 for (int i = 0; i < collShipmentsRelatedByRecipientId.size(); i++) 257 { 258 ((Shipment) collShipmentsRelatedByRecipientId.get(i)) 259 .setRecipientId(v); 260 } 261 } 262 263 if (collPrintSubscriptionsRelatedByCustomerId != null) 265 { 266 for (int i = 0; i < collPrintSubscriptionsRelatedByCustomerId.size(); i++) 267 { 268 ((PrintSubscription) collPrintSubscriptionsRelatedByCustomerId.get(i)) 269 .setCustomerId(v); 270 } 271 } 272 273 if (collPrintSubscriptionsRelatedByRecipientId != null) 275 { 276 for (int i = 0; i < collPrintSubscriptionsRelatedByRecipientId.size(); i++) 277 { 278 ((PrintSubscription) collPrintSubscriptionsRelatedByRecipientId.get(i)) 279 .setRecipientId(v); 280 } 281 } 282 283 if (collOnlineSubscriptionsRelatedByCustomerId != null) 285 { 286 for (int i = 0; i < collOnlineSubscriptionsRelatedByCustomerId.size(); i++) 287 { 288 ((OnlineSubscription) collOnlineSubscriptionsRelatedByCustomerId.get(i)) 289 .setCustomerId(v); 290 } 291 } 292 293 if (collOnlineSubscriptionsRelatedByRecipientId != null) 295 { 296 for (int i = 0; i < collOnlineSubscriptionsRelatedByRecipientId.size(); i++) 297 { 298 ((OnlineSubscription) collOnlineSubscriptionsRelatedByRecipientId.get(i)) 299 .setRecipientId(v); 300 } 301 } 302 303 if (collInboxEvents != null) 305 { 306 for (int i = 0; i < collInboxEvents.size(); i++) 307 { 308 ((InboxEvent) collInboxEvents.get(i)) 309 .setCustomerId(v); 310 } 311 } 312 313 if (collOutboxEvents != null) 315 { 316 for (int i = 0; i < collOutboxEvents.size(); i++) 317 { 318 ((OutboxEvent) collOutboxEvents.get(i)) 319 .setCustomerId(v); 320 } 321 } 322 323 if (collSorderItemsRelatedByCustomerId != null) 325 { 326 for (int i = 0; i < collSorderItemsRelatedByCustomerId.size(); i++) 327 { 328 ((SorderItem) collSorderItemsRelatedByCustomerId.get(i)) 329 .setCustomerId(v); 330 } 331 } 332 333 if (collSorderItemsRelatedByRecipientId != null) 335 { 336 for (int i = 0; i < collSorderItemsRelatedByRecipientId.size(); i++) 337 { 338 ((SorderItem) collSorderItemsRelatedByRecipientId.get(i)) 339 .setRecipientId(v); 340 } 341 } 342 343 if (collPaymentItems != null) 345 { 346 for (int i = 0; i < collPaymentItems.size(); i++) 347 { 348 ((PaymentItem) collPaymentItems.get(i)) 349 .setCustomerId(v); 350 } 351 } 352 353 if (collShipmentItemsRelatedByCustomerId != null) 355 { 356 for (int i = 0; i < collShipmentItemsRelatedByCustomerId.size(); i++) 357 { 358 ((ShipmentItem) collShipmentItemsRelatedByCustomerId.get(i)) 359 .setCustomerId(v); 360 } 361 } 362 363 if (collShipmentItemsRelatedByRecipientId != null) 365 { 366 for (int i = 0; i < collShipmentItemsRelatedByRecipientId.size(); i++) 367 { 368 ((ShipmentItem) collShipmentItemsRelatedByRecipientId.get(i)) 369 .setRecipientId(v); 370 } 371 } 372 373 if (collServiceItemsRelatedByCustomerId != null) 375 { 376 for (int i = 0; i < collServiceItemsRelatedByCustomerId.size(); i++) 377 { 378 ((ServiceItem) collServiceItemsRelatedByCustomerId.get(i)) 379 .setCustomerId(v); 380 } 381 } 382 383 if (collServiceItemsRelatedByRecipientId != null) 385 { 386 for (int i = 0; i < collServiceItemsRelatedByRecipientId.size(); i++) 387 { 388 ((ServiceItem) collServiceItemsRelatedByRecipientId.get(i)) 389 .setRecipientId(v); 390 } 391 } 392 } 393 394 399 public String getCustomerCode() 400 { 401 return customerCode; 402 } 403 404 405 410 public void setCustomerCode(String v) 411 { 412 413 if (!ObjectUtils.equals(this.customerCode, v)) 414 { 415 this.customerCode = v; 416 setModified(true); 417 } 418 419 420 } 421 422 427 public int getStatus() 428 { 429 return status; 430 } 431 432 433 438 public void setStatus(int v) 439 { 440 441 if (this.status != v) 442 { 443 this.status = v; 444 setModified(true); 445 } 446 447 448 } 449 450 455 public int getPriority() 456 { 457 return priority; 458 } 459 460 461 466 public void setPriority(int v) 467 { 468 469 if (this.priority != v) 470 { 471 this.priority = v; 472 setModified(true); 473 } 474 475 476 } 477 478 483 public int getCustomerType() 484 { 485 return customerType; 486 } 487 488 489 494 public void setCustomerType(int v) 495 { 496 497 if (this.customerType != v) 498 { 499 this.customerType = v; 500 setModified(true); 501 } 502 503 504 } 505 506 511 public int getCustomerCatId() 512 { 513 return customerCatId; 514 } 515 516 517 522 public void setCustomerCatId(int v) throws TorqueException 523 { 524 525 if (this.customerCatId != v) 526 { 527 this.customerCatId = v; 528 setModified(true); 529 } 530 531 532 if (aCustomerCategory != null && !(aCustomerCategory.getCustomerCatId() == v)) 533 { 534 aCustomerCategory = null; 535 } 536 537 } 538 539 544 public String getCustomerName1() 545 { 546 return customerName1; 547 } 548 549 550 555 public void setCustomerName1(String v) 556 { 557 558 if (!ObjectUtils.equals(this.customerName1, v)) 559 { 560 this.customerName1 = v; 561 setModified(true); 562 } 563 564 565 } 566 567 572 public String getCustomerName2() 573 { 574 return customerName2; 575 } 576 577 578 583 public void setCustomerName2(String v) 584 { 585 586 if (!ObjectUtils.equals(this.customerName2, v)) 587 { 588 this.customerName2 = v; 589 setModified(true); 590 } 591 592 593 } 594 595 600 public String getCustomerDisplay() 601 { 602 return customerDisplay; 603 } 604 605 606 611 public void setCustomerDisplay(String v) 612 { 613 614 if (!ObjectUtils.equals(this.customerDisplay, v)) 615 { 616 this.customerDisplay = v; 617 setModified(true); 618 } 619 620 621 } 622 623 628 public String getDear() 629 { 630 return dear; 631 } 632 633 634 639 public void setDear(String v) 640 { 641 642 if (!ObjectUtils.equals(this.dear, v)) 643 { 644 this.dear = v; 645 setModified(true); 646 } 647 648 649 } 650 651 656 public String getAddress1() 657 { 658 return address1; 659 } 660 661 662 667 public void setAddress1(String v) 668 { 669 670 if (!ObjectUtils.equals(this.address1, v)) 671 { 672 this.address1 = v; 673 setModified(true); 674 } 675 676 677 } 678 679 684 public String getAddress2() 685 { 686 return address2; 687 } 688 689 690 695 public void setAddress2(String v) 696 { 697 698 if (!ObjectUtils.equals(this.address2, v)) 699 { 700 this.address2 = v; 701 setModified(true); 702 } 703 704 705 } 706 707 712 public String getCity() 713 { 714 return city; 715 } 716 717 718 723 public void setCity(String v) 724 { 725 726 if (!ObjectUtils.equals(this.city, v)) 727 { 728 this.city = v; 729 setModified(true); 730 } 731 732 733 } 734 735 740 public String getZip() 741 { 742 return zip; 743 } 744 745 746 751 public void setZip(String v) 752 { 753 754 if (!ObjectUtils.equals(this.zip, v)) 755 { 756 this.zip = v; 757 setModified(true); 758 } 759 760 761 } 762 763 768 public String getState() 769 { 770 return state; 771 } 772 773 774 779 public void setState(String v) 780 { 781 782 if (!ObjectUtils.equals(this.state, v)) 783 { 784 this.state = v; 785 setModified(true); 786 } 787 788 789 } 790 791 796 public int getCountryId() 797 { 798 return countryId; 799 } 800 801 802 807 public void setCountryId(int v) throws TorqueException 808 { 809 810 if (this.countryId != v) 811 { 812 this.countryId = v; 813 setModified(true); 814 } 815 816 817 if (aCountry != null && !(aCountry.getCountryId() == v)) 818 { 819 aCountry = null; 820 } 821 822 } 823 824 829 public int getRegionId() 830 { 831 return regionId; 832 } 833 834 835 840 public void setRegionId(int v) throws TorqueException 841 { 842 843 if (this.regionId != v) 844 { 845 this.regionId = v; 846 setModified(true); 847 } 848 849 850 if (aRegion != null && !(aRegion.getRegionId() == v)) 851 { 852 aRegion = null; 853 } 854 855 } 856 857 862 public String getPhone1() 863 { 864 return phone1; 865 } 866 867 868 873 public void setPhone1(String v) 874 { 875 876 if (!ObjectUtils.equals(this.phone1, v)) 877 { 878 this.phone1 = v; 879 setModified(true); 880 } 881 882 883 } 884 885 890 public String getPhone2() 891 { 892 return phone2; 893 } 894 895 896 901 public void setPhone2(String v) 902 { 903 904 if (!ObjectUtils.equals(this.phone2, v)) 905 { 906 this.phone2 = v; 907 setModified(true); 908 } 909 910 911 } 912 913 918 public String getFax() 919 { 920 return fax; 921 } 922 923 924 929 public void setFax(String v) 930 { 931 932 if (!ObjectUtils.equals(this.fax, v)) 933 { 934 this.fax = v; 935 setModified(true); 936 } 937 938 939 } 940 941 946 public String getEmail() 947 { 948 return email; 949 } 950 951 952 957 public void setEmail(String v) 958 { 959 960 if (!ObjectUtils.equals(this.email, v)) 961 { 962 this.email = v; 963 setModified(true); 964 } 965 966 967 } 968 969 974 public int getEmailFormat() 975 { 976 return emailFormat; 977 } 978 979 980 985 public void setEmailFormat(int v) 986 { 987 988 if (this.emailFormat != v) 989 { 990 this.emailFormat = v; 991 setModified(true); 992 } 993 994 995 } 996 997 1002 public int getSendNews() 1003 { 1004 return sendNews; 1005 } 1006 1007 1008 1013 public void setSendNews(int v) 1014 { 1015 1016 if (this.sendNews != v) 1017 { 1018 this.sendNews = v; 1019 setModified(true); 1020 } 1021 1022 1023 } 1024 1025 1030 public String getWebUrl() 1031 { 1032 return webUrl; 1033 } 1034 1035 1036 1041 public void setWebUrl(String v) 1042 { 1043 1044 if (!ObjectUtils.equals(this.webUrl, v)) 1045 { 1046 this.webUrl = v; 1047 setModified(true); 1048 } 1049 1050 1051 } 1052 1053 1058 public int getLanguageId() 1059 { 1060 return languageId; 1061 } 1062 1063 1064 1069 public void setLanguageId(int v) throws TorqueException 1070 { 1071 1072 if (this.languageId != v) 1073 { 1074 this.languageId = v; 1075 setModified(true); 1076 } 1077 1078 1079 if (aLanguage != null && !(aLanguage.getLanguageId() == v)) 1080 { 1081 aLanguage = null; 1082 } 1083 1084 } 1085 1086 1091 public int getGender() 1092 { 1093 return gender; 1094 } 1095 1096 1097 1102 public void setGender(int v) 1103 { 1104 1105 if (this.gender != v) 1106 { 1107 this.gender = v; 1108 setModified(true); 1109 } 1110 1111 1112 } 1113 1114 1119 public int getEducationCatId() 1120 { 1121 return educationCatId; 1122 } 1123 1124 1125 1130 public void setEducationCatId(int v) throws TorqueException 1131 { 1132 1133 if (this.educationCatId != v) 1134 { 1135 this.educationCatId = v; 1136 setModified(true); 1137 } 1138 1139 1140 if (aEducationCategory != null && !(aEducationCategory.getEducationCatId() == v)) 1141 { 1142 aEducationCategory = null; 1143 } 1144 1145 } 1146 1147 1152 public int getHouseholdCatId() 1153 { 1154 return householdCatId; 1155 } 1156 1157 1158 1163 public void setHouseholdCatId(int v) throws TorqueException 1164 { 1165 1166 if (this.householdCatId != v) 1167 { 1168 this.householdCatId = v; 1169 setModified(true); 1170 } 1171 1172 1173 if (aHouseholdCategory != null && !(aHouseholdCategory.getHouseholdCatId() == v)) 1174 { 1175 aHouseholdCategory = null; 1176 } 1177 1178 } 1179 1180 1185 public String getCustom1() 1186 { 1187 return custom1; 1188 } 1189 1190 1191 1196 public void setCustom1(String v) 1197 { 1198 1199 if (!ObjectUtils.equals(this.custom1, v)) 1200 { 1201 this.custom1 = v; 1202 setModified(true); 1203 } 1204 1205 1206 } 1207 1208 1213 public String getCustom2() 1214 { 1215 return custom2; 1216 } 1217 1218 1219 1224 public void setCustom2(String v) 1225 { 1226 1227 if (!ObjectUtils.equals(this.custom2, v)) 1228 { 1229 this.custom2 = v; 1230 setModified(true); 1231 } 1232 1233 1234 } 1235 1236 1241 public String getCustom3() 1242 { 1243 return custom3; 1244 } 1245 1246 1247 1252 public void setCustom3(String v) 1253 { 1254 1255 if (!ObjectUtils.equals(this.custom3, v)) 1256 { 1257 this.custom3 = v; 1258 setModified(true); 1259 } 1260 1261 1262 } 1263 1264 1269 public String getCustom4() 1270 { 1271 return custom4; 1272 } 1273 1274 1275 1280 public void setCustom4(String v) 1281 { 1282 1283 if (!ObjectUtils.equals(this.custom4, v)) 1284 { 1285 this.custom4 = v; 1286 setModified(true); 1287 } 1288 1289 1290 } 1291 1292 1297 public String getCustom5() 1298 { 1299 return custom5; 1300 } 1301 1302 1303 1308 public void setCustom5(String v) 1309 { 1310 1311 if (!ObjectUtils.equals(this.custom5, v)) 1312 { 1313 this.custom5 = v; 1314 setModified(true); 1315 } 1316 1317 1318 } 1319 1320 1325 public String getCustom6() 1326 { 1327 return custom6; 1328 } 1329 1330 1331 1336 public void setCustom6(String v) 1337 { 1338 1339 if (!ObjectUtils.equals(this.custom6, v)) 1340 { 1341 this.custom6 = v; 1342 setModified(true); 1343 } 1344 1345 1346 } 1347 1348 1353 public String getNotes() 1354 { 1355 return notes; 1356 } 1357 1358 1359 1364 public void setNotes(String v) 1365 { 1366 1367 if (!ObjectUtils.equals(this.notes, v)) 1368 { 1369 this.notes = v; 1370 setModified(true); 1371 } 1372 1373 1374 } 1375 1376 1381 public Date getCreated() 1382 { 1383 return created; 1384 } 1385 1386 1387 1392 public void setCreated(Date v) 1393 { 1394 1395 if (!ObjectUtils.equals(this.created, v)) 1396 { 1397 this.created = v; 1398 setModified(true); 1399 } 1400 1401 1402 } 1403 1404 1409 public Date getModified() 1410 { 1411 return modified; 1412 } 1413 1414 1415 1420 public void setModified(Date v) 1421 { 1422 1423 if (!ObjectUtils.equals(this.modified, v)) 1424 { 1425 this.modified = v; 1426 setModified(true); 1427 } 1428 1429 1430 } 1431 1432 1437 public String getCreatedBy() 1438 { 1439 return createdBy; 1440 } 1441 1442 1443 1448 public void setCreatedBy(String v) 1449 { 1450 1451 if (!ObjectUtils.equals(this.createdBy, v)) 1452 { 1453 this.createdBy = v; 1454 setModified(true); 1455 } 1456 1457 1458 } 1459 1460 1465 public String getModifiedBy() 1466 { 1467 return modifiedBy; 1468 } 1469 1470 1471 1476 public void setModifiedBy(String v) 1477 { 1478 1479 if (!ObjectUtils.equals(this.modifiedBy, v)) 1480 { 1481 this.modifiedBy = v; 1482 setModified(true); 1483 } 1484 1485 1486 } 1487 1488 1489 1490 1491 1492 private CustomerCategory aCustomerCategory; 1493 1494 1500 public void setCustomerCategory(CustomerCategory v) throws TorqueException 1501 { 1502 if (v == null) 1503 { 1504 setCustomerCatId( 1000); 1505 } 1506 else 1507 { 1508 setCustomerCatId(v.getCustomerCatId()); 1509 } 1510 aCustomerCategory = v; 1511 } 1512 1513 1514 1520 public CustomerCategory getCustomerCategory() throws TorqueException 1521 { 1522 if (aCustomerCategory == null && (this.customerCatId != 0)) 1523 { 1524 aCustomerCategory = CustomerCategoryPeer.retrieveByPK(SimpleKey.keyFor(this.customerCatId)); 1525 1526 1535 } 1536 return aCustomerCategory; 1537 } 1538 1539 1545 public void setCustomerCategoryKey(ObjectKey key) throws TorqueException 1546 { 1547 1548 setCustomerCatId(((NumberKey) key).intValue()); 1549 } 1550 1551 1552 1553 1554 private Country aCountry; 1555 1556 1562 public void setCountry(Country v) throws TorqueException 1563 { 1564 if (v == null) 1565 { 1566 setCountryId( 1000); 1567 } 1568 else 1569 { 1570 setCountryId(v.getCountryId()); 1571 } 1572 aCountry = v; 1573 } 1574 1575 1576 1582 public Country getCountry() throws TorqueException 1583 { 1584 if (aCountry == null && (this.countryId != 0)) 1585 { 1586 aCountry = CountryPeer.retrieveByPK(SimpleKey.keyFor(this.countryId)); 1587 1588 1597 } 1598 return aCountry; 1599 } 1600 1601 1607 public void setCountryKey(ObjectKey key) throws TorqueException 1608 { 1609 1610 setCountryId(((NumberKey) key).intValue()); 1611 } 1612 1613 1614 1615 1616 private Region aRegion; 1617 1618 1624 public void setRegion(Region v) throws TorqueException 1625 { 1626 if (v == null) 1627 { 1628 setRegionId( 1000); 1629 } 1630 else 1631 { 1632 setRegionId(v.getRegionId()); 1633 } 1634 aRegion = v; 1635 } 1636 1637 1638 1644 public Region getRegion() throws TorqueException 1645 { 1646 if (aRegion == null && (this.regionId != 0)) 1647 { 1648 aRegion = RegionPeer.retrieveByPK(SimpleKey.keyFor(this.regionId)); 1649 1650 1659 } 1660 return aRegion; 1661 } 1662 1663 1669 public void setRegionKey(ObjectKey key) throws TorqueException 1670 { 1671 1672 setRegionId(((NumberKey) key).intValue()); 1673 } 1674 1675 1676 1677 1678 private Language aLanguage; 1679 1680 1686 public void setLanguage(Language v) throws TorqueException 1687 { 1688 if (v == null) 1689 { 1690 setLanguageId( 1000); 1691 } 1692 else 1693 { 1694 setLanguageId(v.getLanguageId()); 1695 } 1696 aLanguage = v; 1697 } 1698 1699 1700 1706 public Language getLanguage() throws TorqueException 1707 { 1708 if (aLanguage == null && (this.languageId != 0)) 1709 { 1710 aLanguage = LanguagePeer.retrieveByPK(SimpleKey.keyFor(this.languageId)); 1711 1712 1721 } 1722 return aLanguage; 1723 } 1724 1725 1731 public void setLanguageKey(ObjectKey key) throws TorqueException 1732 { 1733 1734 setLanguageId(((NumberKey) key).intValue()); 1735 } 1736 1737 1738 1739 1740 private EducationCategory aEducationCategory; 1741 1742 1748 public void setEducationCategory(EducationCategory v) throws TorqueException 1749 { 1750 if (v == null) 1751 { 1752 setEducationCatId( 1000); 1753 } 1754 else 1755 { 1756 setEducationCatId(v.getEducationCatId()); 1757 } 1758 aEducationCategory = v; 1759 } 1760 1761 1762 1768 public EducationCategory getEducationCategory() throws TorqueException 1769 { 1770 if (aEducationCategory == null && (this.educationCatId != 0)) 1771 { 1772 aEducationCategory = EducationCategoryPeer.retrieveByPK(SimpleKey.keyFor(this.educationCatId)); 1773 1774 1783 } 1784 return aEducationCategory; 1785 } 1786 1787 1793 public void setEducationCategoryKey(ObjectKey key) throws TorqueException 1794 { 1795 1796 setEducationCatId(((NumberKey) key).intValue()); 1797 } 1798 1799 1800 1801 1802 private HouseholdCategory aHouseholdCategory; 1803 1804 1810 public void setHouseholdCategory(HouseholdCategory v) throws TorqueException 1811 { 1812 if (v == null) 1813 { 1814 setHouseholdCatId( 1000); 1815 } 1816 else 1817 { 1818 setHouseholdCatId(v.getHouseholdCatId()); 1819 } 1820 aHouseholdCategory = v; 1821 } 1822 1823 1824 1830 public HouseholdCategory getHouseholdCategory() throws TorqueException 1831 { 1832 if (aHouseholdCategory == null && (this.householdCatId != 0)) 1833 { 1834 aHouseholdCategory = HouseholdCategoryPeer.retrieveByPK(SimpleKey.keyFor(this.householdCatId)); 1835 1836 1845 } 1846 return aHouseholdCategory; 1847 } 1848 1849 1855 public void setHouseholdCategoryKey(ObjectKey key) throws TorqueException 1856 { 1857 1858 setHouseholdCatId(((NumberKey) key).intValue()); 1859 } 1860 1861 1862 1863 1866 protected List collSordersRelatedByCustomerId; 1867 1868 1873 protected void initSordersRelatedByCustomerId() 1874 { 1875 if (collSordersRelatedByCustomerId == null) 1876 { 1877 collSordersRelatedByCustomerId = new ArrayList (); 1878 } 1879 } 1880 1881 1888 public void addSorderRelatedByCustomerId(Sorder l) throws TorqueException 1889 { 1890 getSordersRelatedByCustomerId().add(l); 1891 l.setCustomerRelatedByCustomerId((Customer) this); 1892 } 1893 1894 1897 private Criteria lastSordersRelatedByCustomerIdCriteria = null; 1898 1899 1906 public List getSordersRelatedByCustomerId() throws TorqueException 1907 { 1908 if (collSordersRelatedByCustomerId == null) 1909 { 1910 collSordersRelatedByCustomerId = getSordersRelatedByCustomerId(new Criteria(10)); 1911 } 1912 return collSordersRelatedByCustomerId; 1913 } 1914 1915 1926 public List getSordersRelatedByCustomerId(Criteria criteria) throws TorqueException 1927 { 1928 if (collSordersRelatedByCustomerId == null) 1929 { 1930 if (isNew()) 1931 { 1932 collSordersRelatedByCustomerId = new ArrayList (); 1933 } 1934 else 1935 { 1936 criteria.add(SorderPeer.CUSTOMER_ID, getCustomerId() ); 1937 collSordersRelatedByCustomerId = SorderPeer.doSelect(criteria); 1938 } 1939 } 1940 else 1941 { 1942 if (!isNew()) 1944 { 1945 criteria.add(SorderPeer.CUSTOMER_ID, getCustomerId()); 1949 if (!lastSordersRelatedByCustomerIdCriteria.equals(criteria)) 1950 { 1951 collSordersRelatedByCustomerId = SorderPeer.doSelect(criteria); 1952 } 1953 } 1954 } 1955 lastSordersRelatedByCustomerIdCriteria = criteria; 1956 1957 return collSordersRelatedByCustomerId; 1958 } 1959 1960 1968 public List getSordersRelatedByCustomerId(Connection con) throws TorqueException 1969 { 1970 if (collSordersRelatedByCustomerId == null) 1971 { 1972 collSordersRelatedByCustomerId = getSordersRelatedByCustomerId(new Criteria(10), con); 1973 } 1974 return collSordersRelatedByCustomerId; 1975 } 1976 1977 1989 public List getSordersRelatedByCustomerId(Criteria criteria, Connection con) 1990 throws TorqueException 1991 { 1992 if (collSordersRelatedByCustomerId == null) 1993 { 1994 if (isNew()) 1995 { 1996 collSordersRelatedByCustomerId = new ArrayList (); 1997 } 1998 else 1999 { 2000 criteria.add(SorderPeer.CUSTOMER_ID, getCustomerId()); 2001 collSordersRelatedByCustomerId = SorderPeer.doSelect(criteria, con); 2002 } 2003 } 2004 else 2005 { 2006 if (!isNew()) 2008 { 2009 criteria.add(SorderPeer.CUSTOMER_ID, getCustomerId()); 2013 if (!lastSordersRelatedByCustomerIdCriteria.equals(criteria)) 2014 { 2015 collSordersRelatedByCustomerId = SorderPeer.doSelect(criteria, con); 2016 } 2017 } 2018 } 2019 lastSordersRelatedByCustomerIdCriteria = criteria; 2020 2021 return collSordersRelatedByCustomerId; 2022 } 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2053 protected List getSordersRelatedByCustomerIdJoinCustomerRelatedByRecipientId(Criteria criteria) 2054 throws TorqueException 2055 { 2056 if (collSordersRelatedByCustomerId == null) 2057 { 2058 if (isNew()) 2059 { 2060 collSordersRelatedByCustomerId = new ArrayList (); 2061 } 2062 else 2063 { 2064 criteria.add(SorderPeer.CUSTOMER_ID, getCustomerId()); 2065 collSordersRelatedByCustomerId = SorderPeer.doSelectJoinCustomerRelatedByRecipientId(criteria); 2066 } 2067 } 2068 else 2069 { 2070 2074 criteria.add(SorderPeer.CUSTOMER_ID, getCustomerId()); 2075 if (!lastSordersRelatedByCustomerIdCriteria.equals(criteria)) 2076 { 2077 collSordersRelatedByCustomerId = SorderPeer.doSelectJoinCustomerRelatedByRecipientId(criteria); 2078 } 2079 } 2080 lastSordersRelatedByCustomerIdCriteria = criteria; 2081 2082 return collSordersRelatedByCustomerId; 2083 } 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2104 protected List getSordersRelatedByCustomerIdJoinProject(Criteria criteria) 2105 throws TorqueException 2106 { 2107 if (collSordersRelatedByCustomerId == null) 2108 { 2109 if (isNew()) 2110 { 2111 collSordersRelatedByCustomerId = new ArrayList (); 2112 } 2113 else 2114 { 2115 criteria.add(SorderPeer.CUSTOMER_ID, getCustomerId()); 2116 collSordersRelatedByCustomerId = SorderPeer.doSelectJoinProject(criteria); 2117 } 2118 } 2119 else 2120 { 2121 2125 criteria.add(SorderPeer.CUSTOMER_ID, getCustomerId()); 2126 if (!lastSordersRelatedByCustomerIdCriteria.equals(criteria)) 2127 { 2128 collSordersRelatedByCustomerId = SorderPeer.doSelectJoinProject(criteria); 2129 } 2130 } 2131 lastSordersRelatedByCustomerIdCriteria = criteria; 2132 2133 return collSordersRelatedByCustomerId; 2134 } 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2155 protected List getSordersRelatedByCustomerIdJoinCarrier(Criteria criteria) 2156 throws TorqueException 2157 { 2158 if (collSordersRelatedByCustomerId == null) 2159 { 2160 if (isNew()) 2161 { 2162 collSordersRelatedByCustomerId = new ArrayList (); 2163 } 2164 else 2165 { 2166 criteria.add(SorderPeer.CUSTOMER_ID, getCustomerId()); 2167 collSordersRelatedByCustomerId = SorderPeer.doSelectJoinCarrier(criteria); 2168 } 2169 } 2170 else 2171 { 2172 2176 criteria.add(SorderPeer.CUSTOMER_ID, getCustomerId()); 2177 if (!lastSordersRelatedByCustomerIdCriteria.equals(criteria)) 2178 { 2179 collSordersRelatedByCustomerId = SorderPeer.doSelectJoinCarrier(criteria); 2180 } 2181 } 2182 lastSordersRelatedByCustomerIdCriteria = criteria; 2183 2184 return collSordersRelatedByCustomerId; 2185 } 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2206 protected List getSordersRelatedByCustomerIdJoinCurrency(Criteria criteria) 2207 throws TorqueException 2208 { 2209 if (collSordersRelatedByCustomerId == null) 2210 { 2211 if (isNew()) 2212 { 2213 collSordersRelatedByCustomerId = new ArrayList (); 2214 } 2215 else 2216 { 2217 criteria.add(SorderPeer.CUSTOMER_ID, getCustomerId()); 2218 collSordersRelatedByCustomerId = SorderPeer.doSelectJoinCurrency(criteria); 2219 } 2220 } 2221 else 2222 { 2223 2227 criteria.add(SorderPeer.CUSTOMER_ID, getCustomerId()); 2228 if (!lastSordersRelatedByCustomerIdCriteria.equals(criteria)) 2229 { 2230 collSordersRelatedByCustomerId = SorderPeer.doSelectJoinCurrency(criteria); 2231 } 2232 } 2233 lastSordersRelatedByCustomerIdCriteria = criteria; 2234 2235 return collSordersRelatedByCustomerId; 2236 } 2237 2238 2239 2240 2241 2242 2245 protected List collSordersRelatedByRecipientId; 2246 2247 2252 protected void initSordersRelatedByRecipientId() 2253 { 2254 if (collSordersRelatedByRecipientId == null) 2255 { 2256 collSordersRelatedByRecipientId = new ArrayList (); 2257 } 2258 } 2259 2260 2267 public void addSorderRelatedByRecipientId(Sorder l) throws TorqueException 2268 { 2269 getSordersRelatedByRecipientId().add(l); 2270 l.setCustomerRelatedByRecipientId((Customer) this); 2271 } 2272 2273 2276 private Criteria lastSordersRelatedByRecipientIdCriteria = null; 2277 2278 2285 public List getSordersRelatedByRecipientId() throws TorqueException 2286 { 2287 if (collSordersRelatedByRecipientId == null) 2288 { 2289 collSordersRelatedByRecipientId = getSordersRelatedByRecipientId(new Criteria(10)); 2290 } 2291 return collSordersRelatedByRecipientId; 2292 } 2293 2294 2305 public List getSordersRelatedByRecipientId(Criteria criteria) throws TorqueException 2306 { 2307 if (collSordersRelatedByRecipientId == null) 2308 { 2309 if (isNew()) 2310 { 2311 collSordersRelatedByRecipientId = new ArrayList (); 2312 } 2313 else 2314 { 2315 criteria.add(SorderPeer.RECIPIENT_ID, getCustomerId() ); 2316 collSordersRelatedByRecipientId = SorderPeer.doSelect(criteria); 2317 } 2318 } 2319 else 2320 { 2321 if (!isNew()) 2323 { 2324 criteria.add(SorderPeer.RECIPIENT_ID, getCustomerId()); 2328 if (!lastSordersRelatedByRecipientIdCriteria.equals(criteria)) 2329 { 2330 collSordersRelatedByRecipientId = SorderPeer.doSelect(criteria); 2331 } 2332 } 2333 } 2334 lastSordersRelatedByRecipientIdCriteria = criteria; 2335 2336 return collSordersRelatedByRecipientId; 2337 } 2338 2339 2347 public List getSordersRelatedByRecipientId(Connection con) throws TorqueException 2348 { 2349 if (collSordersRelatedByRecipientId == null) 2350 { 2351 collSordersRelatedByRecipientId = getSordersRelatedByRecipientId(new Criteria(10), con); 2352 } 2353 return collSordersRelatedByRecipientId; 2354 } 2355 2356 2368 public List getSordersRelatedByRecipientId(Criteria criteria, Connection con) 2369 throws TorqueException 2370 { 2371 if (collSordersRelatedByRecipientId == null) 2372 { 2373 if (isNew()) 2374 { 2375 collSordersRelatedByRecipientId = new ArrayList (); 2376 } 2377 else 2378 { 2379 criteria.add(SorderPeer.RECIPIENT_ID, getCustomerId()); 2380 collSordersRelatedByRecipientId = SorderPeer.doSelect(criteria, con); 2381 } 2382 } 2383 else 2384 { 2385 if (!isNew()) 2387 { 2388 criteria.add(SorderPeer.RECIPIENT_ID, getCustomerId()); 2392 if (!lastSordersRelatedByRecipientIdCriteria.equals(criteria)) 2393 { 2394 collSordersRelatedByRecipientId = SorderPeer.doSelect(criteria, con); 2395 } 2396 } 2397 } 2398 lastSordersRelatedByRecipientIdCriteria = criteria; 2399 2400 return collSordersRelatedByRecipientId; 2401 } 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2424 protected List getSordersRelatedByRecipientIdJoinCustomerRelatedByCustomerId(Criteria criteria) 2425 throws TorqueException 2426 { 2427 if (collSordersRelatedByRecipientId == null) 2428 { 2429 if (isNew()) 2430 { 2431 collSordersRelatedByRecipientId = new ArrayList (); 2432 } 2433 else 2434 { 2435 criteria.add(SorderPeer.RECIPIENT_ID, getCustomerId()); 2436 collSordersRelatedByRecipientId = SorderPeer.doSelectJoinCustomerRelatedByCustomerId(criteria); 2437 } 2438 } 2439 else 2440 { 2441 2445 criteria.add(SorderPeer.RECIPIENT_ID, getCustomerId()); 2446 if (!lastSordersRelatedByRecipientIdCriteria.equals(criteria)) 2447 { 2448 collSordersRelatedByRecipientId = SorderPeer.doSelectJoinCustomerRelatedByCustomerId(criteria); 2449 } 2450 } 2451 lastSordersRelatedByRecipientIdCriteria = criteria; 2452 2453 return collSordersRelatedByRecipientId; 2454 } 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2483 protected List getSordersRelatedByRecipientIdJoinProject(Criteria criteria) 2484 throws TorqueException 2485 { 2486 if (collSordersRelatedByRecipientId == null) 2487 { 2488 if (isNew()) 2489 { 2490 collSordersRelatedByRecipientId = new ArrayList (); 2491 } 2492 else 2493 { 2494 criteria.add(SorderPeer.RECIPIENT_ID, getCustomerId()); 2495 collSordersRelatedByRecipientId = SorderPeer.doSelectJoinProject(criteria); 2496 } 2497 } 2498 else 2499 { 2500 2504 criteria.add(SorderPeer.RECIPIENT_ID, getCustomerId()); 2505 if (!lastSordersRelatedByRecipientIdCriteria.equals(criteria)) 2506 { 2507 collSordersRelatedByRecipientId = SorderPeer.doSelectJoinProject(criteria); 2508 } 2509 } 2510 lastSordersRelatedByRecipientIdCriteria = criteria; 2511 2512 return collSordersRelatedByRecipientId; 2513 } 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2534 protected List getSordersRelatedByRecipientIdJoinCarrier(Criteria criteria) 2535 throws TorqueException 2536 { 2537 if (collSordersRelatedByRecipientId == null) 2538 { 2539 if (isNew()) 2540 { 2541 collSordersRelatedByRecipientId = new ArrayList (); 2542 } 2543 else 2544 { 2545 criteria.add(SorderPeer.RECIPIENT_ID, getCustomerId()); 2546 collSordersRelatedByRecipientId = SorderPeer.doSelectJoinCarrier(criteria); 2547 } 2548 } 2549 else 2550 { 2551 2555 criteria.add(SorderPeer.RECIPIENT_ID, getCustomerId()); 2556 if (!lastSordersRelatedByRecipientIdCriteria.equals(criteria)) 2557 { 2558 collSordersRelatedByRecipientId = SorderPeer.doSelectJoinCarrier(criteria); 2559 } 2560 } 2561 lastSordersRelatedByRecipientIdCriteria = criteria; 2562 2563 return collSordersRelatedByRecipientId; 2564 } 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2585 protected List getSordersRelatedByRecipientIdJoinCurrency(Criteria criteria) 2586 throws TorqueException 2587 { 2588 if (collSordersRelatedByRecipientId == null) 2589 { 2590 if (isNew()) 2591 { 2592 collSordersRelatedByRecipientId = new ArrayList (); 2593 } 2594 else 2595 { 2596 criteria.add(SorderPeer.RECIPIENT_ID, getCustomerId()); 2597 collSordersRelatedByRecipientId = SorderPeer.doSelectJoinCurrency(criteria); 2598 } 2599 } 2600 else 2601 { 2602 2606 criteria.add(SorderPeer.RECIPIENT_ID, getCustomerId()); 2607 if (!lastSordersRelatedByRecipientIdCriteria.equals(criteria)) 2608 { 2609 collSordersRelatedByRecipientId = SorderPeer.doSelectJoinCurrency(criteria); 2610 } 2611 } 2612 lastSordersRelatedByRecipientIdCriteria = criteria; 2613 2614 return collSordersRelatedByRecipientId; 2615 } 2616 2617 2618 2619 2620 2621 2624 protected List collPayments; 2625 2626 2631 protected void initPayments() 2632 { 2633 if (collPayments == null) 2634 { 2635 collPayments = new ArrayList (); 2636 } 2637 } 2638 2639 2646 public void addPayment(Payment l) throws TorqueException 2647 { 2648 getPayments().add(l); 2649 l.setCustomer((Customer) this); 2650 } 2651 2652 2655 private Criteria lastPaymentsCriteria = null; 2656 2657 2664 public List getPayments() throws TorqueException 2665 { 2666 if (collPayments == null) 2667 { 2668 collPayments = getPayments(new Criteria(10)); 2669 } 2670 return collPayments; 2671 } 2672 2673 2684 public List getPayments(Criteria criteria) throws TorqueException 2685 { 2686 if (collPayments == null) 2687 { 2688 if (isNew()) 2689 { 2690 collPayments = new ArrayList (); 2691 } 2692 else 2693 { 2694 criteria.add(PaymentPeer.CUSTOMER_ID, getCustomerId() ); 2695 collPayments = PaymentPeer.doSelect(criteria); 2696 } 2697 } 2698 else 2699 { 2700 if (!isNew()) 2702 { 2703 criteria.add(PaymentPeer.CUSTOMER_ID, getCustomerId()); 2707 if (!lastPaymentsCriteria.equals(criteria)) 2708 { 2709 collPayments = PaymentPeer.doSelect(criteria); 2710 } 2711 } 2712 } 2713 lastPaymentsCriteria = criteria; 2714 2715 return collPayments; 2716 } 2717 2718 2726 public List getPayments(Connection con) throws TorqueException 2727 { 2728 if (collPayments == null) 2729 { 2730 collPayments = getPayments(new Criteria(10), con); 2731 } 2732 return collPayments; 2733 } 2734 2735 2747 public List getPayments(Criteria criteria, Connection con) 2748 throws TorqueException 2749 { 2750 if (collPayments == null) 2751 { 2752 if (isNew()) 2753 { 2754 collPayments = new ArrayList (); 2755 } 2756 else 2757 { 2758 criteria.add(PaymentPeer.CUSTOMER_ID, getCustomerId()); 2759 collPayments = PaymentPeer.doSelect(criteria, con); 2760 } 2761 } 2762 else 2763 { 2764 if (!isNew()) 2766 { 2767 criteria.add(PaymentPeer.CUSTOMER_ID, getCustomerId()); 2771 if (!lastPaymentsCriteria.equals(criteria)) 2772 { 2773 collPayments = PaymentPeer.doSelect(criteria, con); 2774 } 2775 } 2776 } 2777 lastPaymentsCriteria = criteria; 2778 2779 return collPayments; 2780 } 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2803 protected List getPaymentsJoinCustomer(Criteria criteria) 2804 throws TorqueException 2805 { 2806 if (collPayments == null) 2807 { 2808 if (isNew()) 2809 { 2810 collPayments = new ArrayList (); 2811 } 2812 else 2813 { 2814 criteria.add(PaymentPeer.CUSTOMER_ID, getCustomerId()); 2815 collPayments = PaymentPeer.doSelectJoinCustomer(criteria); 2816 } 2817 } 2818 else 2819 { 2820 2824 criteria.add(PaymentPeer.CUSTOMER_ID, getCustomerId()); 2825 if (!lastPaymentsCriteria.equals(criteria)) 2826 { 2827 collPayments = PaymentPeer.doSelectJoinCustomer(criteria); 2828 } 2829 } 2830 lastPaymentsCriteria = criteria; 2831 2832 return collPayments; 2833 } 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2854 protected List getPaymentsJoinProject(Criteria criteria) 2855 throws TorqueException 2856 { 2857 if (collPayments == null) 2858 { 2859 if (isNew()) 2860 { 2861 collPayments = new ArrayList (); 2862 } 2863 else 2864 { 2865 criteria.add(PaymentPeer.CUSTOMER_ID, getCustomerId()); 2866 collPayments = PaymentPeer.doSelectJoinProject(criteria); 2867 } 2868 } 2869 else 2870 { 2871 2875 criteria.add(PaymentPeer.CUSTOMER_ID, getCustomerId()); 2876 if (!lastPaymentsCriteria.equals(criteria)) 2877 { 2878 collPayments = PaymentPeer.doSelectJoinProject(criteria); 2879 } 2880 } 2881 lastPaymentsCriteria = criteria; 2882 2883 return collPayments; 2884 } 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2905 protected List getPaymentsJoinSorder(Criteria criteria) 2906 throws TorqueException 2907 { 2908 if (collPayments == null) 2909 { 2910 if (isNew()) 2911 { 2912 collPayments = new ArrayList (); 2913 } 2914 else 2915 { 2916 criteria.add(PaymentPeer.CUSTOMER_ID, getCustomerId()); 2917 collPayments = PaymentPeer.doSelectJoinSorder(criteria); 2918 } 2919 } 2920 else 2921 { 2922 2926 criteria.add(PaymentPeer.CUSTOMER_ID, getCustomerId()); 2927 if (!lastPaymentsCriteria.equals(criteria)) 2928 { 2929 collPayments = PaymentPeer.doSelectJoinSorder(criteria); 2930 } 2931 } 2932 lastPaymentsCriteria = criteria; 2933 2934 return collPayments; 2935 } 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2956 protected List getPaymentsJoinCurrency(Criteria criteria) 2957 throws TorqueException 2958 { 2959 if (collPayments == null) 2960 { 2961 if (isNew()) 2962 { 2963 collPayments = new ArrayList (); 2964 } 2965 else 2966 { 2967 criteria.add(PaymentPeer.CUSTOMER_ID, getCustomerId()); 2968 collPayments = PaymentPeer.doSelectJoinCurrency(criteria); 2969 } 2970 } 2971 else 2972 { 2973 2977 criteria.add(PaymentPeer.CUSTOMER_ID, getCustomerId()); 2978 if (!lastPaymentsCriteria.equals(criteria)) 2979 { 2980 collPayments = PaymentPeer.doSelectJoinCurrency(criteria); 2981 } 2982 } 2983 lastPaymentsCriteria = criteria; 2984 2985 return collPayments; 2986 } 2987 2988 2989 2990 2991 2992 2995 protected List collServicesRelatedByCustomerId; 2996 2997 3002 protected void initServicesRelatedByCustomerId() 3003 { 3004 if (collServicesRelatedByCustomerId == null) 3005 { 3006 collServicesRelatedByCustomerId = new ArrayList (); 3007 } 3008 } 3009 3010 3017 public void addServiceRelatedByCustomerId(Service l) throws TorqueException 3018 { 3019 getServicesRelatedByCustomerId().add(l); 3020 l.setCustomerRelatedByCustomerId((Customer) this); 3021 } 3022 3023 3026 private Criteria lastServicesRelatedByCustomerIdCriteria = null; 3027 3028 3035 public List getServicesRelatedByCustomerId() throws TorqueException 3036 { 3037 if (collServicesRelatedByCustomerId == null) 3038 { 3039 collServicesRelatedByCustomerId = getServicesRelatedByCustomerId(new Criteria(10)); 3040 } 3041 return collServicesRelatedByCustomerId; 3042 } 3043 3044 3055 public List getServicesRelatedByCustomerId(Criteria criteria) throws TorqueException 3056 { 3057 if (collServicesRelatedByCustomerId == null) 3058 { 3059 if (isNew()) 3060 { 3061 collServicesRelatedByCustomerId = new ArrayList (); 3062 } 3063 else 3064 { 3065 criteria.add(ServicePeer.CUSTOMER_ID, getCustomerId() ); 3066 collServicesRelatedByCustomerId = ServicePeer.doSelect(criteria); 3067 } 3068 } 3069 else 3070 { 3071 if (!isNew()) 3073 { 3074 criteria.add(ServicePeer.CUSTOMER_ID, getCustomerId()); 3078 if (!lastServicesRelatedByCustomerIdCriteria.equals(criteria)) 3079 { 3080 collServicesRelatedByCustomerId = ServicePeer.doSelect(criteria); 3081 } 3082 } 3083 } 3084 lastServicesRelatedByCustomerIdCriteria = criteria; 3085 3086 return collServicesRelatedByCustomerId; 3087 } 3088 3089 3097 public List getServicesRelatedByCustomerId(Connection con) throws TorqueException 3098 { 3099 if (collServicesRelatedByCustomerId == null) 3100 { 3101 collServicesRelatedByCustomerId = getServicesRelatedByCustomerId(new Criteria(10), con); 3102 } 3103 return collServicesRelatedByCustomerId; 3104 } 3105 3106 3118 public List getServicesRelatedByCustomerId(Criteria criteria, Connection con) 3119 throws TorqueException 3120 { 3121 if (collServicesRelatedByCustomerId == null) 3122 { 3123 if (isNew()) 3124 { 3125 collServicesRelatedByCustomerId = new ArrayList (); 3126 } 3127 else 3128 { 3129 criteria.add(ServicePeer.CUSTOMER_ID, getCustomerId()); 3130 collServicesRelatedByCustomerId = ServicePeer.doSelect(criteria, con); 3131 } 3132 } 3133 else 3134 { 3135 if (!isNew()) 3137 { 3138 criteria.add(ServicePeer.CUSTOMER_ID, getCustomerId()); 3142 if (!lastServicesRelatedByCustomerIdCriteria.equals(criteria)) 3143 { 3144 collServicesRelatedByCustomerId = ServicePeer.doSelect(criteria, con); 3145 } 3146 } 3147 } 3148 lastServicesRelatedByCustomerIdCriteria = criteria; 3149 3150 return collServicesRelatedByCustomerId; 3151 } 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3182 protected List getServicesRelatedByCustomerIdJoinCustomerRelatedByRecipientId(Criteria criteria) 3183 throws TorqueException 3184 { 3185 if (collServicesRelatedByCustomerId == null) 3186 { 3187 if (isNew()) 3188 { 3189 collServicesRelatedByCustomerId = new ArrayList (); 3190 } 3191 else 3192 { 3193 criteria.add(ServicePeer.CUSTOMER_ID, getCustomerId()); 3194 collServicesRelatedByCustomerId = ServicePeer.doSelectJoinCustomerRelatedByRecipientId(criteria); 3195 } 3196 } 3197 else 3198 { 3199 3203 criteria.add(ServicePeer.CUSTOMER_ID, getCustomerId()); 3204 if (!lastServicesRelatedByCustomerIdCriteria.equals(criteria)) 3205 { 3206 collServicesRelatedByCustomerId = ServicePeer.doSelectJoinCustomerRelatedByRecipientId(criteria); 3207 } 3208 } 3209 lastServicesRelatedByCustomerIdCriteria = criteria; 3210 3211 return collServicesRelatedByCustomerId; 3212 } 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3233 protected List getServicesRelatedByCustomerIdJoinProject(Criteria criteria) 3234 throws TorqueException 3235 { 3236 if (collServicesRelatedByCustomerId == null) 3237 { 3238 if (isNew()) 3239 { 3240 collServicesRelatedByCustomerId = new ArrayList (); 3241 } 3242 else 3243 { 3244 criteria.add(ServicePeer.CUSTOMER_ID, getCustomerId()); 3245 collServicesRelatedByCustomerId = ServicePeer.doSelectJoinProject(criteria); 3246 } 3247 } 3248 else 3249 { 3250 3254 criteria.add(ServicePeer.CUSTOMER_ID, getCustomerId()); 3255 if (!lastServicesRelatedByCustomerIdCriteria.equals(criteria)) 3256 { 3257 collServicesRelatedByCustomerId = ServicePeer.doSelectJoinProject(criteria); 3258 } 3259 } 3260 lastServicesRelatedByCustomerIdCriteria = criteria; 3261 3262 return collServicesRelatedByCustomerId; 3263 } 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3284 protected List getServicesRelatedByCustomerIdJoinSorder(Criteria criteria) 3285 throws TorqueException 3286 { 3287 if (collServicesRelatedByCustomerId == null) 3288 { 3289 if (isNew()) 3290 { 3291 collServicesRelatedByCustomerId = new ArrayList (); 3292 } 3293 else 3294 { 3295 criteria.add(ServicePeer.CUSTOMER_ID, getCustomerId()); 3296 collServicesRelatedByCustomerId = ServicePeer.doSelectJoinSorder(criteria); 3297 } 3298 } 3299 else 3300 { 3301 3305 criteria.add(ServicePeer.CUSTOMER_ID, getCustomerId()); 3306 if (!lastServicesRelatedByCustomerIdCriteria.equals(criteria)) 3307 { 3308 collServicesRelatedByCustomerId = ServicePeer.doSelectJoinSorder(criteria); 3309 } 3310 } 3311 lastServicesRelatedByCustomerIdCriteria = criteria; 3312 3313 return collServicesRelatedByCustomerId; 3314 } 3315 3316 3317 3318 3319 3320 3323 protected List collServicesRelatedByRecipientId; 3324 3325 3330 protected void initServicesRelatedByRecipientId() 3331 { 3332 if (collServicesRelatedByRecipientId == null) 3333 { 3334 collServicesRelatedByRecipientId = new ArrayList (); 3335 } 3336 } 3337 3338 3345 public void addServiceRelatedByRecipientId(Service l) throws TorqueException 3346 { 3347 getServicesRelatedByRecipientId().add(l); 3348 l.setCustomerRelatedByRecipientId((Customer) this); 3349 } 3350 3351 3354 private Criteria lastServicesRelatedByRecipientIdCriteria = null; 3355 3356 3363 public List getServicesRelatedByRecipientId() throws TorqueException 3364 { 3365 if (collServicesRelatedByRecipientId == null) 3366 { 3367 collServicesRelatedByRecipientId = getServicesRelatedByRecipientId(new Criteria(10)); 3368 } 3369 return collServicesRelatedByRecipientId; 3370 } 3371 3372 3383 public List getServicesRelatedByRecipientId(Criteria criteria) throws TorqueException 3384 { 3385 if (collServicesRelatedByRecipientId == null) 3386 { 3387 if (isNew()) 3388 { 3389 collServicesRelatedByRecipientId = new ArrayList (); 3390 } 3391 else 3392 { 3393 criteria.add(ServicePeer.RECIPIENT_ID, getCustomerId() ); 3394 collServicesRelatedByRecipientId = ServicePeer.doSelect(criteria); 3395 } 3396 } 3397 else 3398 { 3399 if (!isNew()) 3401 { 3402 criteria.add(ServicePeer.RECIPIENT_ID, getCustomerId()); 3406 if (!lastServicesRelatedByRecipientIdCriteria.equals(criteria)) 3407 { 3408 collServicesRelatedByRecipientId = ServicePeer.doSelect(criteria); 3409 } 3410 } 3411 } 3412 lastServicesRelatedByRecipientIdCriteria = criteria; 3413 3414 return collServicesRelatedByRecipientId; 3415 } 3416 3417 3425 public List getServicesRelatedByRecipientId(Connection con) throws TorqueException 3426 { 3427 if (collServicesRelatedByRecipientId == null) 3428 { 3429 collServicesRelatedByRecipientId = getServicesRelatedByRecipientId(new Criteria(10), con); 3430 } 3431 return collServicesRelatedByRecipientId; 3432 } 3433 3434 3446 public List getServicesRelatedByRecipientId(Criteria criteria, Connection con) 3447 throws TorqueException 3448 { 3449 if (collServicesRelatedByRecipientId == null) 3450 { 3451 if (isNew()) 3452 { 3453 collServicesRelatedByRecipientId = new ArrayList (); 3454 } 3455 else 3456 { 3457 criteria.add(ServicePeer.RECIPIENT_ID, getCustomerId()); 3458 collServicesRelatedByRecipientId = ServicePeer.doSelect(criteria, con); 3459 } 3460 } 3461 else 3462 { 3463 if (!isNew()) 3465 { 3466 criteria.add(ServicePeer.RECIPIENT_ID, getCustomerId()); 3470 if (!lastServicesRelatedByRecipientIdCriteria.equals(criteria)) 3471 { 3472 collServicesRelatedByRecipientId = ServicePeer.doSelect(criteria, con); 3473 } 3474 } 3475 } 3476 lastServicesRelatedByRecipientIdCriteria = criteria; 3477 3478 return collServicesRelatedByRecipientId; 3479 } 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3502 protected List getServicesRelatedByRecipientIdJoinCustomerRelatedByCustomerId(Criteria criteria) 3503 throws TorqueException 3504 { 3505 if (collServicesRelatedByRecipientId == null) 3506 { 3507 if (isNew()) 3508 { 3509 collServicesRelatedByRecipientId = new ArrayList (); 3510 } 3511 else 3512 { 3513 criteria.add(ServicePeer.RECIPIENT_ID, getCustomerId()); 3514 collServicesRelatedByRecipientId = ServicePeer.doSelectJoinCustomerRelatedByCustomerId(criteria); 3515 } 3516 } 3517 else 3518 { 3519 3523 criteria.add(ServicePeer.RECIPIENT_ID, getCustomerId()); 3524 if (!lastServicesRelatedByRecipientIdCriteria.equals(criteria)) 3525 { 3526 collServicesRelatedByRecipientId = ServicePeer.doSelectJoinCustomerRelatedByCustomerId(criteria); 3527 } 3528 } 3529 lastServicesRelatedByRecipientIdCriteria = criteria; 3530 3531 return collServicesRelatedByRecipientId; 3532 } 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3561 protected List getServicesRelatedByRecipientIdJoinProject(Criteria criteria) 3562 throws TorqueException 3563 { 3564 if (collServicesRelatedByRecipientId == null) 3565 { 3566 if (isNew()) 3567 { 3568 collServicesRelatedByRecipientId = new ArrayList (); 3569 } 3570 else 3571 { 3572 criteria.add(ServicePeer.RECIPIENT_ID, getCustomerId()); 3573 collServicesRelatedByRecipientId = ServicePeer.doSelectJoinProject(criteria); 3574 } 3575 } 3576 else 3577 { 3578 3582 criteria.add(ServicePeer.RECIPIENT_ID, getCustomerId()); 3583 if (!lastServicesRelatedByRecipientIdCriteria.equals(criteria)) 3584 { 3585 collServicesRelatedByRecipientId = ServicePeer.doSelectJoinProject(criteria); 3586 } 3587 } 3588 lastServicesRelatedByRecipientIdCriteria = criteria; 3589 3590 return collServicesRelatedByRecipientId; 3591 } 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3612 protected List getServicesRelatedByRecipientIdJoinSorder(Criteria criteria) 3613 throws TorqueException 3614 { 3615 if (collServicesRelatedByRecipientId == null) 3616 { 3617 if (isNew()) 3618 { 3619 collServicesRelatedByRecipientId = new ArrayList (); 3620 } 3621 else 3622 { 3623 criteria.add(ServicePeer.RECIPIENT_ID, getCustomerId()); 3624 collServicesRelatedByRecipientId = ServicePeer.doSelectJoinSorder(criteria); 3625 } 3626 } 3627 else 3628 { 3629 3633 criteria.add(ServicePeer.RECIPIENT_ID, getCustomerId()); 3634 if (!lastServicesRelatedByRecipientIdCriteria.equals(criteria)) 3635 { 3636 collServicesRelatedByRecipientId = ServicePeer.doSelectJoinSorder(criteria); 3637 } 3638 } 3639 lastServicesRelatedByRecipientIdCriteria = criteria; 3640 3641 return collServicesRelatedByRecipientId; 3642 } 3643 3644 3645 3646 3647 3648 3651 protected List collShipmentsRelatedByCustomerId; 3652 3653 3658 protected void initShipmentsRelatedByCustomerId() 3659 { 3660 if (collShipmentsRelatedByCustomerId == null) 3661 { 3662 collShipmentsRelatedByCustomerId = new ArrayList (); 3663 } 3664 } 3665 3666 3673 public void addShipmentRelatedByCustomerId(Shipment l) throws TorqueException 3674 { 3675 getShipmentsRelatedByCustomerId().add(l); 3676 l.setCustomerRelatedByCustomerId((Customer) this); 3677 } 3678 3679 3682 private Criteria lastShipmentsRelatedByCustomerIdCriteria = null; 3683 3684 3691 public List getShipmentsRelatedByCustomerId() throws TorqueException 3692 { 3693 if (collShipmentsRelatedByCustomerId == null) 3694 { 3695 collShipmentsRelatedByCustomerId = getShipmentsRelatedByCustomerId(new Criteria(10)); 3696 } 3697 return collShipmentsRelatedByCustomerId; 3698 } 3699 3700 3711 public List getShipmentsRelatedByCustomerId(Criteria criteria) throws TorqueException 3712 { 3713 if (collShipmentsRelatedByCustomerId == null) 3714 { 3715 if (isNew()) 3716 { 3717 collShipmentsRelatedByCustomerId = new ArrayList (); 3718 } 3719 else 3720 { 3721 criteria.add(ShipmentPeer.CUSTOMER_ID, getCustomerId() ); 3722 collShipmentsRelatedByCustomerId = ShipmentPeer.doSelect(criteria); 3723 } 3724 } 3725 else 3726 { 3727 if (!isNew()) 3729 { 3730 criteria.add(ShipmentPeer.CUSTOMER_ID, getCustomerId()); 3734 if (!lastShipmentsRelatedByCustomerIdCriteria.equals(criteria)) 3735 { 3736 collShipmentsRelatedByCustomerId = ShipmentPeer.doSelect(criteria); 3737 } 3738 } 3739 } 3740 lastShipmentsRelatedByCustomerIdCriteria = criteria; 3741 3742 return collShipmentsRelatedByCustomerId; 3743 } 3744 3745 3753 public List getShipmentsRelatedByCustomerId(Connection con) throws TorqueException 3754 { 3755 if (collShipmentsRelatedByCustomerId == null) 3756 { 3757 collShipmentsRelatedByCustomerId = getShipmentsRelatedByCustomerId(new Criteria(10), con); 3758 } 3759 return collShipmentsRelatedByCustomerId; 3760 } 3761 3762 3774 public List getShipmentsRelatedByCustomerId(Criteria criteria, Connection con) 3775 throws TorqueException 3776 { 3777 if (collShipmentsRelatedByCustomerId == null) 3778 { 3779 if (isNew()) 3780 { 3781 collShipmentsRelatedByCustomerId = new ArrayList (); 3782 } 3783 else 3784 { 3785 criteria.add(ShipmentPeer.CUSTOMER_ID, getCustomerId()); 3786 collShipmentsRelatedByCustomerId = ShipmentPeer.doSelect(criteria, con); 3787 } 3788 } 3789 else 3790 { 3791 if (!isNew()) 3793 { 3794 criteria.add(ShipmentPeer.CUSTOMER_ID, getCustomerId()); 3798 if (!lastShipmentsRelatedByCustomerIdCriteria.equals(criteria)) 3799 { 3800 collShipmentsRelatedByCustomerId = ShipmentPeer.doSelect(criteria, con); 3801 } 3802 } 3803 } 3804 lastShipmentsRelatedByCustomerIdCriteria = criteria; 3805 3806 return collShipmentsRelatedByCustomerId; 3807 } 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3838 protected List getShipmentsRelatedByCustomerIdJoinCustomerRelatedByRecipientId(Criteria criteria) 3839 throws TorqueException 3840 { 3841 if (collShipmentsRelatedByCustomerId == null) 3842 { 3843 if (isNew()) 3844 { 3845 collShipmentsRelatedByCustomerId = new ArrayList (); 3846 } 3847 else 3848 { 3849 criteria.add(ShipmentPeer.CUSTOMER_ID, getCustomerId()); 3850 collShipmentsRelatedByCustomerId = ShipmentPeer.doSelectJoinCustomerRelatedByRecipientId(criteria); 3851 } 3852 } 3853 else 3854 { 3855 3859 criteria.add(ShipmentPeer.CUSTOMER_ID, getCustomerId()); 3860 if (!lastShipmentsRelatedByCustomerIdCriteria.equals(criteria)) 3861 { 3862 collShipmentsRelatedByCustomerId = ShipmentPeer.doSelectJoinCustomerRelatedByRecipientId(criteria); 3863 } 3864 } 3865 lastShipmentsRelatedByCustomerIdCriteria = criteria; 3866 3867 return collShipmentsRelatedByCustomerId; 3868 } 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3889 protected List getShipmentsRelatedByCustomerIdJoinProject(Criteria criteria) 3890 throws TorqueException 3891 { 3892 if (collShipmentsRelatedByCustomerId == null) 3893 { 3894 if (isNew()) 3895 { 3896 collShipmentsRelatedByCustomerId = new ArrayList (); 3897 } 3898 else 3899 { 3900 criteria.add(ShipmentPeer.CUSTOMER_ID, getCustomerId()); 3901 collShipmentsRelatedByCustomerId = ShipmentPeer.doSelectJoinProject(criteria); 3902 } 3903 } 3904 else 3905 { 3906 3910 criteria.add(ShipmentPeer.CUSTOMER_ID, getCustomerId()); 3911 if (!lastShipmentsRelatedByCustomerIdCriteria.equals(criteria)) 3912 { 3913 collShipmentsRelatedByCustomerId = ShipmentPeer.doSelectJoinProject(criteria); 3914 } 3915 } 3916 lastShipmentsRelatedByCustomerIdCriteria = criteria; 3917 3918 return collShipmentsRelatedByCustomerId; 3919 } 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3940 protected List getShipmentsRelatedByCustomerIdJoinSorder(Criteria criteria) 3941 throws TorqueException 3942 { 3943 if (collShipmentsRelatedByCustomerId == null) 3944 { 3945 if (isNew()) 3946 { 3947 collShipmentsRelatedByCustomerId = new ArrayList (); 3948 } 3949 else 3950 { 3951 criteria.add(ShipmentPeer.CUSTOMER_ID, getCustomerId()); 3952 collShipmentsRelatedByCustomerId = ShipmentPeer.doSelectJoinSorder(criteria); 3953 } 3954 } 3955 else 3956 { 3957 3961 criteria.add(ShipmentPeer.CUSTOMER_ID, getCustomerId()); 3962 if (!lastShipmentsRelatedByCustomerIdCriteria.equals(criteria)) 3963 { 3964 collShipmentsRelatedByCustomerId = ShipmentPeer.doSelectJoinSorder(criteria); 3965 } 3966 } 3967 lastShipmentsRelatedByCustomerIdCriteria = criteria; 3968 3969 return collShipmentsRelatedByCustomerId; 3970 } 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3991 protected List getShipmentsRelatedByCustomerIdJoinCarrier(Criteria criteria) 3992 throws TorqueException 3993 { 3994 if (collShipmentsRelatedByCustomerId == null) 3995 { 3996 if (isNew()) 3997 { 3998 collShipmentsRelatedByCustomerId = new ArrayList (); 3999 } 4000 else 4001 { 4002 criteria.add(ShipmentPeer.CUSTOMER_ID, getCustomerId()); 4003 collShipmentsRelatedByCustomerId = ShipmentPeer.doSelectJoinCarrier(criteria); 4004 } 4005 } 4006 else 4007 { 4008 4012 criteria.add(ShipmentPeer.CUSTOMER_ID, getCustomerId()); 4013 if (!lastShipmentsRelatedByCustomerIdCriteria.equals(criteria)) 4014 { 4015 collShipmentsRelatedByCustomerId = ShipmentPeer.doSelectJoinCarrier(criteria); 4016 } 4017 } 4018 lastShipmentsRelatedByCustomerIdCriteria = criteria; 4019 4020 return collShipmentsRelatedByCustomerId; 4021 } 4022 4023 4024 4025 4026 4027 4030 protected List collShipmentsRelatedByRecipientId; 4031 4032 4037 protected void initShipmentsRelatedByRecipientId() 4038 { 4039 if (collShipmentsRelatedByRecipientId == null) 4040 { 4041 collShipmentsRelatedByRecipientId = new ArrayList (); 4042 } 4043 } 4044 4045 4052 public void addShipmentRelatedByRecipientId(Shipment l) throws TorqueException 4053 { 4054 getShipmentsRelatedByRecipientId().add(l); 4055 l.setCustomerRelatedByRecipientId((Customer) this); 4056 } 4057 4058 4061 private Criteria lastShipmentsRelatedByRecipientIdCriteria = null; 4062 4063 4070 public List getShipmentsRelatedByRecipientId() throws TorqueException 4071 { 4072 if (collShipmentsRelatedByRecipientId == null) 4073 { 4074 collShipmentsRelatedByRecipientId = getShipmentsRelatedByRecipientId(new Criteria(10)); 4075 } 4076 return collShipmentsRelatedByRecipientId; 4077 } 4078 4079 4090 public List getShipmentsRelatedByRecipientId(Criteria criteria) throws TorqueException 4091 { 4092 if (collShipmentsRelatedByRecipientId == null) 4093 { 4094 if (isNew()) 4095 { 4096 collShipmentsRelatedByRecipientId = new ArrayList (); 4097 } 4098 else 4099 { 4100 criteria.add(ShipmentPeer.RECIPIENT_ID, getCustomerId() ); 4101 collShipmentsRelatedByRecipientId = ShipmentPeer.doSelect(criteria); 4102 } 4103 } 4104 else 4105 { 4106 if (!isNew()) 4108 { 4109 criteria.add(ShipmentPeer.RECIPIENT_ID, getCustomerId()); 4113 if (!lastShipmentsRelatedByRecipientIdCriteria.equals(criteria)) 4114 { 4115 collShipmentsRelatedByRecipientId = ShipmentPeer.doSelect(criteria); 4116 } 4117 } 4118 } 4119 lastShipmentsRelatedByRecipientIdCriteria = criteria; 4120 4121 return collShipmentsRelatedByRecipientId; 4122 } 4123 4124 4132 public List getShipmentsRelatedByRecipientId(Connection con) throws TorqueException 4133 { 4134 if (collShipmentsRelatedByRecipientId == null) 4135 { 4136 collShipmentsRelatedByRecipientId = getShipmentsRelatedByRecipientId(new Criteria(10), con); 4137 } 4138 return collShipmentsRelatedByRecipientId; 4139 } 4140 4141 4153 public List getShipmentsRelatedByRecipientId(Criteria criteria, Connection con) 4154 throws TorqueException 4155 { 4156 if (collShipmentsRelatedByRecipientId == null) 4157 { 4158 if (isNew()) 4159 { 4160 collShipmentsRelatedByRecipientId = new ArrayList (); 4161 } 4162 else 4163 { 4164 criteria.add(ShipmentPeer.RECIPIENT_ID, getCustomerId()); 4165 collShipmentsRelatedByRecipientId = ShipmentPeer.doSelect(criteria, con); 4166 } 4167 } 4168 else 4169 { 4170 if (!isNew()) 4172 { 4173 criteria.add(ShipmentPeer.RECIPIENT_ID, getCustomerId()); 4177 if (!lastShipmentsRelatedByRecipientIdCriteria.equals(criteria)) 4178 { 4179 collShipmentsRelatedByRecipientId = ShipmentPeer.doSelect(criteria, con); 4180 } 4181 } 4182 } 4183 lastShipmentsRelatedByRecipientIdCriteria = criteria; 4184 4185 return collShipmentsRelatedByRecipientId; 4186 } 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4209 protected List getShipmentsRelatedByRecipientIdJoinCustomerRelatedByCustomerId(Criteria criteria) 4210 throws TorqueException 4211 { 4212 if (collShipmentsRelatedByRecipientId == null) 4213 { 4214 if (isNew()) 4215 { 4216 collShipmentsRelatedByRecipientId = new ArrayList (); 4217 } 4218 else 4219 { 4220 criteria.add(ShipmentPeer.RECIPIENT_ID, getCustomerId()); 4221 collShipmentsRelatedByRecipientId = ShipmentPeer.doSelectJoinCustomerRelatedByCustomerId(criteria); 4222 } 4223 } 4224 else 4225 { 4226 4230 criteria.add(ShipmentPeer.RECIPIENT_ID, getCustomerId()); 4231 if (!lastShipmentsRelatedByRecipientIdCriteria.equals(criteria)) 4232 { 4233 collShipmentsRelatedByRecipientId = ShipmentPeer.doSelectJoinCustomerRelatedByCustomerId(criteria); 4234 } 4235 } 4236 lastShipmentsRelatedByRecipientIdCriteria = criteria; 4237 4238 return collShipmentsRelatedByRecipientId; 4239 } 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4268 protected List getShipmentsRelatedByRecipientIdJoinProject(Criteria criteria) 4269 throws TorqueException 4270 { 4271 if (collShipmentsRelatedByRecipientId == null) 4272 { 4273 if (isNew()) 4274 { 4275 collShipmentsRelatedByRecipientId = new ArrayList (); 4276 } 4277 else 4278 { 4279 criteria.add(ShipmentPeer.RECIPIENT_ID, getCustomerId()); 4280 collShipmentsRelatedByRecipientId = ShipmentPeer.doSelectJoinProject(criteria); 4281 } 4282 } 4283 else 4284 { 4285 4289 criteria.add(ShipmentPeer.RECIPIENT_ID, getCustomerId()); 4290 if (!lastShipmentsRelatedByRecipientIdCriteria.equals(criteria)) 4291 { 4292 collShipmentsRelatedByRecipientId = ShipmentPeer.doSelectJoinProject(criteria); 4293 } 4294 } 4295 lastShipmentsRelatedByRecipientIdCriteria = criteria; 4296 4297 return collShipmentsRelatedByRecipientId; 4298 } 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4319 protected List getShipmentsRelatedByRecipientIdJoinSorder(Criteria criteria) 4320 throws TorqueException 4321 { 4322 if (collShipmentsRelatedByRecipientId == null) 4323 { 4324 if (isNew()) 4325 { 4326 collShipmentsRelatedByRecipientId = new ArrayList (); 4327 } 4328 else 4329 { 4330 criteria.add(ShipmentPeer.RECIPIENT_ID, getCustomerId()); 4331 collShipmentsRelatedByRecipientId = ShipmentPeer.doSelectJoinSorder(criteria); 4332 } 4333 } 4334 else 4335 { 4336 4340 criteria.add(ShipmentPeer.RECIPIENT_ID, getCustomerId()); 4341 if (!lastShipmentsRelatedByRecipientIdCriteria.equals(criteria)) 4342 { 4343 collShipmentsRelatedByRecipientId = ShipmentPeer.doSelectJoinSorder(criteria); 4344 } 4345 } 4346 lastShipmentsRelatedByRecipientIdCriteria = criteria; 4347 4348 return collShipmentsRelatedByRecipientId; 4349 } 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4370 protected List getShipmentsRelatedByRecipientIdJoinCarrier(Criteria criteria) 4371 throws TorqueException 4372 { 4373 if (collShipmentsRelatedByRecipientId == null) 4374 { 4375 if (isNew()) 4376 { 4377 collShipmentsRelatedByRecipientId = new ArrayList (); 4378 } 4379 else 4380 { 4381 criteria.add(ShipmentPeer.RECIPIENT_ID, getCustomerId()); 4382 collShipmentsRelatedByRecipientId = ShipmentPeer.doSelectJoinCarrier(criteria); 4383 } 4384 } 4385 else 4386 { 4387 4391 criteria.add(ShipmentPeer.RECIPIENT_ID, getCustomerId()); 4392 if (!lastShipmentsRelatedByRecipientIdCriteria.equals(criteria)) 4393 { 4394 collShipmentsRelatedByRecipientId = ShipmentPeer.doSelectJoinCarrier(criteria); 4395 } 4396 } 4397 lastShipmentsRelatedByRecipientIdCriteria = criteria; 4398 4399 return collShipmentsRelatedByRecipientId; 4400 } 4401 4402 4403 4404 4405 4406 4409 protected List collPrintSubscriptionsRelatedByCustomerId; 4410 4411 4416 protected void initPrintSubscriptionsRelatedByCustomerId() 4417 { 4418 if (collPrintSubscriptionsRelatedByCustomerId == null) 4419 { 4420 collPrintSubscriptionsRelatedByCustomerId = new ArrayList (); 4421 } 4422 } 4423 4424 4431 public void addPrintSubscriptionRelatedByCustomerId(PrintSubscription l) throws TorqueException 4432 { 4433 getPrintSubscriptionsRelatedByCustomerId().add(l); 4434 l.setCustomerRelatedByCustomerId((Customer) this); 4435 } 4436 4437 4440 private Criteria lastPrintSubscriptionsRelatedByCustomerIdCriteria = null; 4441 4442 4449 public List getPrintSubscriptionsRelatedByCustomerId() throws TorqueException 4450 { 4451 if (collPrintSubscriptionsRelatedByCustomerId == null) 4452 { 4453 collPrintSubscriptionsRelatedByCustomerId = getPrintSubscriptionsRelatedByCustomerId(new Criteria(10)); 4454 } 4455 return collPrintSubscriptionsRelatedByCustomerId; 4456 } 4457 4458 4469 public List getPrintSubscriptionsRelatedByCustomerId(Criteria criteria) throws TorqueException 4470 { 4471 if (collPrintSubscriptionsRelatedByCustomerId == null) 4472 { 4473 if (isNew()) 4474 { 4475 collPrintSubscriptionsRelatedByCustomerId = new ArrayList (); 4476 } 4477 else 4478 { 4479 criteria.add(PrintSubscriptionPeer.CUSTOMER_ID, getCustomerId() ); 4480 collPrintSubscriptionsRelatedByCustomerId = PrintSubscriptionPeer.doSelect(criteria); 4481 } 4482 } 4483 else 4484 { 4485 if (!isNew()) 4487 { 4488 criteria.add(PrintSubscriptionPeer.CUSTOMER_ID, getCustomerId()); 4492 if (!lastPrintSubscriptionsRelatedByCustomerIdCriteria.equals(criteria)) 4493 { 4494 collPrintSubscriptionsRelatedByCustomerId = PrintSubscriptionPeer.doSelect(criteria); 4495 } 4496 } 4497 } 4498 lastPrintSubscriptionsRelatedByCustomerIdCriteria = criteria; 4499 4500 return collPrintSubscriptionsRelatedByCustomerId; 4501 } 4502 4503 4511 public List getPrintSubscriptionsRelatedByCustomerId(Connection con) throws TorqueException 4512 { 4513 if (collPrintSubscriptionsRelatedByCustomerId == null) 4514 { 4515 collPrintSubscriptionsRelatedByCustomerId = getPrintSubscriptionsRelatedByCustomerId(new Criteria(10), con); 4516 } 4517 return collPrintSubscriptionsRelatedByCustomerId; 4518 } 4519 4520 4532 public List getPrintSubscriptionsRelatedByCustomerId(Criteria criteria, Connection con) 4533 throws TorqueException 4534 { 4535 if (collPrintSubscriptionsRelatedByCustomerId == null) 4536 { 4537 if (isNew()) 4538 { 4539 collPrintSubscriptionsRelatedByCustomerId = new ArrayList (); 4540 } 4541 else 4542 { 4543 criteria.add(PrintSubscriptionPeer.CUSTOMER_ID, getCustomerId()); 4544 collPrintSubscriptionsRelatedByCustomerId = PrintSubscriptionPeer.doSelect(criteria, con); 4545 } 4546 } 4547 else 4548 { 4549 if (!isNew()) 4551 { 4552 criteria.add(PrintSubscriptionPeer.CUSTOMER_ID, getCustomerId()); 4556 if (!lastPrintSubscriptionsRelatedByCustomerIdCriteria.equals(criteria)) 4557 { 4558 collPrintSubscriptionsRelatedByCustomerId = PrintSubscriptionPeer.doSelect(criteria, con); 4559 } 4560 } 4561 } 4562 lastPrintSubscriptionsRelatedByCustomerIdCriteria = criteria; 4563 4564 return collPrintSubscriptionsRelatedByCustomerId; 4565 } 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4596 protected List getPrintSubscriptionsRelatedByCustomerIdJoinCustomerRelatedByRecipientId(Criteria criteria) 4597 throws TorqueException 4598 { 4599 if (collPrintSubscriptionsRelatedByCustomerId == null) 4600 { 4601 if (isNew()) 4602 { 4603 collPrintSubscriptionsRelatedByCustomerId = new ArrayList (); 4604 } 4605 else 4606 { 4607 criteria.add(PrintSubscriptionPeer.CUSTOMER_ID, getCustomerId()); 4608 collPrintSubscriptionsRelatedByCustomerId = PrintSubscriptionPeer.doSelectJoinCustomerRelatedByRecipientId(criteria); 4609 } 4610 } 4611 else 4612 { 4613 4617 criteria.add(PrintSubscriptionPeer.CUSTOMER_ID, getCustomerId()); 4618 if (!lastPrintSubscriptionsRelatedByCustomerIdCriteria.equals(criteria)) 4619 { 4620 collPrintSubscriptionsRelatedByCustomerId = PrintSubscriptionPeer.doSelectJoinCustomerRelatedByRecipientId(criteria); 4621 } 4622 } 4623 lastPrintSubscriptionsRelatedByCustomerIdCriteria = criteria; 4624 4625 return collPrintSubscriptionsRelatedByCustomerId; 4626 } 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4647 protected List getPrintSubscriptionsRelatedByCustomerIdJoinCarrier(Criteria criteria) 4648 throws TorqueException 4649 { 4650 if (collPrintSubscriptionsRelatedByCustomerId == null) 4651 { 4652 if (isNew()) 4653 { 4654 collPrintSubscriptionsRelatedByCustomerId = new ArrayList (); 4655 } 4656 else 4657 { 4658 criteria.add(PrintSubscriptionPeer.CUSTOMER_ID, getCustomerId()); 4659 collPrintSubscriptionsRelatedByCustomerId = PrintSubscriptionPeer.doSelectJoinCarrier(criteria); 4660 } 4661 } 4662 else 4663 { 4664 4668 criteria.add(PrintSubscriptionPeer.CUSTOMER_ID, getCustomerId()); 4669 if (!lastPrintSubscriptionsRelatedByCustomerIdCriteria.equals(criteria)) 4670 { 4671 collPrintSubscriptionsRelatedByCustomerId = PrintSubscriptionPeer.doSelectJoinCarrier(criteria); 4672 } 4673 } 4674 lastPrintSubscriptionsRelatedByCustomerIdCriteria = criteria; 4675 4676 return collPrintSubscriptionsRelatedByCustomerId; 4677 } 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4698 protected List getPrintSubscriptionsRelatedByCustomerIdJoinProject(Criteria criteria) 4699 throws TorqueException 4700 { 4701 if (collPrintSubscriptionsRelatedByCustomerId == null) 4702 { 4703 if (isNew()) 4704 { 4705 collPrintSubscriptionsRelatedByCustomerId = new ArrayList (); 4706 } 4707 else 4708 { 4709 criteria.add(PrintSubscriptionPeer.CUSTOMER_ID, getCustomerId()); 4710 collPrintSubscriptionsRelatedByCustomerId = PrintSubscriptionPeer.doSelectJoinProject(criteria); 4711 } 4712 } 4713 else 4714 { 4715 4719 criteria.add(PrintSubscriptionPeer.CUSTOMER_ID, getCustomerId()); 4720 if (!lastPrintSubscriptionsRelatedByCustomerIdCriteria.equals(criteria)) 4721 { 4722 collPrintSubscriptionsRelatedByCustomerId = PrintSubscriptionPeer.doSelectJoinProject(criteria); 4723 } 4724 } 4725 lastPrintSubscriptionsRelatedByCustomerIdCriteria = criteria; 4726 4727 return collPrintSubscriptionsRelatedByCustomerId; 4728 } 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4749 protected List getPrintSubscriptionsRelatedByCustomerIdJoinProduct(Criteria criteria) 4750 throws TorqueException 4751 { 4752 if (collPrintSubscriptionsRelatedByCustomerId == null) 4753 { 4754 if (isNew()) 4755 { 4756 collPrintSubscriptionsRelatedByCustomerId = new ArrayList (); 4757 } 4758 else 4759 { 4760 criteria.add(PrintSubscriptionPeer.CUSTOMER_ID, getCustomerId()); 4761 collPrintSubscriptionsRelatedByCustomerId = PrintSubscriptionPeer.doSelectJoinProduct(criteria); 4762 } 4763 } 4764 else 4765 { 4766 4770 criteria.add(PrintSubscriptionPeer.CUSTOMER_ID, getCustomerId()); 4771 if (!lastPrintSubscriptionsRelatedByCustomerIdCriteria.equals(criteria)) 4772 { 4773 collPrintSubscriptionsRelatedByCustomerId = PrintSubscriptionPeer.doSelectJoinProduct(criteria); 4774 } 4775 } 4776 lastPrintSubscriptionsRelatedByCustomerIdCriteria = criteria; 4777 4778 return collPrintSubscriptionsRelatedByCustomerId; 4779 } 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4800 protected List getPrintSubscriptionsRelatedByCustomerIdJoinSorder(Criteria criteria) 4801 throws TorqueException 4802 { 4803 if (collPrintSubscriptionsRelatedByCustomerId == null) 4804 { 4805 if (isNew()) 4806 { 4807 collPrintSubscriptionsRelatedByCustomerId = new ArrayList (); 4808 } 4809 else 4810 { 4811 criteria.add(PrintSubscriptionPeer.CUSTOMER_ID, getCustomerId()); 4812 collPrintSubscriptionsRelatedByCustomerId = PrintSubscriptionPeer.doSelectJoinSorder(criteria); 4813 } 4814 } 4815 else 4816 { 4817 4821 criteria.add(PrintSubscriptionPeer.CUSTOMER_ID, getCustomerId()); 4822 if (!lastPrintSubscriptionsRelatedByCustomerIdCriteria.equals(criteria)) 4823 { 4824 collPrintSubscriptionsRelatedByCustomerId = PrintSubscriptionPeer.doSelectJoinSorder(criteria); 4825 } 4826 } 4827 lastPrintSubscriptionsRelatedByCustomerIdCriteria = criteria; 4828 4829 return collPrintSubscriptionsRelatedByCustomerId; 4830 } 4831 4832 4833 4834 4835 4836 4839 protected List collPrintSubscriptionsRelatedByRecipientId; 4840 4841 4846 protected void initPrintSubscriptionsRelatedByRecipientId() 4847 { 4848 if (collPrintSubscriptionsRelatedByRecipientId == null) 4849 { 4850 collPrintSubscriptionsRelatedByRecipientId = new ArrayList (); 4851 } 4852 } 4853 4854 4861 public void addPrintSubscriptionRelatedByRecipientId(PrintSubscription l) throws TorqueException 4862 { 4863 getPrintSubscriptionsRelatedByRecipientId().add(l); 4864 l.setCustomerRelatedByRecipientId((Customer) this); 4865 } 4866 4867 4870 private Criteria lastPrintSubscriptionsRelatedByRecipientIdCriteria = null; 4871 4872 4879 public List getPrintSubscriptionsRelatedByRecipientId() throws TorqueException 4880 { 4881 if (collPrintSubscriptionsRelatedByRecipientId == null) 4882 { 4883 collPrintSubscriptionsRelatedByRecipientId = getPrintSubscriptionsRelatedByRecipientId(new Criteria(10)); 4884 } 4885 return collPrintSubscriptionsRelatedByRecipientId; 4886 } 4887 4888 4899 public List getPrintSubscriptionsRelatedByRecipientId(Criteria criteria) throws TorqueException 4900 { 4901 if (collPrintSubscriptionsRelatedByRecipientId == null) 4902 { 4903 if (isNew()) 4904 { 4905 collPrintSubscriptionsRelatedByRecipientId = new ArrayList (); 4906 } 4907 else 4908 { 4909 criteria.add(PrintSubscriptionPeer.RECIPIENT_ID, getCustomerId() ); 4910 collPrintSubscriptionsRelatedByRecipientId = PrintSubscriptionPeer.doSelect(criteria); 4911 } 4912 } 4913 else 4914 { 4915 if (!isNew()) 4917 { 4918 criteria.add(PrintSubscriptionPeer.RECIPIENT_ID, getCustomerId()); 4922 if (!lastPrintSubscriptionsRelatedByRecipientIdCriteria.equals(criteria)) 4923 { 4924 collPrintSubscriptionsRelatedByRecipientId = PrintSubscriptionPeer.doSelect(criteria); 4925 } 4926 } 4927 } 4928 lastPrintSubscriptionsRelatedByRecipientIdCriteria = criteria; 4929 4930 return collPrintSubscriptionsRelatedByRecipientId; 4931 } 4932 4933 4941 public List getPrintSubscriptionsRelatedByRecipientId(Connection con) throws TorqueException 4942 { 4943 if (collPrintSubscriptionsRelatedByRecipientId == null) 4944 { 4945 collPrintSubscriptionsRelatedByRecipientId = getPrintSubscriptionsRelatedByRecipientId(new Criteria(10), con); 4946 } 4947 return collPrintSubscriptionsRelatedByRecipientId; 4948 } 4949 4950 4962 public List getPrintSubscriptionsRelatedByRecipientId(Criteria criteria, Connection con) 4963 throws TorqueException 4964 { 4965 if (collPrintSubscriptionsRelatedByRecipientId == null) 4966 { 4967 if (isNew()) 4968 { 4969 collPrintSubscriptionsRelatedByRecipientId = new ArrayList (); 4970 } 4971 else 4972 { 4973 criteria.add(PrintSubscriptionPeer.RECIPIENT_ID, getCustomerId()); 4974 collPrintSubscriptionsRelatedByRecipientId = PrintSubscriptionPeer.doSelect(criteria, con); 4975 } 4976 } 4977 else 4978 { 4979 if (!isNew()) 4981 { 4982 criteria.add(PrintSubscriptionPeer.RECIPIENT_ID, getCustomerId()); 4986 if (!lastPrintSubscriptionsRelatedByRecipientIdCriteria.equals(criteria)) 4987 { 4988 collPrintSubscriptionsRelatedByRecipientId = PrintSubscriptionPeer.doSelect(criteria, con); 4989 } 4990 } 4991 } 4992 lastPrintSubscriptionsRelatedByRecipientIdCriteria = criteria; 4993 4994 return collPrintSubscriptionsRelatedByRecipientId; 4995 } 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5018 protected List getPrintSubscriptionsRelatedByRecipientIdJoinCustomerRelatedByCustomerId(Criteria criteria) 5019 throws TorqueException 5020 { 5021 if (collPrintSubscriptionsRelatedByRecipientId == null) 5022 { 5023 if (isNew()) 5024 { 5025 collPrintSubscriptionsRelatedByRecipientId = new ArrayList (); 5026 } 5027 else 5028 { 5029 criteria.add(PrintSubscriptionPeer.RECIPIENT_ID, getCustomerId()); 5030 collPrintSubscriptionsRelatedByRecipientId = PrintSubscriptionPeer.doSelectJoinCustomerRelatedByCustomerId(criteria); 5031 } 5032 } 5033 else 5034 { 5035 5039 criteria.add(PrintSubscriptionPeer.RECIPIENT_ID, getCustomerId()); 5040 if (!lastPrintSubscriptionsRelatedByRecipientIdCriteria.equals(criteria)) 5041 { 5042 collPrintSubscriptionsRelatedByRecipientId = PrintSubscriptionPeer.doSelectJoinCustomerRelatedByCustomerId(criteria); 5043 } 5044 } 5045 lastPrintSubscriptionsRelatedByRecipientIdCriteria = criteria; 5046 5047 return collPrintSubscriptionsRelatedByRecipientId; 5048 } 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5077 protected List getPrintSubscriptionsRelatedByRecipientIdJoinCarrier(Criteria criteria) 5078 throws TorqueException 5079 { 5080 if (collPrintSubscriptionsRelatedByRecipientId == null) 5081 { 5082 if (isNew()) 5083 { 5084 collPrintSubscriptionsRelatedByRecipientId = new ArrayList (); 5085 } 5086 else 5087 { 5088 criteria.add(PrintSubscriptionPeer.RECIPIENT_ID, getCustomerId()); 5089 collPrintSubscriptionsRelatedByRecipientId = PrintSubscriptionPeer.doSelectJoinCarrier(criteria); 5090 } 5091 } 5092 else 5093 { 5094 5098 criteria.add(PrintSubscriptionPeer.RECIPIENT_ID, getCustomerId()); 5099 if (!lastPrintSubscriptionsRelatedByRecipientIdCriteria.equals(criteria)) 5100 { 5101 collPrintSubscriptionsRelatedByRecipientId = PrintSubscriptionPeer.doSelectJoinCarrier(criteria); 5102 } 5103 } 5104 lastPrintSubscriptionsRelatedByRecipientIdCriteria = criteria; 5105 5106 return collPrintSubscriptionsRelatedByRecipientId; 5107 } 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5128 protected List getPrintSubscriptionsRelatedByRecipientIdJoinProject(Criteria criteria) 5129 throws TorqueException 5130 { 5131 if (collPrintSubscriptionsRelatedByRecipientId == null) 5132 { 5133 if (isNew()) 5134 { 5135 collPrintSubscriptionsRelatedByRecipientId = new ArrayList (); 5136 } 5137 else 5138 { 5139 criteria.add(PrintSubscriptionPeer.RECIPIENT_ID, getCustomerId()); 5140 collPrintSubscriptionsRelatedByRecipientId = PrintSubscriptionPeer.doSelectJoinProject(criteria); 5141 } 5142 } 5143 else 5144 { 5145 5149 criteria.add(PrintSubscriptionPeer.RECIPIENT_ID, getCustomerId()); 5150 if (!lastPrintSubscriptionsRelatedByRecipientIdCriteria.equals(criteria)) 5151 { 5152 collPrintSubscriptionsRelatedByRecipientId = PrintSubscriptionPeer.doSelectJoinProject(criteria); 5153 } 5154 } 5155 lastPrintSubscriptionsRelatedByRecipientIdCriteria = criteria; 5156 5157 return collPrintSubscriptionsRelatedByRecipientId; 5158 } 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5179 protected List getPrintSubscriptionsRelatedByRecipientIdJoinProduct(Criteria criteria) 5180 throws TorqueException 5181 { 5182 if (collPrintSubscriptionsRelatedByRecipientId == null) 5183 { 5184 if (isNew()) 5185 { 5186 collPrintSubscriptionsRelatedByRecipientId = new ArrayList (); 5187 } 5188 else 5189 { 5190 criteria.add(PrintSubscriptionPeer.RECIPIENT_ID, getCustomerId()); 5191 collPrintSubscriptionsRelatedByRecipientId = PrintSubscriptionPeer.doSelectJoinProduct(criteria); 5192 } 5193 } 5194 else 5195 { 5196 5200 criteria.add(PrintSubscriptionPeer.RECIPIENT_ID, getCustomerId()); 5201 if (!lastPrintSubscriptionsRelatedByRecipientIdCriteria.equals(criteria)) 5202 { 5203 collPrintSubscriptionsRelatedByRecipientId = PrintSubscriptionPeer.doSelectJoinProduct(criteria); 5204 } 5205 } 5206 lastPrintSubscriptionsRelatedByRecipientIdCriteria = criteria; 5207 5208 return collPrintSubscriptionsRelatedByRecipientId; 5209 } 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5230 protected List getPrintSubscriptionsRelatedByRecipientIdJoinSorder(Criteria criteria) 5231 throws TorqueException 5232 { 5233 if (collPrintSubscriptionsRelatedByRecipientId == null) 5234 { 5235 if (isNew()) 5236 { 5237 collPrintSubscriptionsRelatedByRecipientId = new ArrayList (); 5238 } 5239 else 5240 { 5241 criteria.add(PrintSubscriptionPeer.RECIPIENT_ID, getCustomerId()); 5242 collPrintSubscriptionsRelatedByRecipientId = PrintSubscriptionPeer.doSelectJoinSorder(criteria); 5243 } 5244 } 5245 else 5246 { 5247 5251 criteria.add(PrintSubscriptionPeer.RECIPIENT_ID, getCustomerId()); 5252 if (!lastPrintSubscriptionsRelatedByRecipientIdCriteria.equals(criteria)) 5253 { 5254 collPrintSubscriptionsRelatedByRecipientId = PrintSubscriptionPeer.doSelectJoinSorder(criteria); 5255 } 5256 } 5257 lastPrintSubscriptionsRelatedByRecipientIdCriteria = criteria; 5258 5259 return collPrintSubscriptionsRelatedByRecipientId; 5260 } 5261 5262 5263 5264 5265 5266 5269 protected List collOnlineSubscriptionsRelatedByCustomerId; 5270 5271 5276 protected void initOnlineSubscriptionsRelatedByCustomerId() 5277 { 5278 if (collOnlineSubscriptionsRelatedByCustomerId == null) 5279 { 5280 collOnlineSubscriptionsRelatedByCustomerId = new ArrayList (); 5281 } 5282 } 5283 5284 5291 public void addOnlineSubscriptionRelatedByCustomerId(OnlineSubscription l) throws TorqueException 5292 { 5293 getOnlineSubscriptionsRelatedByCustomerId().add(l); 5294 l.setCustomerRelatedByCustomerId((Customer) this); 5295 } 5296 5297 5300 private Criteria lastOnlineSubscriptionsRelatedByCustomerIdCriteria = null; 5301 5302 5309 public List getOnlineSubscriptionsRelatedByCustomerId() throws TorqueException 5310 { 5311 if (collOnlineSubscriptionsRelatedByCustomerId == null) 5312 { 5313 collOnlineSubscriptionsRelatedByCustomerId = getOnlineSubscriptionsRelatedByCustomerId(new Criteria(10)); 5314 } 5315 return collOnlineSubscriptionsRelatedByCustomerId; 5316 } 5317 5318 5329 public List getOnlineSubscriptionsRelatedByCustomerId(Criteria criteria) throws TorqueException 5330 { 5331 if (collOnlineSubscriptionsRelatedByCustomerId == null) 5332 { 5333 if (isNew()) 5334 { 5335 collOnlineSubscriptionsRelatedByCustomerId = new ArrayList (); 5336 } 5337 else 5338 { 5339 criteria.add(OnlineSubscriptionPeer.CUSTOMER_ID, getCustomerId() ); 5340 collOnlineSubscriptionsRelatedByCustomerId = OnlineSubscriptionPeer.doSelect(criteria); 5341 } 5342 } 5343 else 5344 { 5345 if (!isNew()) 5347 { 5348 criteria.add(OnlineSubscriptionPeer.CUSTOMER_ID, getCustomerId()); 5352 if (!lastOnlineSubscriptionsRelatedByCustomerIdCriteria.equals(criteria)) 5353 { 5354 collOnlineSubscriptionsRelatedByCustomerId = OnlineSubscriptionPeer.doSelect(criteria); 5355 } 5356 } 5357 } 5358 lastOnlineSubscriptionsRelatedByCustomerIdCriteria = criteria; 5359 5360 return collOnlineSubscriptionsRelatedByCustomerId; 5361 } 5362 5363 5371 public List getOnlineSubscriptionsRelatedByCustomerId(Connection con) throws TorqueException 5372 { 5373 if (collOnlineSubscriptionsRelatedByCustomerId == null) 5374 { 5375 collOnlineSubscriptionsRelatedByCustomerId = getOnlineSubscriptionsRelatedByCustomerId(new Criteria(10), con); 5376 } 5377 return collOnlineSubscriptionsRelatedByCustomerId; 5378 } 5379 5380 5392 public List getOnlineSubscriptionsRelatedByCustomerId(Criteria criteria, Connection con) 5393 throws TorqueException 5394 { 5395 if (collOnlineSubscriptionsRelatedByCustomerId == null) 5396 { 5397 if (isNew()) 5398 { 5399 collOnlineSubscriptionsRelatedByCustomerId = new ArrayList (); 5400 } 5401 else 5402 { 5403 criteria.add(OnlineSubscriptionPeer.CUSTOMER_ID, getCustomerId()); 5404 collOnlineSubscriptionsRelatedByCustomerId = OnlineSubscriptionPeer.doSelect(criteria, con); 5405 } 5406 } 5407 else 5408 { 5409 if (!isNew()) 5411 { 5412 criteria.add(OnlineSubscriptionPeer.CUSTOMER_ID, getCustomerId()); 5416 if (!lastOnlineSubscriptionsRelatedByCustomerIdCriteria.equals(criteria)) 5417 { 5418 collOnlineSubscriptionsRelatedByCustomerId = OnlineSubscriptionPeer.doSelect(criteria, con); 5419 } 5420 } 5421 } 5422 lastOnlineSubscriptionsRelatedByCustomerIdCriteria = criteria; 5423 5424 return collOnlineSubscriptionsRelatedByCustomerId; 5425 } 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5456 protected List getOnlineSubscriptionsRelatedByCustomerIdJoinCustomerRelatedByRecipientId(Criteria criteria) 5457 throws TorqueException 5458 { 5459 if (collOnlineSubscriptionsRelatedByCustomerId == null) 5460 { 5461 if (isNew()) 5462 { 5463 collOnlineSubscriptionsRelatedByCustomerId = new ArrayList (); 5464 } 5465 else 5466 { 5467 criteria.add(OnlineSubscriptionPeer.CUSTOMER_ID, getCustomerId()); 5468 collOnlineSubscriptionsRelatedByCustomerId = OnlineSubscriptionPeer.doSelectJoinCustomerRelatedByRecipientId(criteria); 5469 } 5470 } 5471 else 5472 { 5473 5477 criteria.add(OnlineSubscriptionPeer.CUSTOMER_ID, getCustomerId()); 5478 if (!lastOnlineSubscriptionsRelatedByCustomerIdCriteria.equals(criteria)) 5479 { 5480 collOnlineSubscriptionsRelatedByCustomerId = OnlineSubscriptionPeer.doSelectJoinCustomerRelatedByRecipientId(criteria); 5481 } 5482 } 5483 lastOnlineSubscriptionsRelatedByCustomerIdCriteria = criteria; 5484 5485 return collOnlineSubscriptionsRelatedByCustomerId; 5486 } 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5507 protected List getOnlineSubscriptionsRelatedByCustomerIdJoinProject(Criteria criteria) 5508 throws TorqueException 5509 { 5510 if (collOnlineSubscriptionsRelatedByCustomerId == null) 5511 { 5512 if (isNew()) 5513 { 5514 collOnlineSubscriptionsRelatedByCustomerId = new ArrayList (); 5515 } 5516 else 5517 { 5518 criteria.add(OnlineSubscriptionPeer.CUSTOMER_ID, getCustomerId()); 5519 collOnlineSubscriptionsRelatedByCustomerId = OnlineSubscriptionPeer.doSelectJoinProject(criteria); 5520 } 5521 } 5522 else 5523 { 5524 5528 criteria.add(OnlineSubscriptionPeer.CUSTOMER_ID, getCustomerId()); 5529 if (!lastOnlineSubscriptionsRelatedByCustomerIdCriteria.equals(criteria)) 5530 { 5531 collOnlineSubscriptionsRelatedByCustomerId = OnlineSubscriptionPeer.doSelectJoinProject(criteria); 5532 } 5533 } 5534 lastOnlineSubscriptionsRelatedByCustomerIdCriteria = criteria; 5535 5536 return collOnlineSubscriptionsRelatedByCustomerId; 5537 } 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5558 protected List getOnlineSubscriptionsRelatedByCustomerIdJoinProduct(Criteria criteria) 5559 throws TorqueException 5560 { 5561 if (collOnlineSubscriptionsRelatedByCustomerId == null) 5562 { 5563 if (isNew()) 5564 { 5565 collOnlineSubscriptionsRelatedByCustomerId = new ArrayList (); 5566 } 5567 else 5568 { 5569 criteria.add(OnlineSubscriptionPeer.CUSTOMER_ID, getCustomerId()); 5570 collOnlineSubscriptionsRelatedByCustomerId = OnlineSubscriptionPeer.doSelectJoinProduct(criteria); 5571 } 5572 } 5573 else 5574 { 5575 5579 criteria.add(OnlineSubscriptionPeer.CUSTOMER_ID, getCustomerId()); 5580 if (!lastOnlineSubscriptionsRelatedByCustomerIdCriteria.equals(criteria)) 5581 { 5582 collOnlineSubscriptionsRelatedByCustomerId = OnlineSubscriptionPeer.doSelectJoinProduct(criteria); 5583 } 5584 } 5585 lastOnlineSubscriptionsRelatedByCustomerIdCriteria = criteria; 5586 5587 return collOnlineSubscriptionsRelatedByCustomerId; 5588 } 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5609 protected List getOnlineSubscriptionsRelatedByCustomerIdJoinSorder(Criteria criteria) 5610 throws TorqueException 5611 { 5612 if (collOnlineSubscriptionsRelatedByCustomerId == null) 5613 { 5614 if (isNew()) 5615 { 5616 collOnlineSubscriptionsRelatedByCustomerId = new ArrayList (); 5617 } 5618 else 5619 { 5620 criteria.add(OnlineSubscriptionPeer.CUSTOMER_ID, getCustomerId()); 5621 collOnlineSubscriptionsRelatedByCustomerId = OnlineSubscriptionPeer.doSelectJoinSorder(criteria); 5622 } 5623 } 5624 else 5625 { 5626 5630 criteria.add(OnlineSubscriptionPeer.CUSTOMER_ID, getCustomerId()); 5631 if (!lastOnlineSubscriptionsRelatedByCustomerIdCriteria.equals(criteria)) 5632 { 5633 collOnlineSubscriptionsRelatedByCustomerId = OnlineSubscriptionPeer.doSelectJoinSorder(criteria); 5634 } 5635 } 5636 lastOnlineSubscriptionsRelatedByCustomerIdCriteria = criteria; 5637 5638 return collOnlineSubscriptionsRelatedByCustomerId; 5639 } 5640 5641 5642 5643 5644 5645 5648 protected List collOnlineSubscriptionsRelatedByRecipientId; 5649 5650 5655 protected void initOnlineSubscriptionsRelatedByRecipientId() 5656 { 5657 if (collOnlineSubscriptionsRelatedByRecipientId == null) 5658 { 5659 collOnlineSubscriptionsRelatedByRecipientId = new ArrayList (); 5660 } 5661 } 5662 5663 5670 public void addOnlineSubscriptionRelatedByRecipientId(OnlineSubscription l) throws TorqueException 5671 { 5672 getOnlineSubscriptionsRelatedByRecipientId().add(l); 5673 l.setCustomerRelatedByRecipientId((Customer) this); 5674 } 5675 5676 5679 private Criteria lastOnlineSubscriptionsRelatedByRecipientIdCriteria = null; 5680 5681 5688 public List getOnlineSubscriptionsRelatedByRecipientId() throws TorqueException 5689 { 5690 if (collOnlineSubscriptionsRelatedByRecipientId == null) 5691 { 5692 collOnlineSubscriptionsRelatedByRecipientId = getOnlineSubscriptionsRelatedByRecipientId(new Criteria(10)); 5693 } 5694 return collOnlineSubscriptionsRelatedByRecipientId; 5695 } 5696 5697 5708 public List getOnlineSubscriptionsRelatedByRecipientId(Criteria criteria) throws TorqueException 5709 { 5710 if (collOnlineSubscriptionsRelatedByRecipientId == null) 5711 { 5712 if (isNew()) 5713 { 5714 collOnlineSubscriptionsRelatedByRecipientId = new ArrayList (); 5715 } 5716 else 5717 { 5718 criteria.add(OnlineSubscriptionPeer.RECIPIENT_ID, getCustomerId() ); 5719 collOnlineSubscriptionsRelatedByRecipientId = OnlineSubscriptionPeer.doSelect(criteria); 5720 } 5721 } 5722 else 5723 { 5724 if (!isNew()) 5726 { 5727 criteria.add(OnlineSubscriptionPeer.RECIPIENT_ID, getCustomerId()); 5731 if (!lastOnlineSubscriptionsRelatedByRecipientIdCriteria.equals(criteria)) 5732 { 5733 collOnlineSubscriptionsRelatedByRecipientId = OnlineSubscriptionPeer.doSelect(criteria); 5734 } 5735 } 5736 } 5737 lastOnlineSubscriptionsRelatedByRecipientIdCriteria = criteria; 5738 5739 return collOnlineSubscriptionsRelatedByRecipientId; 5740 } 5741 5742 5750 public List getOnlineSubscriptionsRelatedByRecipientId(Connection con) throws TorqueException 5751 { 5752 if (collOnlineSubscriptionsRelatedByRecipientId == null) 5753 { 5754 collOnlineSubscriptionsRelatedByRecipientId = getOnlineSubscriptionsRelatedByRecipientId(new Criteria(10), con); 5755 } 5756 return collOnlineSubscriptionsRelatedByRecipientId; 5757 } 5758 5759 5771 public List getOnlineSubscriptionsRelatedByRecipientId(Criteria criteria, Connection con) 5772 throws TorqueException 5773 { 5774 if (collOnlineSubscriptionsRelatedByRecipientId == null) 5775 { 5776 if (isNew()) 5777 { 5778 collOnlineSubscriptionsRelatedByRecipientId = new ArrayList (); 5779 } 5780 else 5781 { 5782 criteria.add(OnlineSubscriptionPeer.RECIPIENT_ID, getCustomerId()); 5783 collOnlineSubscriptionsRelatedByRecipientId = OnlineSubscriptionPeer.doSelect(criteria, con); 5784 } 5785 } 5786 else 5787 { 5788 if (!isNew()) 5790 { 5791 criteria.add(OnlineSubscriptionPeer.RECIPIENT_ID, getCustomerId()); 5795 if (!lastOnlineSubscriptionsRelatedByRecipientIdCriteria.equals(criteria)) 5796 { 5797 collOnlineSubscriptionsRelatedByRecipientId = OnlineSubscriptionPeer.doSelect(criteria, con); 5798 } 5799 } 5800 } 5801 lastOnlineSubscriptionsRelatedByRecipientIdCriteria = criteria; 5802 5803 return collOnlineSubscriptionsRelatedByRecipientId; 5804 } 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5827 protected List getOnlineSubscriptionsRelatedByRecipientIdJoinCustomerRelatedByCustomerId(Criteria criteria) 5828 throws TorqueException 5829 { 5830 if (collOnlineSubscriptionsRelatedByRecipientId == null) 5831 { 5832 if (isNew()) 5833 { 5834 collOnlineSubscriptionsRelatedByRecipientId = new ArrayList (); 5835 } 5836 else 5837 { 5838 criteria.add(OnlineSubscriptionPeer.RECIPIENT_ID, getCustomerId()); 5839 collOnlineSubscriptionsRelatedByRecipientId = OnlineSubscriptionPeer.doSelectJoinCustomerRelatedByCustomerId(criteria); 5840 } 5841 } 5842 else 5843 { 5844 5848 criteria.add(OnlineSubscriptionPeer.RECIPIENT_ID, getCustomerId()); 5849 if (!lastOnlineSubscriptionsRelatedByRecipientIdCriteria.equals(criteria)) 5850 { 5851 collOnlineSubscriptionsRelatedByRecipientId = OnlineSubscriptionPeer.doSelectJoinCustomerRelatedByCustomerId(criteria); 5852 } 5853 } 5854 lastOnlineSubscriptionsRelatedByRecipientIdCriteria = criteria; 5855 5856 return collOnlineSubscriptionsRelatedByRecipientId; 5857 } 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 5874 5875 5886 protected List getOnlineSubscriptionsRelatedByRecipientIdJoinProject(Criteria criteria) 5887 throws TorqueException 5888 { 5889 if (collOnlineSubscriptionsRelatedByRecipientId == null) 5890 { 5891 if (isNew()) 5892 { 5893 collOnlineSubscriptionsRelatedByRecipientId = new ArrayList (); 5894 } 5895 else 5896 { 5897 criteria.add(OnlineSubscriptionPeer.RECIPIENT_ID, getCustomerId()); 5898 collOnlineSubscriptionsRelatedByRecipientId = OnlineSubscriptionPeer.doSelectJoinProject(criteria); 5899 } 5900 } 5901 else 5902 { 5903 5907 criteria.add(OnlineSubscriptionPeer.RECIPIENT_ID, getCustomerId()); 5908 if (!lastOnlineSubscriptionsRelatedByRecipientIdCriteria.equals(criteria)) 5909 { 5910 collOnlineSubscriptionsRelatedByRecipientId = OnlineSubscriptionPeer.doSelectJoinProject(criteria); 5911 } 5912 } 5913 lastOnlineSubscriptionsRelatedByRecipientIdCriteria = criteria; 5914 5915 return collOnlineSubscriptionsRelatedByRecipientId; 5916 } 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5937 protected List getOnlineSubscriptionsRelatedByRecipientIdJoinProduct(Criteria criteria) 5938 throws TorqueException 5939 { 5940 if (collOnlineSubscriptionsRelatedByRecipientId == null) 5941 { 5942 if (isNew()) 5943 { 5944 collOnlineSubscriptionsRelatedByRecipientId = new ArrayList (); 5945 } 5946 else 5947 { 5948 criteria.add(OnlineSubscriptionPeer.RECIPIENT_ID, getCustomerId()); 5949 collOnlineSubscriptionsRelatedByRecipientId = OnlineSubscriptionPeer.doSelectJoinProduct(criteria); 5950 } 5951 } 5952 else 5953 { 5954 5958 criteria.add(OnlineSubscriptionPeer.RECIPIENT_ID, getCustomerId()); 5959 if (!lastOnlineSubscriptionsRelatedByRecipientIdCriteria.equals(criteria)) 5960 { 5961 collOnlineSubscriptionsRelatedByRecipientId = OnlineSubscriptionPeer.doSelectJoinProduct(criteria); 5962 } 5963 } 5964 lastOnlineSubscriptionsRelatedByRecipientIdCriteria = criteria; 5965 5966 return collOnlineSubscriptionsRelatedByRecipientId; 5967 } 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5988 protected List getOnlineSubscriptionsRelatedByRecipientIdJoinSorder(Criteria criteria) 5989 throws TorqueException 5990 { 5991 if (collOnlineSubscriptionsRelatedByRecipientId == null) 5992 { 5993 if (isNew()) 5994 { 5995 collOnlineSubscriptionsRelatedByRecipientId = new ArrayList (); 5996 } 5997 else 5998 { 5999 criteria.add(OnlineSubscriptionPeer.RECIPIENT_ID, getCustomerId()); 6000 collOnlineSubscriptionsRelatedByRecipientId = OnlineSubscriptionPeer.doSelectJoinSorder(criteria); 6001 } 6002 } 6003 else 6004 { 6005 6009 criteria.add(OnlineSubscriptionPeer.RECIPIENT_ID, getCustomerId()); 6010 if (!lastOnlineSubscriptionsRelatedByRecipientIdCriteria.equals(criteria)) 6011 { 6012 collOnlineSubscriptionsRelatedByRecipientId = OnlineSubscriptionPeer.doSelectJoinSorder(criteria); 6013 } 6014 } 6015 lastOnlineSubscriptionsRelatedByRecipientIdCriteria = criteria; 6016 6017 return collOnlineSubscriptionsRelatedByRecipientId; 6018 } 6019 6020 6021 6022 6023 6024 6027 protected List collInboxEvents; 6028 6029 6034 protected void initInboxEvents() 6035 { 6036 if (collInboxEvents == null) 6037 { 6038 collInboxEvents = new ArrayList (); 6039 } 6040 } 6041 6042 6049 public void addInboxEvent(InboxEvent l) throws TorqueException 6050 { 6051 getInboxEvents().add(l); 6052 l.setCustomer((Customer) this); 6053 } 6054 6055 6058 private Criteria lastInboxEventsCriteria = null; 6059 6060 6067 public List getInboxEvents() throws TorqueException 6068 { 6069 if (collInboxEvents == null) 6070 { 6071 collInboxEvents = getInboxEvents(new Criteria(10)); 6072 } 6073 return collInboxEvents; 6074 } 6075 6076 6087 public List getInboxEvents(Criteria criteria) throws TorqueException 6088 { 6089 if (collInboxEvents == null) 6090 { 6091 if (isNew()) 6092 { 6093 collInboxEvents = new ArrayList (); 6094 } 6095 else 6096 { 6097 criteria.add(InboxEventPeer.CUSTOMER_ID, getCustomerId() ); 6098 collInboxEvents = InboxEventPeer.doSelect(criteria); 6099 } 6100 } 6101 else 6102 { 6103 if (!isNew()) 6105 { 6106 criteria.add(InboxEventPeer.CUSTOMER_ID, getCustomerId()); 6110 if (!lastInboxEventsCriteria.equals(criteria)) 6111 { 6112 collInboxEvents = InboxEventPeer.doSelect(criteria); 6113 } 6114 } 6115 } 6116 lastInboxEventsCriteria = criteria; 6117 6118 return collInboxEvents; 6119 } 6120 6121 6129 public List getInboxEvents(Connection con) throws TorqueException 6130 { 6131 if (collInboxEvents == null) 6132 { 6133 collInboxEvents = getInboxEvents(new Criteria(10), con); 6134 } 6135 return collInboxEvents; 6136 } 6137 6138 6150 public List getInboxEvents(Criteria criteria, Connection con) 6151 throws TorqueException 6152 { 6153 if (collInboxEvents == null) 6154 { 6155 if (isNew()) 6156 { 6157 collInboxEvents = new ArrayList (); 6158 } 6159 else 6160 { 6161 criteria.add(InboxEventPeer.CUSTOMER_ID, getCustomerId()); 6162 collInboxEvents = InboxEventPeer.doSelect(criteria, con); 6163 } 6164 } 6165 else 6166 { 6167 if (!isNew()) 6169 { 6170 criteria.add(InboxEventPeer.CUSTOMER_ID, getCustomerId()); 6174 if (!lastInboxEventsCriteria.equals(criteria)) 6175 { 6176 collInboxEvents = InboxEventPeer.doSelect(criteria, con); 6177 } 6178 } 6179 } 6180 lastInboxEventsCriteria = criteria; 6181 6182 return collInboxEvents; 6183 } 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195 6206 protected List getInboxEventsJoinCustomer(Criteria criteria) 6207 throws TorqueException 6208 { 6209 if (collInboxEvents == null) 6210 { 6211 if (isNew()) 6212 { 6213 collInboxEvents = new ArrayList (); 6214 } 6215 else 6216 { 6217 criteria.add(InboxEventPeer.CUSTOMER_ID, getCustomerId()); 6218 collInboxEvents = InboxEventPeer.doSelectJoinCustomer(criteria); 6219 } 6220 } 6221 else 6222 { 6223 6227 criteria.add(InboxEventPeer.CUSTOMER_ID, getCustomerId()); 6228 if (!lastInboxEventsCriteria.equals(criteria)) 6229 { 6230 collInboxEvents = InboxEventPeer.doSelectJoinCustomer(criteria); 6231 } 6232 } 6233 lastInboxEventsCriteria = criteria; 6234 6235 return collInboxEvents; 6236 } 6237 6238 6239 6240 6241 6242 6243 6244 6245 6246 6257 protected List getInboxEventsJoinProject(Criteria criteria) 6258 throws TorqueException 6259 { 6260 if (collInboxEvents == null) 6261 { 6262 if (isNew()) 6263 { 6264 collInboxEvents = new ArrayList (); 6265 } 6266 else 6267 { 6268 criteria.add(InboxEventPeer.CUSTOMER_ID, getCustomerId()); 6269 collInboxEvents = InboxEventPeer.doSelectJoinProject(criteria); 6270 } 6271 } 6272 else 6273 { 6274 6278 criteria.add(InboxEventPeer.CUSTOMER_ID, getCustomerId()); 6279 if (!lastInboxEventsCriteria.equals(criteria)) 6280 { 6281 collInboxEvents = InboxEventPeer.doSelectJoinProject(criteria); 6282 } 6283 } 6284 lastInboxEventsCriteria = criteria; 6285 6286 return collInboxEvents; 6287 } 6288 6289 6290 6291 6292 6293 6294 6295 6296 6297 6308 protected List getInboxEventsJoinProduct(Criteria criteria) 6309 throws TorqueException 6310 { 6311 if (collInboxEvents == null) 6312 { 6313 if (isNew()) 6314 { 6315 collInboxEvents = new ArrayList (); 6316 } 6317 else 6318 { 6319 criteria.add(InboxEventPeer.CUSTOMER_ID, getCustomerId()); 6320 collInboxEvents = InboxEventPeer.doSelectJoinProduct(criteria); 6321 } 6322 } 6323 else 6324 { 6325 6329 criteria.add(InboxEventPeer.CUSTOMER_ID, getCustomerId()); 6330 if (!lastInboxEventsCriteria.equals(criteria)) 6331 { 6332 collInboxEvents = InboxEventPeer.doSelectJoinProduct(criteria); 6333 } 6334 } 6335 lastInboxEventsCriteria = criteria; 6336 6337 return collInboxEvents; 6338 } 6339 6340 6341 6342 6343 6344 6347 protected List collOutboxEvents; 6348 6349 6354 protected void initOutboxEvents() 6355 { 6356 if (collOutboxEvents == null) 6357 { 6358 collOutboxEvents = new ArrayList (); 6359 } 6360 } 6361 6362 6369 public void addOutboxEvent(OutboxEvent l) throws TorqueException 6370 { 6371 getOutboxEvents().add(l); 6372 l.setCustomer((Customer) this); 6373 } 6374 6375 6378 private Criteria lastOutboxEventsCriteria = null; 6379 6380 6387 public List getOutboxEvents() throws TorqueException 6388 { 6389 if (collOutboxEvents == null) 6390 { 6391 collOutboxEvents = getOutboxEvents(new Criteria(10)); 6392 } 6393 return collOutboxEvents; 6394 } 6395 6396 6407 public List getOutboxEvents(Criteria criteria) throws TorqueException 6408 { 6409 if (collOutboxEvents == null) 6410 { 6411 if (isNew()) 6412 { 6413 collOutboxEvents = new ArrayList (); 6414 } 6415 else 6416 { 6417 criteria.add(OutboxEventPeer.CUSTOMER_ID, getCustomerId() ); 6418 collOutboxEvents = OutboxEventPeer.doSelect(criteria); 6419 } 6420 } 6421 else 6422 { 6423 if (!isNew()) 6425 { 6426 criteria.add(OutboxEventPeer.CUSTOMER_ID, getCustomerId()); 6430 if (!lastOutboxEventsCriteria.equals(criteria)) 6431 { 6432 collOutboxEvents = OutboxEventPeer.doSelect(criteria); 6433 } 6434 } 6435 } 6436 lastOutboxEventsCriteria = criteria; 6437 6438 return collOutboxEvents; 6439 } 6440 6441 6449 public List getOutboxEvents(Connection con) throws TorqueException 6450 { 6451 if (collOutboxEvents == null) 6452 { 6453 collOutboxEvents = getOutboxEvents(new Criteria(10), con); 6454 } 6455 return collOutboxEvents; 6456 } 6457 6458 6470 public List getOutboxEvents(Criteria criteria, Connection con) 6471 throws TorqueException 6472 { 6473 if (collOutboxEvents == null) 6474 { 6475 if (isNew()) 6476 { 6477 collOutboxEvents = new ArrayList (); 6478 } 6479 else 6480 { 6481 criteria.add(OutboxEventPeer.CUSTOMER_ID, getCustomerId()); 6482 collOutboxEvents = OutboxEventPeer.doSelect(criteria, con); 6483 } 6484 } 6485 else 6486 { 6487 if (!isNew()) 6489 { 6490 criteria.add(OutboxEventPeer.CUSTOMER_ID, getCustomerId()); 6494 if (!lastOutboxEventsCriteria.equals(criteria)) 6495 { 6496 collOutboxEvents = OutboxEventPeer.doSelect(criteria, con); 6497 } 6498 } 6499 } 6500 lastOutboxEventsCriteria = criteria; 6501 6502 return collOutboxEvents; 6503 } 6504 6505 6506 6507 6508 6509 6510 6511 6512 6513 6514 6515 6526 protected List getOutboxEventsJoinCustomer(Criteria criteria) 6527 throws TorqueException 6528 { 6529 if (collOutboxEvents == null) 6530 { 6531 if (isNew()) 6532 { 6533 collOutboxEvents = new ArrayList (); 6534 } 6535 else 6536 { 6537 criteria.add(OutboxEventPeer.CUSTOMER_ID, getCustomerId()); 6538 collOutboxEvents = OutboxEventPeer.doSelectJoinCustomer(criteria); 6539 } 6540 } 6541 else 6542 { 6543 6547 criteria.add(OutboxEventPeer.CUSTOMER_ID, getCustomerId()); 6548 if (!lastOutboxEventsCriteria.equals(criteria)) 6549 { 6550 collOutboxEvents = OutboxEventPeer.doSelectJoinCustomer(criteria); 6551 } 6552 } 6553 lastOutboxEventsCriteria = criteria; 6554 6555 return collOutboxEvents; 6556 } 6557 6558 6559 6560 6561 6562 6563 6564 6565 6566 6577 protected List getOutboxEventsJoinProject(Criteria criteria) 6578 throws TorqueException 6579 { 6580 if (collOutboxEvents == null) 6581 { 6582 if (isNew()) 6583 { 6584 collOutboxEvents = new ArrayList (); 6585 } 6586 else 6587 { 6588 criteria.add(OutboxEventPeer.CUSTOMER_ID, getCustomerId()); 6589 collOutboxEvents = OutboxEventPeer.doSelectJoinProject(criteria); 6590 } 6591 } 6592 else 6593 { 6594 6598 criteria.add(OutboxEventPeer.CUSTOMER_ID, getCustomerId()); 6599 if (!lastOutboxEventsCriteria.equals(criteria)) 6600 { 6601 collOutboxEvents = OutboxEventPeer.doSelectJoinProject(criteria); 6602 } 6603 } 6604 lastOutboxEventsCriteria = criteria; 6605 6606 return collOutboxEvents; 6607 } 6608 6609 6610 6611 6612 6613 6614 6615 6616 6617 6628 protected List getOutboxEventsJoinProduct(Criteria criteria) 6629 throws TorqueException 6630 { 6631 if (collOutboxEvents == null) 6632 { 6633 if (isNew()) 6634 { 6635 collOutboxEvents = new ArrayList (); 6636 } 6637 else 6638 { 6639 criteria.add(OutboxEventPeer.CUSTOMER_ID, getCustomerId()); 6640 collOutboxEvents = OutboxEventPeer.doSelectJoinProduct(criteria); 6641 } 6642 } 6643 else 6644 { 6645 6649 criteria.add(OutboxEventPeer.CUSTOMER_ID, getCustomerId()); 6650 if (!lastOutboxEventsCriteria.equals(criteria)) 6651 { 6652 collOutboxEvents = OutboxEventPeer.doSelectJoinProduct(criteria); 6653 } 6654 } 6655 lastOutboxEventsCriteria = criteria; 6656 6657 return collOutboxEvents; 6658 } 6659 6660 6661 6662 6663 6664 6667 protected List collSorderItemsRelatedByCustomerId; 6668 6669 6674 protected void initSorderItemsRelatedByCustomerId() 6675 { 6676 if (collSorderItemsRelatedByCustomerId == null) 6677 { 6678 collSorderItemsRelatedByCustomerId = new ArrayList (); 6679 } 6680 } 6681 6682 6689 public void addSorderItemRelatedByCustomerId(SorderItem l) throws TorqueException 6690 { 6691 getSorderItemsRelatedByCustomerId().add(l); 6692 l.setCustomerRelatedByCustomerId((Customer) this); 6693 } 6694 6695 6698 private Criteria lastSorderItemsRelatedByCustomerIdCriteria = null; 6699 6700 6707 public List getSorderItemsRelatedByCustomerId() throws TorqueException 6708 { 6709 if (collSorderItemsRelatedByCustomerId == null) 6710 { 6711 collSorderItemsRelatedByCustomerId = getSorderItemsRelatedByCustomerId(new Criteria(10)); 6712 } 6713 return collSorderItemsRelatedByCustomerId; 6714 } 6715 6716 6727 public List getSorderItemsRelatedByCustomerId(Criteria criteria) throws TorqueException 6728 { 6729 if (collSorderItemsRelatedByCustomerId == null) 6730 { 6731 if (isNew()) 6732 { 6733 collSorderItemsRelatedByCustomerId = new ArrayList (); 6734 } 6735 else 6736 { 6737 criteria.add(SorderItemPeer.CUSTOMER_ID, getCustomerId() ); 6738 collSorderItemsRelatedByCustomerId = SorderItemPeer.doSelect(criteria); 6739 } 6740 } 6741 else 6742 { 6743 if (!isNew()) 6745 { 6746 criteria.add(SorderItemPeer.CUSTOMER_ID, getCustomerId()); 6750 if (!lastSorderItemsRelatedByCustomerIdCriteria.equals(criteria)) 6751 { 6752 collSorderItemsRelatedByCustomerId = SorderItemPeer.doSelect(criteria); 6753 } 6754 } 6755 } 6756 lastSorderItemsRelatedByCustomerIdCriteria = criteria; 6757 6758 return collSorderItemsRelatedByCustomerId; 6759 } 6760 6761 6769 public List getSorderItemsRelatedByCustomerId(Connection con) throws TorqueException 6770 { 6771 if (collSorderItemsRelatedByCustomerId == null) 6772 { 6773 collSorderItemsRelatedByCustomerId = getSorderItemsRelatedByCustomerId(new Criteria(10), con); 6774 } 6775 return collSorderItemsRelatedByCustomerId; 6776 } 6777 6778 6790 public List getSorderItemsRelatedByCustomerId(Criteria criteria, Connection con) 6791 throws TorqueException 6792 { 6793 if (collSorderItemsRelatedByCustomerId == null) 6794 { 6795 if (isNew()) 6796 { 6797 collSorderItemsRelatedByCustomerId = new ArrayList (); 6798 } 6799 else 6800 { 6801 criteria.add(SorderItemPeer.CUSTOMER_ID, getCustomerId()); 6802 collSorderItemsRelatedByCustomerId = SorderItemPeer.doSelect(criteria, con); 6803 } 6804 } 6805 else 6806 { 6807 if (!isNew()) 6809 { 6810 criteria.add(SorderItemPeer.CUSTOMER_ID, getCustomerId()); 6814 if (!lastSorderItemsRelatedByCustomerIdCriteria.equals(criteria)) 6815 { 6816 collSorderItemsRelatedByCustomerId = SorderItemPeer.doSelect(criteria, con); 6817 } 6818 } 6819 } 6820 lastSorderItemsRelatedByCustomerIdCriteria = criteria; 6821 6822 return collSorderItemsRelatedByCustomerId; 6823 } 6824 6825 6826 6827 6828 6829 6830 6831 6832 6833 6834 6835 6846 protected List getSorderItemsRelatedByCustomerIdJoinSorder(Criteria criteria) 6847 throws TorqueException 6848 { 6849 if (collSorderItemsRelatedByCustomerId == null) 6850 { 6851 if (isNew()) 6852 { 6853 collSorderItemsRelatedByCustomerId = new ArrayList (); 6854 } 6855 else 6856 { 6857 criteria.add(SorderItemPeer.CUSTOMER_ID, getCustomerId()); 6858 collSorderItemsRelatedByCustomerId = SorderItemPeer.doSelectJoinSorder(criteria); 6859 } 6860 } 6861 else 6862 { 6863 6867 criteria.add(SorderItemPeer.CUSTOMER_ID, getCustomerId()); 6868 if (!lastSorderItemsRelatedByCustomerIdCriteria.equals(criteria)) 6869 { 6870 collSorderItemsRelatedByCustomerId = SorderItemPeer.doSelectJoinSorder(criteria); 6871 } 6872 } 6873 lastSorderItemsRelatedByCustomerIdCriteria = criteria; 6874 6875 return collSorderItemsRelatedByCustomerId; 6876 } 6877 6878 6879 6880 6881 6882 6883 6884 6885 6886 6897 protected List getSorderItemsRelatedByCustomerIdJoinProduct(Criteria criteria) 6898 throws TorqueException 6899 { 6900 if (collSorderItemsRelatedByCustomerId == null) 6901 { 6902 if (isNew()) 6903 { 6904 collSorderItemsRelatedByCustomerId = new ArrayList (); 6905 } 6906 else 6907 { 6908 criteria.add(SorderItemPeer.CUSTOMER_ID, getCustomerId()); 6909 collSorderItemsRelatedByCustomerId = SorderItemPeer.doSelectJoinProduct(criteria); 6910 } 6911 } 6912 else 6913 { 6914 6918 criteria.add(SorderItemPeer.CUSTOMER_ID, getCustomerId()); 6919 if (!lastSorderItemsRelatedByCustomerIdCriteria.equals(criteria)) 6920 { 6921 collSorderItemsRelatedByCustomerId = SorderItemPeer.doSelectJoinProduct(criteria); 6922 } 6923 } 6924 lastSorderItemsRelatedByCustomerIdCriteria = criteria; 6925 6926 return collSorderItemsRelatedByCustomerId; 6927 } 6928 6929 6930 6931 6932 6933 6934 6935 6936 6937 6938 6939 6940 6941 6942 6943 6944 6945 6956 protected List getSorderItemsRelatedByCustomerIdJoinCustomerRelatedByRecipientId(Criteria criteria) 6957 throws TorqueException 6958 { 6959 if (collSorderItemsRelatedByCustomerId == null) 6960 { 6961 if (isNew()) 6962 { 6963 collSorderItemsRelatedByCustomerId = new ArrayList (); 6964 } 6965 else 6966 { 6967 criteria.add(SorderItemPeer.CUSTOMER_ID, getCustomerId()); 6968 collSorderItemsRelatedByCustomerId = SorderItemPeer.doSelectJoinCustomerRelatedByRecipientId(criteria); 6969 } 6970 } 6971 else 6972 { 6973 6977 criteria.add(SorderItemPeer.CUSTOMER_ID, getCustomerId()); 6978 if (!lastSorderItemsRelatedByCustomerIdCriteria.equals(criteria)) 6979 { 6980 collSorderItemsRelatedByCustomerId = SorderItemPeer.doSelectJoinCustomerRelatedByRecipientId(criteria); 6981 } 6982 } 6983 lastSorderItemsRelatedByCustomerIdCriteria = criteria; 6984 6985 return collSorderItemsRelatedByCustomerId; 6986 } 6987 6988 6989 6990 6991 6992 6993 6994 6995 6996 7007 protected List getSorderItemsRelatedByCustomerIdJoinProject(Criteria criteria) 7008 throws TorqueException 7009 { 7010 if (collSorderItemsRelatedByCustomerId == null) 7011 { 7012 if (isNew()) 7013 { 7014 collSorderItemsRelatedByCustomerId = new ArrayList (); 7015 } 7016 else 7017 { 7018 criteria.add(SorderItemPeer.CUSTOMER_ID, getCustomerId()); 7019 collSorderItemsRelatedByCustomerId = SorderItemPeer.doSelectJoinProject(criteria); 7020 } 7021 } 7022 else 7023 { 7024 7028 criteria.add(SorderItemPeer.CUSTOMER_ID, getCustomerId()); 7029 if (!lastSorderItemsRelatedByCustomerIdCriteria.equals(criteria)) 7030 { 7031 collSorderItemsRelatedByCustomerId = SorderItemPeer.doSelectJoinProject(criteria); 7032 } 7033 } 7034 lastSorderItemsRelatedByCustomerIdCriteria = criteria; 7035 7036 return collSorderItemsRelatedByCustomerId; 7037 } 7038 7039 7040 7041 7042 7043 7044 7045 7046 7047 7058 protected List getSorderItemsRelatedByCustomerIdJoinCurrency(Criteria criteria) 7059 throws TorqueException 7060 { 7061 if (collSorderItemsRelatedByCustomerId == null) 7062 { 7063 if (isNew()) 7064 { 7065 collSorderItemsRelatedByCustomerId = new ArrayList (); 7066 } 7067 else 7068 { 7069 criteria.add(SorderItemPeer.CUSTOMER_ID, getCustomerId()); 7070 collSorderItemsRelatedByCustomerId = SorderItemPeer.doSelectJoinCurrency(criteria); 7071 } 7072 } 7073 else 7074 { 7075 7079 criteria.add(SorderItemPeer.CUSTOMER_ID, getCustomerId()); 7080 if (!lastSorderItemsRelatedByCustomerIdCriteria.equals(criteria)) 7081 { 7082 collSorderItemsRelatedByCustomerId = SorderItemPeer.doSelectJoinCurrency(criteria); 7083 } 7084 } 7085 lastSorderItemsRelatedByCustomerIdCriteria = criteria; 7086 7087 return collSorderItemsRelatedByCustomerId; 7088 } 7089 7090 7091 7092 7093 7094 7097 protected List collSorderItemsRelatedByRecipientId; 7098 7099 7104 protected void initSorderItemsRelatedByRecipientId() 7105 { 7106 if (collSorderItemsRelatedByRecipientId == null) 7107 { 7108 collSorderItemsRelatedByRecipientId = new ArrayList (); 7109 } 7110 } 7111 7112 7119 public void addSorderItemRelatedByRecipientId(SorderItem l) throws TorqueException 7120 { 7121 getSorderItemsRelatedByRecipientId().add(l); 7122 l.setCustomerRelatedByRecipientId((Customer) this); 7123 } 7124 7125 7128 private Criteria lastSorderItemsRelatedByRecipientIdCriteria = null; 7129 7130 7137 public List getSorderItemsRelatedByRecipientId() throws TorqueException 7138 { 7139 if (collSorderItemsRelatedByRecipientId == null) 7140 { 7141 collSorderItemsRelatedByRecipientId = getSorderItemsRelatedByRecipientId(new Criteria(10)); 7142 } 7143 return collSorderItemsRelatedByRecipientId; 7144 } 7145 7146 7157 public List getSorderItemsRelatedByRecipientId(Criteria criteria) throws TorqueException 7158 { 7159 if (collSorderItemsRelatedByRecipientId == null) 7160 { 7161 if (isNew()) 7162 { 7163 collSorderItemsRelatedByRecipientId = new ArrayList (); 7164 } 7165 else 7166 { 7167 criteria.add(SorderItemPeer.RECIPIENT_ID, getCustomerId() ); 7168 collSorderItemsRelatedByRecipientId = SorderItemPeer.doSelect(criteria); 7169 } 7170 } 7171 else 7172 { 7173 if (!isNew()) 7175 { 7176 criteria.add(SorderItemPeer.RECIPIENT_ID, getCustomerId()); 7180 if (!lastSorderItemsRelatedByRecipientIdCriteria.equals(criteria)) 7181 { 7182 collSorderItemsRelatedByRecipientId = SorderItemPeer.doSelect(criteria); 7183 } 7184 } 7185 } 7186 lastSorderItemsRelatedByRecipientIdCriteria = criteria; 7187 7188 return collSorderItemsRelatedByRecipientId; 7189 } 7190 7191 7199 public List getSorderItemsRelatedByRecipientId(Connection con) throws TorqueException 7200 { 7201 if (collSorderItemsRelatedByRecipientId == null) 7202 { 7203 collSorderItemsRelatedByRecipientId = getSorderItemsRelatedByRecipientId(new Criteria(10), con); 7204 } 7205 return collSorderItemsRelatedByRecipientId; 7206 } 7207 7208 7220 public List getSorderItemsRelatedByRecipientId(Criteria criteria, Connection con) 7221 throws TorqueException 7222 { 7223 if (collSorderItemsRelatedByRecipientId == null) 7224 { 7225 if (isNew()) 7226 { 7227 collSorderItemsRelatedByRecipientId = new ArrayList (); 7228 } 7229 else 7230 { 7231 criteria.add(SorderItemPeer.RECIPIENT_ID, getCustomerId()); 7232 collSorderItemsRelatedByRecipientId = SorderItemPeer.doSelect(criteria, con); 7233 } 7234 } 7235 else 7236 { 7237 if (!isNew()) 7239 { 7240 criteria.add(SorderItemPeer.RECIPIENT_ID, getCustomerId()); 7244 if (!lastSorderItemsRelatedByRecipientIdCriteria.equals(criteria)) 7245 { 7246 collSorderItemsRelatedByRecipientId = SorderItemPeer.doSelect(criteria, con); 7247 } 7248 } 7249 } 7250 lastSorderItemsRelatedByRecipientIdCriteria = criteria; 7251 7252 return collSorderItemsRelatedByRecipientId; 7253 } 7254 7255 7256 7257 7258 7259 7260 7261 7262 7263 7264 7265 7276 protected List getSorderItemsRelatedByRecipientIdJoinSorder(Criteria criteria) 7277 throws TorqueException 7278 { 7279 if (collSorderItemsRelatedByRecipientId == null) 7280 { 7281 if (isNew()) 7282 { 7283 collSorderItemsRelatedByRecipientId = new ArrayList (); 7284 } 7285 else 7286 { 7287 criteria.add(SorderItemPeer.RECIPIENT_ID, getCustomerId()); 7288 collSorderItemsRelatedByRecipientId = SorderItemPeer.doSelectJoinSorder(criteria); 7289 } 7290 } 7291 else 7292 { 7293 7297 criteria.add(SorderItemPeer.RECIPIENT_ID, getCustomerId()); 7298 if (!lastSorderItemsRelatedByRecipientIdCriteria.equals(criteria)) 7299 { 7300 collSorderItemsRelatedByRecipientId = SorderItemPeer.doSelectJoinSorder(criteria); 7301 } 7302 } 7303 lastSorderItemsRelatedByRecipientIdCriteria = criteria; 7304 7305 return collSorderItemsRelatedByRecipientId; 7306 } 7307 7308 7309 7310 7311 7312 7313 7314 7315 7316 7327 protected List getSorderItemsRelatedByRecipientIdJoinProduct(Criteria criteria) 7328 throws TorqueException 7329 { 7330 if (collSorderItemsRelatedByRecipientId == null) 7331 { 7332 if (isNew()) 7333 { 7334 collSorderItemsRelatedByRecipientId = new ArrayList (); 7335 } 7336 else 7337 { 7338 criteria.add(SorderItemPeer.RECIPIENT_ID, getCustomerId()); 7339 collSorderItemsRelatedByRecipientId = SorderItemPeer.doSelectJoinProduct(criteria); 7340 } 7341 } 7342 else 7343 { 7344 7348 criteria.add(SorderItemPeer.RECIPIENT_ID, getCustomerId()); 7349 if (!lastSorderItemsRelatedByRecipientIdCriteria.equals(criteria)) 7350 { 7351 collSorderItemsRelatedByRecipientId = SorderItemPeer.doSelectJoinProduct(criteria); 7352 } 7353 } 7354 lastSorderItemsRelatedByRecipientIdCriteria = criteria; 7355 7356 return collSorderItemsRelatedByRecipientId; 7357 } 7358 7359 7360 7361 7362 7363 7364 7365 7366 7367 7378 protected List getSorderItemsRelatedByRecipientIdJoinCustomerRelatedByCustomerId(Criteria criteria) 7379 throws TorqueException 7380 { 7381 if (collSorderItemsRelatedByRecipientId == null) 7382 { 7383 if (isNew()) 7384 { 7385 collSorderItemsRelatedByRecipientId = new ArrayList (); 7386 } 7387 else 7388 { 7389 criteria.add(SorderItemPeer.RECIPIENT_ID, getCustomerId()); 7390 collSorderItemsRelatedByRecipientId = SorderItemPeer.doSelectJoinCustomerRelatedByCustomerId(criteria); 7391 } 7392 } 7393 else 7394 { 7395 7399 criteria.add(SorderItemPeer.RECIPIENT_ID, getCustomerId()); 7400 if (!lastSorderItemsRelatedByRecipientIdCriteria.equals(criteria)) 7401 { 7402 collSorderItemsRelatedByRecipientId = SorderItemPeer.doSelectJoinCustomerRelatedByCustomerId(criteria); 7403 } 7404 } 7405 lastSorderItemsRelatedByRecipientIdCriteria = criteria; 7406 7407 return collSorderItemsRelatedByRecipientId; 7408 } 7409 7410 7411 7412 7413 7414 7415 7416 7417 7418 7419 7420 7421 7422 7423 7424 7425 7426 7437 protected List getSorderItemsRelatedByRecipientIdJoinProject(Criteria criteria) 7438 throws TorqueException 7439 { 7440 if (collSorderItemsRelatedByRecipientId == null) 7441 { 7442 if (isNew()) 7443 { 7444 collSorderItemsRelatedByRecipientId = new ArrayList (); 7445 } 7446 else 7447 { 7448 criteria.add(SorderItemPeer.RECIPIENT_ID, getCustomerId()); 7449 collSorderItemsRelatedByRecipientId = SorderItemPeer.doSelectJoinProject(criteria); 7450 } 7451 } 7452 else 7453 { 7454 7458 criteria.add(SorderItemPeer.RECIPIENT_ID, getCustomerId()); 7459 if (!lastSorderItemsRelatedByRecipientIdCriteria.equals(criteria)) 7460 { 7461 collSorderItemsRelatedByRecipientId = SorderItemPeer.doSelectJoinProject(criteria); 7462 } 7463 } 7464 lastSorderItemsRelatedByRecipientIdCriteria = criteria; 7465 7466 return collSorderItemsRelatedByRecipientId; 7467 } 7468 7469 7470 7471 7472 7473 7474 7475 7476 7477 7488 protected List getSorderItemsRelatedByRecipientIdJoinCurrency(Criteria criteria) 7489 throws TorqueException 7490 { 7491 if (collSorderItemsRelatedByRecipientId == null) 7492 { 7493 if (isNew()) 7494 { 7495 collSorderItemsRelatedByRecipientId = new ArrayList (); 7496 } 7497 else 7498 { 7499 criteria.add(SorderItemPeer.RECIPIENT_ID, getCustomerId()); 7500 collSorderItemsRelatedByRecipientId = SorderItemPeer.doSelectJoinCurrency(criteria); 7501 } 7502 } 7503 else 7504 { 7505 7509 criteria.add(SorderItemPeer.RECIPIENT_ID, getCustomerId()); 7510 if (!lastSorderItemsRelatedByRecipientIdCriteria.equals(criteria)) 7511 { 7512 collSorderItemsRelatedByRecipientId = SorderItemPeer.doSelectJoinCurrency(criteria); 7513 } 7514 } 7515 lastSorderItemsRelatedByRecipientIdCriteria = criteria; 7516 7517 return collSorderItemsRelatedByRecipientId; 7518 } 7519 7520 7521 7522 7523 7524 7527 protected List collPaymentItems; 7528 7529 7534 protected void initPaymentItems() 7535 { 7536 if (collPaymentItems == null) 7537 { 7538 collPaymentItems = new ArrayList (); 7539 } 7540 } 7541 7542 7549 public void addPaymentItem(PaymentItem l) throws TorqueException 7550 { 7551 getPaymentItems().add(l); 7552 l.setCustomer((Customer) this); 7553 } 7554 7555 7558 private Criteria lastPaymentItemsCriteria = null; 7559 7560 7567 public List getPaymentItems() throws TorqueException 7568 { 7569 if (collPaymentItems == null) 7570 { 7571 collPaymentItems = getPaymentItems(new Criteria(10)); 7572 } 7573 return collPaymentItems; 7574 } 7575 7576 7587 public List getPaymentItems(Criteria criteria) throws TorqueException 7588 { 7589 if (collPaymentItems == null) 7590 { 7591 if (isNew()) 7592 { 7593 collPaymentItems = new ArrayList (); 7594 } 7595 else 7596 { 7597 criteria.add(PaymentItemPeer.CUSTOMER_ID, getCustomerId() ); 7598 collPaymentItems = PaymentItemPeer.doSelect(criteria); 7599 } 7600 } 7601 else 7602 { 7603 if (!isNew()) 7605 { 7606 criteria.add(PaymentItemPeer.CUSTOMER_ID, getCustomerId()); 7610 if (!lastPaymentItemsCriteria.equals(criteria)) 7611 { 7612 collPaymentItems = PaymentItemPeer.doSelect(criteria); 7613 } 7614 } 7615 } 7616 lastPaymentItemsCriteria = criteria; 7617 7618 return collPaymentItems; 7619 } 7620 7621 7629 public List getPaymentItems(Connection con) throws TorqueException 7630 { 7631 if (collPaymentItems == null) 7632 { 7633 collPaymentItems = getPaymentItems(new Criteria(10), con); 7634 } 7635 return collPaymentItems; 7636 } 7637 7638 7650 public List getPaymentItems(Criteria criteria, Connection con) 7651 throws TorqueException 7652 { 7653 if (collPaymentItems == null) 7654 { 7655 if (isNew()) 7656 { 7657 collPaymentItems = new ArrayList (); 7658 } 7659 else 7660 { 7661 criteria.add(PaymentItemPeer.CUSTOMER_ID, getCustomerId()); 7662 collPaymentItems = PaymentItemPeer.doSelect(criteria, con); 7663 } 7664 } 7665 else 7666 { 7667 if (!isNew()) 7669 { 7670 criteria.add(PaymentItemPeer.CUSTOMER_ID, getCustomerId()); 7674 if (!lastPaymentItemsCriteria.equals(criteria)) 7675 { 7676 collPaymentItems = PaymentItemPeer.doSelect(criteria, con); 7677 } 7678 } 7679 } 7680 lastPaymentItemsCriteria = criteria; 7681 7682 return collPaymentItems; 7683 } 7684 7685 7686 7687 7688 7689 7690 7691 7692 7693 7694 7695 7706 protected List getPaymentItemsJoinPayment(Criteria criteria) 7707 throws TorqueException 7708 { 7709 if (collPaymentItems == null) 7710 { 7711 if (isNew()) 7712 { 7713 collPaymentItems = new ArrayList (); 7714 } 7715 else 7716 { 7717 criteria.add(PaymentItemPeer.CUSTOMER_ID, getCustomerId()); 7718 collPaymentItems = PaymentItemPeer.doSelectJoinPayment(criteria); 7719 } 7720 } 7721 else 7722 { 7723 7727 criteria.add(PaymentItemPeer.CUSTOMER_ID, getCustomerId()); 7728 if (!lastPaymentItemsCriteria.equals(criteria)) 7729 { 7730 collPaymentItems = PaymentItemPeer.doSelectJoinPayment(criteria); 7731 } 7732 } 7733 lastPaymentItemsCriteria = criteria; 7734 7735 return collPaymentItems; 7736 } 7737 7738 7739 7740 7741 7742 7743 7744 7745 7746 7757 protected List getPaymentItemsJoinSorder(Criteria criteria) 7758 throws TorqueException 7759 { 7760 if (collPaymentItems == null) 7761 { 7762 if (isNew()) 7763 { 7764 collPaymentItems = new ArrayList (); 7765 } 7766 else 7767 { 7768 criteria.add(PaymentItemPeer.CUSTOMER_ID, getCustomerId()); 7769 collPaymentItems = PaymentItemPeer.doSelectJoinSorder(criteria); 7770 } 7771 } 7772 else 7773 { 7774 7778 criteria.add(PaymentItemPeer.CUSTOMER_ID, getCustomerId()); 7779 if (!lastPaymentItemsCriteria.equals(criteria)) 7780 { 7781 collPaymentItems = PaymentItemPeer.doSelectJoinSorder(criteria); 7782 } 7783 } 7784 lastPaymentItemsCriteria = criteria; 7785 7786 return collPaymentItems; 7787 } 7788 7789 7790 7791 7792 7793 7794 7795 7796 7797 7808 protected List getPaymentItemsJoinProduct(Criteria criteria) 7809 throws TorqueException 7810 { 7811 if (collPaymentItems == null) 7812 { 7813 if (isNew()) 7814 { 7815 collPaymentItems = new ArrayList (); 7816 } 7817 else 7818 { 7819 criteria.add(PaymentItemPeer.CUSTOMER_ID, getCustomerId()); 7820 collPaymentItems = PaymentItemPeer.doSelectJoinProduct(criteria); 7821 } 7822 } 7823 else 7824 { 7825 7829 criteria.add(PaymentItemPeer.CUSTOMER_ID, getCustomerId()); 7830 if (!lastPaymentItemsCriteria.equals(criteria)) 7831 { 7832 collPaymentItems = PaymentItemPeer.doSelectJoinProduct(criteria); 7833 } 7834 } 7835 lastPaymentItemsCriteria = criteria; 7836 7837 return collPaymentItems; 7838 } 7839 7840 7841 7842 7843 7844 7845 7846 7847 7848 7859 protected List getPaymentItemsJoinCurrency(Criteria criteria) 7860 throws TorqueException 7861 { 7862 if (collPaymentItems == null) 7863 { 7864 if (isNew()) 7865 { 7866 collPaymentItems = new ArrayList (); 7867 } 7868 else 7869 { 7870 criteria.add(PaymentItemPeer.CUSTOMER_ID, getCustomerId()); 7871 collPaymentItems = PaymentItemPeer.doSelectJoinCurrency(criteria); 7872 } 7873 } 7874 else 7875 { 7876 7880 criteria.add(PaymentItemPeer.CUSTOMER_ID, getCustomerId()); 7881 if (!lastPaymentItemsCriteria.equals(criteria)) 7882 { 7883 collPaymentItems = PaymentItemPeer.doSelectJoinCurrency(criteria); 7884 } 7885 } 7886 lastPaymentItemsCriteria = criteria; 7887 7888 return collPaymentItems; 7889 } 7890 7891 7892 7893 7894 7895 7896 7897 7898 7899 7910 protected List getPaymentItemsJoinCustomer(Criteria criteria) 7911 throws TorqueException 7912 { 7913 if (collPaymentItems == null) 7914 { 7915 if (isNew()) 7916 { 7917 collPaymentItems = new ArrayList (); 7918 } 7919 else 7920 { 7921 criteria.add(PaymentItemPeer.CUSTOMER_ID, getCustomerId()); 7922 collPaymentItems = PaymentItemPeer.doSelectJoinCustomer(criteria); 7923 } 7924 } 7925 else 7926 { 7927 7931 criteria.add(PaymentItemPeer.CUSTOMER_ID, getCustomerId()); 7932 if (!lastPaymentItemsCriteria.equals(criteria)) 7933 { 7934 collPaymentItems = PaymentItemPeer.doSelectJoinCustomer(criteria); 7935 } 7936 } 7937 lastPaymentItemsCriteria = criteria; 7938 7939 return collPaymentItems; 7940 } 7941 7942 7943 7944 7945 7946 7947 7948 7949 7950 7961 protected List getPaymentItemsJoinProject(Criteria criteria) 7962 throws TorqueException 7963 { 7964 if (collPaymentItems == null) 7965 { 7966 if (isNew()) 7967 { 7968 collPaymentItems = new ArrayList (); 7969 } 7970 else 7971 { 7972 criteria.add(PaymentItemPeer.CUSTOMER_ID, getCustomerId()); 7973 collPaymentItems = PaymentItemPeer.doSelectJoinProject(criteria); 7974 } 7975 } 7976 else 7977 { 7978 7982 criteria.add(PaymentItemPeer.CUSTOMER_ID, getCustomerId()); 7983 if (!lastPaymentItemsCriteria.equals(criteria)) 7984 { 7985 collPaymentItems = PaymentItemPeer.doSelectJoinProject(criteria); 7986 } 7987 } 7988 lastPaymentItemsCriteria = criteria; 7989 7990 return collPaymentItems; 7991 } 7992 7993 7994 7995 7996 7997 8000 protected List collShipmentItemsRelatedByCustomerId; 8001 8002 8007 protected void initShipmentItemsRelatedByCustomerId() 8008 { 8009 if (collShipmentItemsRelatedByCustomerId == null) 8010 { 8011 collShipmentItemsRelatedByCustomerId = new ArrayList (); 8012 } 8013 } 8014 8015 8022 public void addShipmentItemRelatedByCustomerId(ShipmentItem l) throws TorqueException 8023 { 8024 getShipmentItemsRelatedByCustomerId().add(l); 8025 l.setCustomerRelatedByCustomerId((Customer) this); 8026 } 8027 8028 8031 private Criteria lastShipmentItemsRelatedByCustomerIdCriteria = null; 8032 8033 8040 public List getShipmentItemsRelatedByCustomerId() throws TorqueException 8041 { 8042 if (collShipmentItemsRelatedByCustomerId == null) 8043 { 8044 collShipmentItemsRelatedByCustomerId = getShipmentItemsRelatedByCustomerId(new Criteria(10)); 8045 } 8046 return collShipmentItemsRelatedByCustomerId; 8047 } 8048 8049 8060 public List getShipmentItemsRelatedByCustomerId(Criteria criteria) throws TorqueException 8061 { 8062 if (collShipmentItemsRelatedByCustomerId == null) 8063 { 8064 if (isNew()) 8065 { 8066 collShipmentItemsRelatedByCustomerId = new ArrayList (); 8067 } 8068 else 8069 { 8070 criteria.add(ShipmentItemPeer.CUSTOMER_ID, getCustomerId() ); 8071 collShipmentItemsRelatedByCustomerId = ShipmentItemPeer.doSelect(criteria); 8072 } 8073 } 8074 else 8075 { 8076 if (!isNew()) 8078 { 8079 criteria.add(ShipmentItemPeer.CUSTOMER_ID, getCustomerId()); 8083 if (!lastShipmentItemsRelatedByCustomerIdCriteria.equals(criteria)) 8084 { 8085 collShipmentItemsRelatedByCustomerId = ShipmentItemPeer.doSelect(criteria); 8086 } 8087 } 8088 } 8089 lastShipmentItemsRelatedByCustomerIdCriteria = criteria; 8090 8091 return collShipmentItemsRelatedByCustomerId; 8092 } 8093 8094 8102 public List getShipmentItemsRelatedByCustomerId(Connection con) throws TorqueException 8103 { 8104 if (collShipmentItemsRelatedByCustomerId == null) 8105 { 8106 collShipmentItemsRelatedByCustomerId = getShipmentItemsRelatedByCustomerId(new Criteria(10), con); 8107 } 8108 return collShipmentItemsRelatedByCustomerId; 8109 } 8110 8111 8123 public List getShipmentItemsRelatedByCustomerId(Criteria criteria, Connection con) 8124 throws TorqueException 8125 { 8126 if (collShipmentItemsRelatedByCustomerId == null) 8127 { 8128 if (isNew()) 8129 { 8130 collShipmentItemsRelatedByCustomerId = new ArrayList (); 8131 } 8132 else 8133 { 8134 criteria.add(ShipmentItemPeer.CUSTOMER_ID, getCustomerId()); 8135 collShipmentItemsRelatedByCustomerId = ShipmentItemPeer.doSelect(criteria, con); 8136 } 8137 } 8138 else 8139 { 8140 if (!isNew()) 8142 { 8143 criteria.add(ShipmentItemPeer.CUSTOMER_ID, getCustomerId()); 8147 if (!lastShipmentItemsRelatedByCustomerIdCriteria.equals(criteria)) 8148 { 8149 collShipmentItemsRelatedByCustomerId = ShipmentItemPeer.doSelect(criteria, con); 8150 } 8151 } 8152 } 8153 lastShipmentItemsRelatedByCustomerIdCriteria = criteria; 8154 8155 return collShipmentItemsRelatedByCustomerId; 8156 } 8157 8158 8159 8160 8161 8162 8163 8164 8165 8166 8167 8168 8179 protected List getShipmentItemsRelatedByCustomerIdJoinShipment(Criteria criteria) 8180 throws TorqueException 8181 { 8182 if (collShipmentItemsRelatedByCustomerId == null) 8183 { 8184 if (isNew()) 8185 { 8186 collShipmentItemsRelatedByCustomerId = new ArrayList (); 8187 } 8188 else 8189 { 8190 criteria.add(ShipmentItemPeer.CUSTOMER_ID, getCustomerId()); 8191 collShipmentItemsRelatedByCustomerId = ShipmentItemPeer.doSelectJoinShipment(criteria); 8192 } 8193 } 8194 else 8195 { 8196 8200 criteria.add(ShipmentItemPeer.CUSTOMER_ID, getCustomerId()); 8201 if (!lastShipmentItemsRelatedByCustomerIdCriteria.equals(criteria)) 8202 { 8203 collShipmentItemsRelatedByCustomerId = ShipmentItemPeer.doSelectJoinShipment(criteria); 8204 } 8205 } 8206 lastShipmentItemsRelatedByCustomerIdCriteria = criteria; 8207 8208 return collShipmentItemsRelatedByCustomerId; 8209 } 8210 8211 8212 8213 8214 8215 8216 8217 8218 8219 8230 protected List getShipmentItemsRelatedByCustomerIdJoinSorder(Criteria criteria) 8231 throws TorqueException 8232 { 8233 if (collShipmentItemsRelatedByCustomerId == null) 8234 { 8235 if (isNew()) 8236 { 8237 collShipmentItemsRelatedByCustomerId = new ArrayList (); 8238 } 8239 else 8240 { 8241 criteria.add(ShipmentItemPeer.CUSTOMER_ID, getCustomerId()); 8242 collShipmentItemsRelatedByCustomerId = ShipmentItemPeer.doSelectJoinSorder(criteria); 8243 } 8244 } 8245 else 8246 { 8247 8251 criteria.add(ShipmentItemPeer.CUSTOMER_ID, getCustomerId()); 8252 if (!lastShipmentItemsRelatedByCustomerIdCriteria.equals(criteria)) 8253 { 8254 collShipmentItemsRelatedByCustomerId = ShipmentItemPeer.doSelectJoinSorder(criteria); 8255 } 8256 } 8257 lastShipmentItemsRelatedByCustomerIdCriteria = criteria; 8258 8259 return collShipmentItemsRelatedByCustomerId; 8260 } 8261 8262 8263 8264 8265 8266 8267 8268 8269 8270 8281 protected List getShipmentItemsRelatedByCustomerIdJoinProduct(Criteria criteria) 8282 throws TorqueException 8283 { 8284 if (collShipmentItemsRelatedByCustomerId == null) 8285 { 8286 if (isNew()) 8287 { 8288 collShipmentItemsRelatedByCustomerId = new ArrayList (); 8289 } 8290 else 8291 { 8292 criteria.add(ShipmentItemPeer.CUSTOMER_ID, getCustomerId()); 8293 collShipmentItemsRelatedByCustomerId = ShipmentItemPeer.doSelectJoinProduct(criteria); 8294 } 8295 } 8296 else 8297 { 8298 8302 criteria.add(ShipmentItemPeer.CUSTOMER_ID, getCustomerId()); 8303 if (!lastShipmentItemsRelatedByCustomerIdCriteria.equals(criteria)) 8304 { 8305 collShipmentItemsRelatedByCustomerId = ShipmentItemPeer.doSelectJoinProduct(criteria); 8306 } 8307 } 8308 lastShipmentItemsRelatedByCustomerIdCriteria = criteria; 8309 8310 return collShipmentItemsRelatedByCustomerId; 8311 } 8312 8313 8314 8315 8316 8317 8318 8319 8320 8321 8322 8323 8324 8325 8326 8327 8328 8329 8340 protected List getShipmentItemsRelatedByCustomerIdJoinCustomerRelatedByRecipientId(Criteria criteria) 8341 throws TorqueException 8342 { 8343 if (collShipmentItemsRelatedByCustomerId == null) 8344 { 8345 if (isNew()) 8346 { 8347 collShipmentItemsRelatedByCustomerId = new ArrayList (); 8348 } 8349 else 8350 { 8351 criteria.add(ShipmentItemPeer.CUSTOMER_ID, getCustomerId()); 8352 collShipmentItemsRelatedByCustomerId = ShipmentItemPeer.doSelectJoinCustomerRelatedByRecipientId(criteria); 8353 } 8354 } 8355 else 8356 { 8357 8361 criteria.add(ShipmentItemPeer.CUSTOMER_ID, getCustomerId()); 8362 if (!lastShipmentItemsRelatedByCustomerIdCriteria.equals(criteria)) 8363 { 8364 collShipmentItemsRelatedByCustomerId = ShipmentItemPeer.doSelectJoinCustomerRelatedByRecipientId(criteria); 8365 } 8366 } 8367 lastShipmentItemsRelatedByCustomerIdCriteria = criteria; 8368 8369 return collShipmentItemsRelatedByCustomerId; 8370 } 8371 8372 8373 8374 8375 8376 8377 8378 8379 8380 8391 protected List getShipmentItemsRelatedByCustomerIdJoinProject(Criteria criteria) 8392 throws TorqueException 8393 { 8394 if (collShipmentItemsRelatedByCustomerId == null) 8395 { 8396 if (isNew()) 8397 { 8398 collShipmentItemsRelatedByCustomerId = new ArrayList (); 8399 } 8400 else 8401 { 8402 criteria.add(ShipmentItemPeer.CUSTOMER_ID, getCustomerId()); 8403 collShipmentItemsRelatedByCustomerId = ShipmentItemPeer.doSelectJoinProject(criteria); 8404 } 8405 } 8406 else 8407 { 8408 8412 criteria.add(ShipmentItemPeer.CUSTOMER_ID, getCustomerId()); 8413 if (!lastShipmentItemsRelatedByCustomerIdCriteria.equals(criteria)) 8414 { 8415 collShipmentItemsRelatedByCustomerId = ShipmentItemPeer.doSelectJoinProject(criteria); 8416 } 8417 } 8418 lastShipmentItemsRelatedByCustomerIdCriteria = criteria; 8419 8420 return collShipmentItemsRelatedByCustomerId; 8421 } 8422 8423 8424 8425 8426 8427 8430 protected List collShipmentItemsRelatedByRecipientId; 8431 8432 8437 protected void initShipmentItemsRelatedByRecipientId() 8438 { 8439 if (collShipmentItemsRelatedByRecipientId == null) 8440 { 8441 collShipmentItemsRelatedByRecipientId = new ArrayList (); 8442 } 8443 } 8444 8445 8452 public void addShipmentItemRelatedByRecipientId(ShipmentItem l) throws TorqueException 8453 { 8454 getShipmentItemsRelatedByRecipientId().add(l); 8455 l.setCustomerRelatedByRecipientId((Customer) this); 8456 } 8457 8458 8461 private Criteria lastShipmentItemsRelatedByRecipientIdCriteria = null; 8462 8463 8470 public List getShipmentItemsRelatedByRecipientId() throws TorqueException 8471 { 8472 if (collShipmentItemsRelatedByRecipientId == null) 8473 { 8474 collShipmentItemsRelatedByRecipientId = getShipmentItemsRelatedByRecipientId(new Criteria(10)); 8475 } 8476 return collShipmentItemsRelatedByRecipientId; 8477 } 8478 8479 8490 public List getShipmentItemsRelatedByRecipientId(Criteria criteria) throws TorqueException 8491 { 8492 if (collShipmentItemsRelatedByRecipientId == null) 8493 { 8494 if (isNew()) 8495 { 8496 collShipmentItemsRelatedByRecipientId = new ArrayList (); 8497 } 8498 else 8499 { 8500 criteria.add(ShipmentItemPeer.RECIPIENT_ID, getCustomerId() ); 8501 collShipmentItemsRelatedByRecipientId = ShipmentItemPeer.doSelect(criteria); 8502 } 8503 } 8504 else 8505 { 8506 if (!isNew()) 8508 { 8509 criteria.add(ShipmentItemPeer.RECIPIENT_ID, getCustomerId()); 8513 if (!lastShipmentItemsRelatedByRecipientIdCriteria.equals(criteria)) 8514 { 8515 collShipmentItemsRelatedByRecipientId = ShipmentItemPeer.doSelect(criteria); 8516 } 8517 } 8518 } 8519 lastShipmentItemsRelatedByRecipientIdCriteria = criteria; 8520 8521 return collShipmentItemsRelatedByRecipientId; 8522 } 8523 8524 8532 public List getShipmentItemsRelatedByRecipientId(Connection con) throws TorqueException 8533 { 8534 if (collShipmentItemsRelatedByRecipientId == null) 8535 { 8536 collShipmentItemsRelatedByRecipientId = getShipmentItemsRelatedByRecipientId(new Criteria(10), con); 8537 } 8538 return collShipmentItemsRelatedByRecipientId; 8539 } 8540 8541 8553 public List getShipmentItemsRelatedByRecipientId(Criteria criteria, Connection con) 8554 throws TorqueException 8555 { 8556 if (collShipmentItemsRelatedByRecipientId == null) 8557 { 8558 if (isNew()) 8559 { 8560 collShipmentItemsRelatedByRecipientId = new ArrayList (); 8561 } 8562 else 8563 { 8564 criteria.add(ShipmentItemPeer.RECIPIENT_ID, getCustomerId()); 8565 collShipmentItemsRelatedByRecipientId = ShipmentItemPeer.doSelect(criteria, con); 8566 } 8567 } 8568 else 8569 { 8570 if (!isNew()) 8572 { 8573 criteria.add(ShipmentItemPeer.RECIPIENT_ID, getCustomerId()); 8577 if (!lastShipmentItemsRelatedByRecipientIdCriteria.equals(criteria)) 8578 { 8579 collShipmentItemsRelatedByRecipientId = ShipmentItemPeer.doSelect(criteria, con); 8580 } 8581 } 8582 } 8583 lastShipmentItemsRelatedByRecipientIdCriteria = criteria; 8584 8585 return collShipmentItemsRelatedByRecipientId; 8586 } 8587 8588 8589 8590 8591 8592 8593 8594 8595 8596 8597 8598 8609 protected List getShipmentItemsRelatedByRecipientIdJoinShipment(Criteria criteria) 8610 throws TorqueException 8611 { 8612 if (collShipmentItemsRelatedByRecipientId == null) 8613 { 8614 if (isNew()) 8615 { 8616 collShipmentItemsRelatedByRecipientId = new ArrayList (); 8617 } 8618 else 8619 { 8620 criteria.add(ShipmentItemPeer.RECIPIENT_ID, getCustomerId()); 8621 collShipmentItemsRelatedByRecipientId = ShipmentItemPeer.doSelectJoinShipment(criteria); 8622 } 8623 } 8624 else 8625 { 8626 8630 criteria.add(ShipmentItemPeer.RECIPIENT_ID, getCustomerId()); 8631 if (!lastShipmentItemsRelatedByRecipientIdCriteria.equals(criteria)) 8632 { 8633 collShipmentItemsRelatedByRecipientId = ShipmentItemPeer.doSelectJoinShipment(criteria); 8634 } 8635 } 8636 lastShipmentItemsRelatedByRecipientIdCriteria = criteria; 8637 8638 return collShipmentItemsRelatedByRecipientId; 8639 } 8640 8641 8642 8643 8644 8645 8646 8647 8648 8649 8660 protected List getShipmentItemsRelatedByRecipientIdJoinSorder(Criteria criteria) 8661 throws TorqueException 8662 { 8663 if (collShipmentItemsRelatedByRecipientId == null) 8664 { 8665 if (isNew()) 8666 { 8667 collShipmentItemsRelatedByRecipientId = new ArrayList (); 8668 } 8669 else 8670 { 8671 criteria.add(ShipmentItemPeer.RECIPIENT_ID, getCustomerId()); 8672 collShipmentItemsRelatedByRecipientId = ShipmentItemPeer.doSelectJoinSorder(criteria); 8673 } 8674 } 8675 else 8676 { 8677 8681 criteria.add(ShipmentItemPeer.RECIPIENT_ID, getCustomerId()); 8682 if (!lastShipmentItemsRelatedByRecipientIdCriteria.equals(criteria)) 8683 { 8684 collShipmentItemsRelatedByRecipientId = ShipmentItemPeer.doSelectJoinSorder(criteria); 8685 } 8686 } 8687 lastShipmentItemsRelatedByRecipientIdCriteria = criteria; 8688 8689 return collShipmentItemsRelatedByRecipientId; 8690 } 8691 8692 8693 8694 8695 8696 8697 8698 8699 8700 8711 protected List getShipmentItemsRelatedByRecipientIdJoinProduct(Criteria criteria) 8712 throws TorqueException 8713 { 8714 if (collShipmentItemsRelatedByRecipientId == null) 8715 { 8716 if (isNew()) 8717 { 8718 collShipmentItemsRelatedByRecipientId = new ArrayList (); 8719 } 8720 else 8721 { 8722 criteria.add(ShipmentItemPeer.RECIPIENT_ID, getCustomerId()); 8723 collShipmentItemsRelatedByRecipientId = ShipmentItemPeer.doSelectJoinProduct(criteria); 8724 } 8725 } 8726 else 8727 { 8728 8732 criteria.add(ShipmentItemPeer.RECIPIENT_ID, getCustomerId()); 8733 if (!lastShipmentItemsRelatedByRecipientIdCriteria.equals(criteria)) 8734 { 8735 collShipmentItemsRelatedByRecipientId = ShipmentItemPeer.doSelectJoinProduct(criteria); 8736 } 8737 } 8738 lastShipmentItemsRelatedByRecipientIdCriteria = criteria; 8739 8740 return collShipmentItemsRelatedByRecipientId; 8741 } 8742 8743 8744 8745 8746 8747 8748 8749 8750 8751 8762 protected List getShipmentItemsRelatedByRecipientIdJoinCustomerRelatedByCustomerId(Criteria criteria) 8763 throws TorqueException 8764 { 8765 if (collShipmentItemsRelatedByRecipientId == null) 8766 { 8767 if (isNew()) 8768 { 8769 collShipmentItemsRelatedByRecipientId = new ArrayList (); 8770 } 8771 else 8772 { 8773 criteria.add(ShipmentItemPeer.RECIPIENT_ID, getCustomerId()); 8774 collShipmentItemsRelatedByRecipientId = ShipmentItemPeer.doSelectJoinCustomerRelatedByCustomerId(criteria); 8775 } 8776 } 8777 else 8778 { 8779 8783 criteria.add(ShipmentItemPeer.RECIPIENT_ID, getCustomerId()); 8784 if (!lastShipmentItemsRelatedByRecipientIdCriteria.equals(criteria)) 8785 { 8786 collShipmentItemsRelatedByRecipientId = ShipmentItemPeer.doSelectJoinCustomerRelatedByCustomerId(criteria); 8787 } 8788 } 8789 lastShipmentItemsRelatedByRecipientIdCriteria = criteria; 8790 8791 return collShipmentItemsRelatedByRecipientId; 8792 } 8793 8794 8795 8796 8797 8798 8799 8800 8801 8802 8803 8804 8805 8806 8807 8808 8809 8810 8821 protected List getShipmentItemsRelatedByRecipientIdJoinProject(Criteria criteria) 8822 throws TorqueException 8823 { 8824 if (collShipmentItemsRelatedByRecipientId == null) 8825 { 8826 if (isNew()) 8827 { 8828 collShipmentItemsRelatedByRecipientId = new ArrayList (); 8829 } 8830 else 8831 { 8832 criteria.add(ShipmentItemPeer.RECIPIENT_ID, getCustomerId()); 8833 collShipmentItemsRelatedByRecipientId = ShipmentItemPeer.doSelectJoinProject(criteria); 8834 } 8835 } 8836 else 8837 { 8838 8842 criteria.add(ShipmentItemPeer.RECIPIENT_ID, getCustomerId()); 8843 if (!lastShipmentItemsRelatedByRecipientIdCriteria.equals(criteria)) 8844 { 8845 collShipmentItemsRelatedByRecipientId = ShipmentItemPeer.doSelectJoinProject(criteria); 8846 } 8847 } 8848 lastShipmentItemsRelatedByRecipientIdCriteria = criteria; 8849 8850 return collShipmentItemsRelatedByRecipientId; 8851 } 8852 8853 8854 8855 8856 8857 8860 protected List collServiceItemsRelatedByCustomerId; 8861 8862 8867 protected void initServiceItemsRelatedByCustomerId() 8868 { 8869 if (collServiceItemsRelatedByCustomerId == null) 8870 { 8871 collServiceItemsRelatedByCustomerId = new ArrayList (); 8872 } 8873 } 8874 8875 8882 public void addServiceItemRelatedByCustomerId(ServiceItem l) throws TorqueException 8883 { 8884 getServiceItemsRelatedByCustomerId().add(l); 8885 l.setCustomerRelatedByCustomerId((Customer) this); 8886 } 8887 8888 8891 private Criteria lastServiceItemsRelatedByCustomerIdCriteria = null; 8892 8893 8900 public List getServiceItemsRelatedByCustomerId() throws TorqueException 8901 { 8902 if (collServiceItemsRelatedByCustomerId == null) 8903 { 8904 collServiceItemsRelatedByCustomerId = getServiceItemsRelatedByCustomerId(new Criteria(10)); 8905 } 8906 return collServiceItemsRelatedByCustomerId; 8907 } 8908 8909 8920 public List getServiceItemsRelatedByCustomerId(Criteria criteria) throws TorqueException 8921 { 8922 if (collServiceItemsRelatedByCustomerId == null) 8923 { 8924 if (isNew()) 8925 { 8926 collServiceItemsRelatedByCustomerId = new ArrayList (); 8927 } 8928 else 8929 { 8930 criteria.add(ServiceItemPeer.CUSTOMER_ID, getCustomerId() ); 8931 collServiceItemsRelatedByCustomerId = ServiceItemPeer.doSelect(criteria); 8932 } 8933 } 8934 else 8935 { 8936 if (!isNew()) 8938 { 8939 criteria.add(ServiceItemPeer.CUSTOMER_ID, getCustomerId()); 8943 if (!lastServiceItemsRelatedByCustomerIdCriteria.equals(criteria)) 8944 { 8945 collServiceItemsRelatedByCustomerId = ServiceItemPeer.doSelect(criteria); 8946 } 8947 } 8948 } 8949 lastServiceItemsRelatedByCustomerIdCriteria = criteria; 8950 8951 return collServiceItemsRelatedByCustomerId; 8952 } 8953 8954 8962 public List getServiceItemsRelatedByCustomerId(Connection con) throws TorqueException 8963 { 8964 if (collServiceItemsRelatedByCustomerId == null) 8965 { 8966 collServiceItemsRelatedByCustomerId = getServiceItemsRelatedByCustomerId(new Criteria(10), con); 8967 } 8968 return collServiceItemsRelatedByCustomerId; 8969 } 8970 8971 8983 public List getServiceItemsRelatedByCustomerId(Criteria criteria, Connection con) 8984 throws TorqueException 8985 { 8986 if (collServiceItemsRelatedByCustomerId == null) 8987 { 8988 if (isNew()) 8989 { 8990 collServiceItemsRelatedByCustomerId = new ArrayList (); 8991 } 8992 else 8993 { 8994 criteria.add(ServiceItemPeer.CUSTOMER_ID, getCustomerId()); 8995 collServiceItemsRelatedByCustomerId = ServiceItemPeer.doSelect(criteria, con); 8996 } 8997 } 8998 else 8999 { 9000 if (!isNew()) 9002 { 9003 criteria.add(ServiceItemPeer.CUSTOMER_ID, getCustomerId()); 9007 if (!lastServiceItemsRelatedByCustomerIdCriteria.equals(criteria)) 9008 { 9009 collServiceItemsRelatedByCustomerId = ServiceItemPeer.doSelect(criteria, con); 9010 } 9011 } 9012 } 9013 lastServiceItemsRelatedByCustomerIdCriteria = criteria; 9014 9015 return collServiceItemsRelatedByCustomerId; 9016 } 9017 9018 9019 9020 9021 9022 9023 9024 9025 9026 9027 9028 9039 protected List getServiceItemsRelatedByCustomerIdJoinService(Criteria criteria) 9040 throws TorqueException 9041 { 9042 if (collServiceItemsRelatedByCustomerId == null) 9043 { 9044 if (isNew()) 9045 { 9046 collServiceItemsRelatedByCustomerId = new ArrayList (); 9047 } 9048 else 9049 { 9050 criteria.add(ServiceItemPeer.CUSTOMER_ID, getCustomerId()); 9051 collServiceItemsRelatedByCustomerId = ServiceItemPeer.doSelectJoinService(criteria); 9052 } 9053 } 9054 else 9055 { 9056 9060 criteria.add(ServiceItemPeer.CUSTOMER_ID, getCustomerId()); 9061 if (!lastServiceItemsRelatedByCustomerIdCriteria.equals(criteria)) 9062 { 9063 collServiceItemsRelatedByCustomerId = ServiceItemPeer.doSelectJoinService(criteria); 9064 } 9065 } 9066 lastServiceItemsRelatedByCustomerIdCriteria = criteria; 9067 9068 return collServiceItemsRelatedByCustomerId; 9069 } 9070 9071 9072 9073 9074 9075 9076 9077 9078 9079 9090 protected List getServiceItemsRelatedByCustomerIdJoinSorder(Criteria criteria) 9091 throws TorqueException 9092 { 9093 if (collServiceItemsRelatedByCustomerId == null) 9094 { 9095 if (isNew()) 9096 { 9097 collServiceItemsRelatedByCustomerId = new ArrayList (); 9098 } 9099 else 9100 { 9101 criteria.add(ServiceItemPeer.CUSTOMER_ID, getCustomerId()); 9102 collServiceItemsRelatedByCustomerId = ServiceItemPeer.doSelectJoinSorder(criteria); 9103 } 9104 } 9105 else 9106 { 9107 9111 criteria.add(ServiceItemPeer.CUSTOMER_ID, getCustomerId()); 9112 if (!lastServiceItemsRelatedByCustomerIdCriteria.equals(criteria)) 9113 { 9114 collServiceItemsRelatedByCustomerId = ServiceItemPeer.doSelectJoinSorder(criteria); 9115 } 9116 } 9117 lastServiceItemsRelatedByCustomerIdCriteria = criteria; 9118 9119 return collServiceItemsRelatedByCustomerId; 9120 } 9121 9122 9123 9124 9125 9126 9127 9128 9129 9130 9141 protected List getServiceItemsRelatedByCustomerIdJoinProduct(Criteria criteria) 9142 throws TorqueException 9143 { 9144 if (collServiceItemsRelatedByCustomerId == null) 9145 { 9146 if (isNew()) 9147 { 9148 collServiceItemsRelatedByCustomerId = new ArrayList (); 9149 } 9150 else 9151 { 9152 criteria.add(ServiceItemPeer.CUSTOMER_ID, getCustomerId()); 9153 collServiceItemsRelatedByCustomerId = ServiceItemPeer.doSelectJoinProduct(criteria); 9154 } 9155 } 9156 else 9157 { 9158 9162 criteria.add(ServiceItemPeer.CUSTOMER_ID, getCustomerId()); 9163 if (!lastServiceItemsRelatedByCustomerIdCriteria.equals(criteria)) 9164 { 9165 collServiceItemsRelatedByCustomerId = ServiceItemPeer.doSelectJoinProduct(criteria); 9166 } 9167 } 9168 lastServiceItemsRelatedByCustomerIdCriteria = criteria; 9169 9170 return collServiceItemsRelatedByCustomerId; 9171 } 9172 9173 9174 9175 9176 9177 9178 9179 9180 9181 9182 9183 9184 9185 9186 9187 9188 9189 9200 protected List getServiceItemsRelatedByCustomerIdJoinCustomerRelatedByRecipientId(Criteria criteria) 9201 throws TorqueException 9202 { 9203 if (collServiceItemsRelatedByCustomerId == null) 9204 { 9205 if (isNew()) 9206 { 9207 collServiceItemsRelatedByCustomerId = new ArrayList (); 9208 } 9209 else 9210 { 9211 criteria.add(ServiceItemPeer.CUSTOMER_ID, getCustomerId()); 9212 collServiceItemsRelatedByCustomerId = ServiceItemPeer.doSelectJoinCustomerRelatedByRecipientId(criteria); 9213 } 9214 } 9215 else 9216 { 9217 9221 criteria.add(ServiceItemPeer.CUSTOMER_ID, getCustomerId()); 9222 if (!lastServiceItemsRelatedByCustomerIdCriteria.equals(criteria)) 9223 { 9224 collServiceItemsRelatedByCustomerId = ServiceItemPeer.doSelectJoinCustomerRelatedByRecipientId(criteria); 9225 } 9226 } 9227 lastServiceItemsRelatedByCustomerIdCriteria = criteria; 9228 9229 return collServiceItemsRelatedByCustomerId; 9230 } 9231 9232 9233 9234 9235 9236 9237 9238 9239 9240 9251 protected List getServiceItemsRelatedByCustomerIdJoinProject(Criteria criteria) 9252 throws TorqueException 9253 { 9254 if (collServiceItemsRelatedByCustomerId == null) 9255 { 9256 if (isNew()) 9257 { 9258 collServiceItemsRelatedByCustomerId = new ArrayList (); 9259 } 9260 else 9261 { 9262 criteria.add(ServiceItemPeer.CUSTOMER_ID, getCustomerId()); 9263 collServiceItemsRelatedByCustomerId = ServiceItemPeer.doSelectJoinProject(criteria); 9264 } 9265 } 9266 else 9267 { 9268 9272 criteria.add(ServiceItemPeer.CUSTOMER_ID, getCustomerId()); 9273 if (!lastServiceItemsRelatedByCustomerIdCriteria.equals(criteria)) 9274 { 9275 collServiceItemsRelatedByCustomerId = ServiceItemPeer.doSelectJoinProject(criteria); 9276 } 9277 } 9278 lastServiceItemsRelatedByCustomerIdCriteria = criteria; 9279 9280 return collServiceItemsRelatedByCustomerId; 9281 } 9282 9283 9284 9285 9286 9287 9290 protected List collServiceItemsRelatedByRecipientId; 9291 9292 9297 protected void initServiceItemsRelatedByRecipientId() 9298 { 9299 if (collServiceItemsRelatedByRecipientId == null) 9300 { 9301 collServiceItemsRelatedByRecipientId = new ArrayList (); 9302 } 9303 } 9304 9305 9312 public void addServiceItemRelatedByRecipientId(ServiceItem l) throws TorqueException 9313 { 9314 getServiceItemsRelatedByRecipientId().add(l); 9315 l.setCustomerRelatedByRecipientId((Customer) this); 9316 } 9317 9318 9321 private Criteria lastServiceItemsRelatedByRecipientIdCriteria = null; 9322 9323 9330 public List getServiceItemsRelatedByRecipientId() throws TorqueException 9331 { 9332 if (collServiceItemsRelatedByRecipientId == null) 9333 { 9334 collServiceItemsRelatedByRecipientId = getServiceItemsRelatedByRecipientId(new Criteria(10)); 9335 } 9336 return collServiceItemsRelatedByRecipientId; 9337 } 9338 9339 9350 public List getServiceItemsRelatedByRecipientId(Criteria criteria) throws TorqueException 9351 { 9352 if (collServiceItemsRelatedByRecipientId == null) 9353 { 9354 if (isNew()) 9355 { 9356 collServiceItemsRelatedByRecipientId = new ArrayList (); 9357 } 9358 else 9359 { 9360 criteria.add(ServiceItemPeer.RECIPIENT_ID, getCustomerId() ); 9361 collServiceItemsRelatedByRecipientId = ServiceItemPeer.doSelect(criteria); 9362 } 9363 } 9364 else 9365 { 9366 if (!isNew()) 9368 { 9369 criteria.add(ServiceItemPeer.RECIPIENT_ID, getCustomerId()); 9373 if (!lastServiceItemsRelatedByRecipientIdCriteria.equals(criteria)) 9374 { 9375 collServiceItemsRelatedByRecipientId = ServiceItemPeer.doSelect(criteria); 9376 } 9377 } 9378 } 9379 lastServiceItemsRelatedByRecipientIdCriteria = criteria; 9380 9381 return collServiceItemsRelatedByRecipientId; 9382 } 9383 9384 9392 public List getServiceItemsRelatedByRecipientId(Connection con) throws TorqueException 9393 { 9394 if (collServiceItemsRelatedByRecipientId == null) 9395 { 9396 collServiceItemsRelatedByRecipientId = getServiceItemsRelatedByRecipientId(new Criteria(10), con); 9397 } 9398 return collServiceItemsRelatedByRecipientId; 9399 } 9400 9401 9413 public List getServiceItemsRelatedByRecipientId(Criteria criteria, Connection con) 9414 throws TorqueException 9415 { 9416 if (collServiceItemsRelatedByRecipientId == null) 9417 { 9418 if (isNew()) 9419 { 9420 collServiceItemsRelatedByRecipientId = new ArrayList (); 9421 } 9422 else 9423 { 9424 criteria.add(ServiceItemPeer.RECIPIENT_ID, getCustomerId()); 9425 collServiceItemsRelatedByRecipientId = ServiceItemPeer.doSelect(criteria, con); 9426 } 9427 } 9428 else 9429 { 9430 if (!isNew()) 9432 { 9433 criteria.add(ServiceItemPeer.RECIPIENT_ID, getCustomerId()); 9437 if (!lastServiceItemsRelatedByRecipientIdCriteria.equals(criteria)) 9438 { 9439 collServiceItemsRelatedByRecipientId = ServiceItemPeer.doSelect(criteria, con); 9440 } 9441 } 9442 } 9443 lastServiceItemsRelatedByRecipientIdCriteria = criteria; 9444 9445 return collServiceItemsRelatedByRecipientId; 9446 } 9447 9448 9449 9450 9451 9452 9453 9454 9455 9456 9457 9458 9469 protected List getServiceItemsRelatedByRecipientIdJoinService(Criteria criteria) 9470 throws TorqueException 9471 { 9472 if (collServiceItemsRelatedByRecipientId == null) 9473 { 9474 if (isNew()) 9475 { 9476 collServiceItemsRelatedByRecipientId = new ArrayList (); 9477 } 9478 else 9479 { 9480 criteria.add(ServiceItemPeer.RECIPIENT_ID, getCustomerId()); 9481 collServiceItemsRelatedByRecipientId = ServiceItemPeer.doSelectJoinService(criteria); 9482 } 9483 } 9484 else 9485 { 9486 9490 criteria.add(ServiceItemPeer.RECIPIENT_ID, getCustomerId()); 9491 if (!lastServiceItemsRelatedByRecipientIdCriteria.equals(criteria)) 9492 { 9493 collServiceItemsRelatedByRecipientId = ServiceItemPeer.doSelectJoinService(criteria); 9494 } 9495 } 9496 lastServiceItemsRelatedByRecipientIdCriteria = criteria; 9497 9498 return collServiceItemsRelatedByRecipientId; 9499 } 9500 9501 9502 9503 9504 9505 9506 9507 9508 9509 9520 protected List getServiceItemsRelatedByRecipientIdJoinSorder(Criteria criteria) 9521 throws TorqueException 9522 { 9523 if (collServiceItemsRelatedByRecipientId == null) 9524 { 9525 if (isNew()) 9526 { 9527 collServiceItemsRelatedByRecipientId = new ArrayList (); 9528 } 9529 else 9530 { 9531 criteria.add(ServiceItemPeer.RECIPIENT_ID, getCustomerId()); 9532 collServiceItemsRelatedByRecipientId = ServiceItemPeer.doSelectJoinSorder(criteria); 9533 } 9534 } 9535 else 9536 { 9537 9541 criteria.add(ServiceItemPeer.RECIPIENT_ID, getCustomerId()); 9542 if (!lastServiceItemsRelatedByRecipientIdCriteria.equals(criteria)) 9543 { 9544 collServiceItemsRelatedByRecipientId = ServiceItemPeer.doSelectJoinSorder(criteria); 9545 } 9546 } 9547 lastServiceItemsRelatedByRecipientIdCriteria = criteria; 9548 9549 return collServiceItemsRelatedByRecipientId; 9550 } 9551 9552 9553 9554 9555 9556 9557 9558 9559 9560 9571 protected List getServiceItemsRelatedByRecipientIdJoinProduct(Criteria criteria) 9572 throws TorqueException 9573 { 9574 if (collServiceItemsRelatedByRecipientId == null) 9575 { 9576 if (isNew()) 9577 { 9578 collServiceItemsRelatedByRecipientId = new ArrayList (); 9579 } 9580 else 9581 { 9582 criteria.add(ServiceItemPeer.RECIPIENT_ID, getCustomerId()); 9583 collServiceItemsRelatedByRecipientId = ServiceItemPeer.doSelectJoinProduct(criteria); 9584 } 9585 } 9586 else 9587 { 9588 9592 criteria.add(ServiceItemPeer.RECIPIENT_ID, getCustomerId()); 9593 if (!lastServiceItemsRelatedByRecipientIdCriteria.equals(criteria)) 9594 { 9595 collServiceItemsRelatedByRecipientId = ServiceItemPeer.doSelectJoinProduct(criteria); 9596 } 9597 } 9598 lastServiceItemsRelatedByRecipientIdCriteria = criteria; 9599 9600 return collServiceItemsRelatedByRecipientId; 9601 } 9602 9603 9604 9605 9606 9607 9608 9609 9610 9611 9622 protected List getServiceItemsRelatedByRecipientIdJoinCustomerRelatedByCustomerId(Criteria criteria) 9623 throws TorqueException 9624 { 9625 if (collServiceItemsRelatedByRecipientId == null) 9626 { 9627 if (isNew()) 9628 { 9629 collServiceItemsRelatedByRecipientId = new ArrayList (); 9630 } 9631 else 9632 { 9633 criteria.add(ServiceItemPeer.RECIPIENT_ID, getCustomerId()); 9634 collServiceItemsRelatedByRecipientId = ServiceItemPeer.doSelectJoinCustomerRelatedByCustomerId(criteria); 9635 } 9636 } 9637 else 9638 { 9639 9643 criteria.add(ServiceItemPeer.RECIPIENT_ID, getCustomerId()); 9644 if (!lastServiceItemsRelatedByRecipientIdCriteria.equals(criteria)) 9645 { 9646 collServiceItemsRelatedByRecipientId = ServiceItemPeer.doSelectJoinCustomerRelatedByCustomerId(criteria); 9647 } 9648 } 9649 lastServiceItemsRelatedByRecipientIdCriteria = criteria; 9650 9651 return collServiceItemsRelatedByRecipientId; 9652 } 9653 9654 9655 9656 9657 9658 9659 9660 9661 9662 9663 9664 9665 9666 9667 9668 9669 9670 9681 protected List getServiceItemsRelatedByRecipientIdJoinProject(Criteria criteria) 9682 throws TorqueException 9683 { 9684 if (collServiceItemsRelatedByRecipientId == null) 9685 { 9686 if (isNew()) 9687 { 9688 collServiceItemsRelatedByRecipientId = new ArrayList (); 9689 } 9690 else 9691 { 9692 criteria.add(ServiceItemPeer.RECIPIENT_ID, getCustomerId()); 9693 collServiceItemsRelatedByRecipientId = ServiceItemPeer.doSelectJoinProject(criteria); 9694 } 9695 } 9696 else 9697 { 9698 9702 criteria.add(ServiceItemPeer.RECIPIENT_ID, getCustomerId()); 9703 if (!lastServiceItemsRelatedByRecipientIdCriteria.equals(criteria)) 9704 { 9705 collServiceItemsRelatedByRecipientId = ServiceItemPeer.doSelectJoinProject(criteria); 9706 } 9707 } 9708 lastServiceItemsRelatedByRecipientIdCriteria = criteria; 9709 9710 return collServiceItemsRelatedByRecipientId; 9711 } 9712 9713 9714 9715 9716 private static List fieldNames = null; 9717 9718 9723 public static synchronized List getFieldNames() 9724 { 9725 if (fieldNames == null) 9726 { 9727 fieldNames = new ArrayList (); 9728 fieldNames.add("CustomerId"); 9729 fieldNames.add("CustomerCode"); 9730 fieldNames.add("Status"); 9731 fieldNames.add("Priority"); 9732 fieldNames.add("CustomerType"); 9733 fieldNames.add("CustomerCatId"); 9734 fieldNames.add("CustomerName1"); 9735 fieldNames.add("CustomerName2"); 9736 fieldNames.add("CustomerDisplay"); 9737 fieldNames.add("Dear"); 9738 fieldNames.add("Address1"); 9739 fieldNames.add("Address2"); 9740 fieldNames.add("City"); 9741 fieldNames.add("Zip"); 9742 fieldNames.add("State"); 9743 fieldNames.add("CountryId"); 9744 fieldNames.add("RegionId"); 9745 fieldNames.add("Phone1"); 9746 fieldNames.add("Phone2"); 9747 fieldNames.add("Fax"); 9748 fieldNames.add("Email"); 9749 fieldNames.add("EmailFormat"); 9750 fieldNames.add("SendNews"); 9751 fieldNames.add("WebUrl"); 9752 fieldNames.add("LanguageId"); 9753 fieldNames.add("Gender"); 9754 fieldNames.add("EducationCatId"); 9755 fieldNames.add("HouseholdCatId"); 9756 fieldNames.add("Custom1"); 9757 fieldNames.add("Custom2"); 9758 fieldNames.add("Custom3"); 9759 fieldNames.add("Custom4"); 9760 fieldNames.add("Custom5"); 9761 fieldNames.add("Custom6"); 9762 fieldNames.add("Notes"); 9763 fieldNames.add("Created"); 9764 fieldNames.add("Modified"); 9765 fieldNames.add("CreatedBy"); 9766 fieldNames.add("ModifiedBy"); 9767 fieldNames = Collections.unmodifiableList(fieldNames); 9768 } 9769 return fieldNames; 9770 } 9771 9772 9778 public Object getByName(String name) 9779 { 9780 if (name.equals("CustomerId")) 9781 { 9782 return new Integer (getCustomerId()); 9783 } 9784 if (name.equals("CustomerCode")) 9785 { 9786 return getCustomerCode(); 9787 } 9788 if (name.equals("Status")) 9789 { 9790 return new Integer (getStatus()); 9791 } 9792 if (name.equals("Priority")) 9793 { 9794 return new Integer (getPriority()); 9795 } 9796 if (name.equals("CustomerType")) 9797 { 9798 return new Integer (getCustomerType()); 9799 } 9800 if (name.equals("CustomerCatId")) 9801 { 9802 return new Integer (getCustomerCatId()); 9803 } 9804 if (name.equals("CustomerName1")) 9805 { 9806 return getCustomerName1(); 9807 } 9808 if (name.equals("CustomerName2")) 9809 { 9810 return getCustomerName2(); 9811 } 9812 if (name.equals("CustomerDisplay")) 9813 { 9814 return getCustomerDisplay(); 9815 } 9816 if (name.equals("Dear")) 9817 { 9818 return getDear(); 9819 } 9820 if (name.equals("Address1")) 9821 { 9822 return getAddress1(); 9823 } 9824 if (name.equals("Address2")) 9825 { 9826 return getAddress2(); 9827 } 9828 if (name.equals("City")) 9829 { 9830 return getCity(); 9831 } 9832 if (name.equals("Zip")) 9833 { 9834 return getZip(); 9835 } 9836 if (name.equals("State")) 9837 { 9838 return getState(); 9839 } 9840 if (name.equals("CountryId")) 9841 { 9842 return new Integer (getCountryId()); 9843 } 9844 if (name.equals("RegionId")) 9845 { 9846 return new Integer (getRegionId()); 9847 } 9848 if (name.equals("Phone1")) 9849 { 9850 return getPhone1(); 9851 } 9852 if (name.equals("Phone2")) 9853 { 9854 return getPhone2(); 9855 } 9856 if (name.equals("Fax")) 9857 { 9858 return getFax(); 9859 } 9860 if (name.equals("Email")) 9861 { 9862 return getEmail(); 9863 } 9864 if (name.equals("EmailFormat")) 9865 { 9866 return new Integer (getEmailFormat()); 9867 } 9868 if (name.equals("SendNews")) 9869 { 9870 return new Integer (getSendNews()); 9871 } 9872 if (name.equals("WebUrl")) 9873 { 9874 return getWebUrl(); 9875 } 9876 if (name.equals("LanguageId")) 9877 { 9878 return new Integer (getLanguageId()); 9879 } 9880 if (name.equals("Gender")) 9881 { 9882 return new Integer (getGender()); 9883 } 9884 if (name.equals("EducationCatId")) 9885 { 9886 return new Integer (getEducationCatId()); 9887 } 9888 if (name.equals("HouseholdCatId")) 9889 { 9890 return new Integer (getHouseholdCatId()); 9891 } 9892 if (name.equals("Custom1")) 9893 { 9894 return getCustom1(); 9895 } 9896 if (name.equals("Custom2")) 9897 { 9898 return getCustom2(); 9899 } 9900 if (name.equals("Custom3")) 9901 { 9902 return getCustom3(); 9903 } 9904 if (name.equals("Custom4")) 9905 { 9906 return getCustom4(); 9907 } 9908 if (name.equals("Custom5")) 9909 { 9910 return getCustom5(); 9911 } 9912 if (name.equals("Custom6")) 9913 { 9914 return getCustom6(); 9915 } 9916 if (name.equals("Notes")) 9917 { 9918 return getNotes(); 9919 } 9920 if (name.equals("Created")) 9921 { 9922 return getCreated(); 9923 } 9924 if (name.equals("Modified")) 9925 { 9926 return getModified(); 9927 } 9928 if (name.equals("CreatedBy")) 9929 { 9930 return getCreatedBy(); 9931 } 9932 if (name.equals("ModifiedBy")) 9933 { 9934 return getModifiedBy(); 9935 } 9936 return null; 9937 } 9938 9939 9947 public Object getByPeerName(String name) 9948 { 9949 if (name.equals(CustomerPeer.CUSTOMER_ID)) 9950 { 9951 return new Integer (getCustomerId()); 9952 } 9953 if (name.equals(CustomerPeer.CUSTOMER_CODE)) 9954 { 9955 return getCustomerCode(); 9956 } 9957 if (name.equals(CustomerPeer.STATUS)) 9958 { 9959 return new Integer (getStatus()); 9960 } 9961 if (name.equals(CustomerPeer.PRIORITY)) 9962 { 9963 return new Integer (getPriority()); 9964 } 9965 if (name.equals(CustomerPeer.CUSTOMER_TYPE)) 9966 { 9967 return new Integer (getCustomerType()); 9968 } 9969 if (name.equals(CustomerPeer.CUSTOMER_CAT_ID)) 9970 { 9971 return new Integer (getCustomerCatId()); 9972 } 9973 if (name.equals(CustomerPeer.CUSTOMER_NAME_1)) 9974 { 9975 return getCustomerName1(); 9976 } 9977 if (name.equals(CustomerPeer.CUSTOMER_NAME_2)) 9978 { 9979 return getCustomerName2(); 9980 } 9981 if (name.equals(CustomerPeer.CUSTOMER_DISPLAY)) 9982 { 9983 return getCustomerDisplay(); 9984 } 9985 if (name.equals(CustomerPeer.DEAR)) 9986 { 9987 return getDear(); 9988 } 9989 if (name.equals(CustomerPeer.ADDRESS_1)) 9990 { 9991 return getAddress1(); 9992 } 9993 if (name.equals(CustomerPeer.ADDRESS_2)) 9994 { 9995 return getAddress2(); 9996 } 9997 if (name.equals(CustomerPeer.CITY)) 9998 { 9999 return getCity(); 0000 } 0001 if (name.equals(CustomerPeer.ZIP)) 0002 { 0003 return getZip(); 0004 } 0005 if (name.equals(CustomerPeer.STATE)) 0006 { 0007 return getState(); 0008 } 0009 if (name.equals(CustomerPeer.COUNTRY_ID)) 0010 { 0011 return new Integer (getCountryId()); 0012 } 0013 if (name.equals(CustomerPeer.REGION_ID)) 0014 { 0015 return new Integer (getRegionId()); 0016 } 0017 if (name.equals(CustomerPeer.PHONE_1)) 0018 { 0019 return getPhone1(); 0020 } 0021 if (name.equals(CustomerPeer.PHONE_2)) 0022 { 0023 return getPhone2(); 0024 } 0025 if (name.equals(CustomerPeer.FAX)) 0026 { 0027 return getFax(); 0028 } 0029 if (name.equals(CustomerPeer.EMAIL)) 0030 { 0031 return getEmail(); 0032 } 0033 if (name.equals(CustomerPeer.EMAIL_FORMAT)) 0034 { 0035 return new Integer (getEmailFormat()); 0036 } 0037 if (name.equals(CustomerPeer.SEND_NEWS)) 0038 { 0039 return new Integer (getSendNews()); 0040 } 0041 if (name.equals(CustomerPeer.WEB_URL)) 0042 { 0043 return getWebUrl(); 0044 } 0045 if (name.equals(CustomerPeer.LANGUAGE_ID)) 0046 { 0047 return new Integer (getLanguageId()); 0048 } 0049 if (name.equals(CustomerPeer.GENDER)) 0050 { 0051 return new Integer (getGender()); 0052 } 0053 if (name.equals(CustomerPeer.EDUCATION_CAT_ID)) 0054 { 0055 return new Integer (getEducationCatId()); 0056 } 0057 if (name.equals(CustomerPeer.HOUSEHOLD_CAT_ID)) 0058 { 0059 return new Integer (getHouseholdCatId()); 0060 } 0061 if (name.equals(CustomerPeer.CUSTOM_1)) 0062 { 0063 return getCustom1(); 0064 } 0065 if (name.equals(CustomerPeer.CUSTOM_2)) 0066 { 0067 return getCustom2(); 0068 } 0069 if (name.equals(CustomerPeer.CUSTOM_3)) 0070 { 0071 return getCustom3(); 0072 } 0073 if (name.equals(CustomerPeer.CUSTOM_4)) 0074 { 0075 return getCustom4(); 0076 } 0077 if (name.equals(CustomerPeer.CUSTOM_5)) 0078 { 0079 return getCustom5(); 0080 } 0081 if (name.equals(CustomerPeer.CUSTOM_6)) 0082 { 0083 return getCustom6(); 0084 } 0085 if (name.equals(CustomerPeer.NOTES)) 0086 { 0087 return getNotes(); 0088 } 0089 if (name.equals(CustomerPeer.CREATED)) 0090 { 0091 return getCreated(); 0092 } 0093 if (name.equals(CustomerPeer.MODIFIED)) 0094 { 0095 return getModified(); 0096 } 0097 if (name.equals(CustomerPeer.CREATED_BY)) 0098 { 0099 return getCreatedBy(); 0100 } 0101 if (name.equals(CustomerPeer.MODIFIED_BY)) 0102 { 0103 return getModifiedBy(); 0104 } 0105 return null; 0106 } 0107 0108 0115 public Object getByPosition(int pos) 0116 { 0117 if (pos == 0) 0118 { 0119 return new Integer (getCustomerId()); 0120 } 0121 if (pos == 1) 0122 { 0123 return getCustomerCode(); 0124 } 0125 if (pos == 2) 0126 { 0127 return new Integer (getStatus()); 0128 } 0129 if (pos == 3) 0130 { 0131 return new Integer (getPriority()); 0132 } 0133 if (pos == 4) 0134 { 0135 return new Integer (getCustomerType()); 0136 } 0137 if (pos == 5) 0138 { 0139 return new Integer (getCustomerCatId()); 0140 } 0141 if (pos == 6) 0142 { 0143 return getCustomerName1(); 0144 } 0145 if (pos == 7) 0146 { 0147 return getCustomerName2(); 0148 } 0149 if (pos == 8) 0150 { 0151 return getCustomerDisplay(); 0152 } 0153 if (pos == 9) 0154 { 0155 return getDear(); 0156 } 0157 if (pos == 10) 0158 { 0159 return getAddress1(); 0160 } 0161 if (pos == 11) 0162 { 0163 return getAddress2(); 0164 } 0165 if (pos == 12) 0166 { 0167 return getCity(); 0168 } 0169 if (pos == 13) 0170 { 0171 return getZip(); 0172 } 0173 if (pos == 14) 0174 { 0175 return getState(); 0176 } 0177 if (pos == 15) 0178 { 0179 return new Integer (getCountryId()); 0180 } 0181 if (pos == 16) 0182 { 0183 return new Integer (getRegionId()); 0184 } 0185 if (pos == 17) 0186 { 0187 return getPhone1(); 0188 } 0189 if (pos == 18) 0190 { 0191 return getPhone2(); 0192 } 0193 if (pos == 19) 0194 { 0195 return getFax(); 0196 } 0197 if (pos == 20) 0198 { 0199 return getEmail(); 0200 } 0201 if (pos == 21) 0202 { 0203 return new Integer (getEmailFormat()); 0204 } 0205 if (pos == 22) 0206 { 0207 return new Integer (getSendNews()); 0208 } 0209 if (pos == 23) 0210 { 0211 return getWebUrl(); 0212 } 0213 if (pos == 24) 0214 { 0215 return new Integer (getLanguageId()); 0216 } 0217 if (pos == 25) 0218 { 0219 return new Integer (getGender()); 0220 } 0221 if (pos == 26) 0222 { 0223 return new Integer (getEducationCatId()); 0224 } 0225 if (pos == 27) 0226 { 0227 return new Integer (getHouseholdCatId()); 0228 } 0229 if (pos == 28) 0230 { 0231 return getCustom1(); 0232 } 0233 if (pos == 29) 0234 { 0235 return getCustom2(); 0236 } 0237 if (pos == 30) 0238 { 0239 return getCustom3(); 0240 } 0241 if (pos == 31) 0242 { 0243 return getCustom4(); 0244 } 0245 if (pos == 32) 0246 { 0247 return getCustom5(); 0248 } 0249 if (pos == 33) 0250 { 0251 return getCustom6(); 0252 } 0253 if (pos == 34) 0254 { 0255 return getNotes(); 0256 } 0257 if (pos == 35) 0258 { 0259 return getCreated(); 0260 } 0261 if (pos == 36) 0262 { 0263 return getModified(); 0264 } 0265 if (pos == 37) 0266 { 0267 return getCreatedBy(); 0268 } 0269 if (pos == 38) 0270 { 0271 return getModifiedBy(); 0272 } 0273 return null; 0274 } 0275 0276 0282 public void save() throws Exception  0283 { 0284 save(CustomerPeer.getMapBuilder() 0285 .getDatabaseMap().getName()); 0286 } 0287 0288 0298 public void save(String dbName) throws TorqueException 0299 { 0300 Connection con = null; 0301 try 0302 { 0303 con = Transaction.begin(dbName); 0304 save(con); 0305 Transaction.commit(con); 0306 } 0307 catch(TorqueException e) 0308 { 0309 Transaction.safeRollback(con); 0310 throw e; 0311 } 0312 } 0313 0314 0316 private boolean alreadyInSave = false; 0317 0327 public void save(Connection con) throws TorqueException 0328 { 0329 if (!alreadyInSave) 0330 { 0331 alreadyInSave = true; 0332 0333 0334 0335 if (isModified()) 0337 { 0338 if (isNew()) 0339 { 0340 CustomerPeer.doInsert((Customer) this, con); 0341 setNew(false); 0342 } 0343 else 0344 { 0345 CustomerPeer.doUpdate((Customer) this, con); 0346 } 0347 } 0348 0349 0350 0351 if (collSordersRelatedByCustomerId != null) 0352 { 0353 for (int i = 0; i < collSordersRelatedByCustomerId.size(); i++) 0354 { 0355 ((Sorder) collSordersRelatedByCustomerId.get(i)).save(con); 0356 } 0357 } 0358 0359 0360 if (collSordersRelatedByRecipientId != null) 0361 { 0362 for (int i = 0; i < collSordersRelatedByRecipientId.size(); i++) 0363 { 0364 ((Sorder) collSordersRelatedByRecipientId.get(i)).save(con); 0365 } 0366 } 0367 0368 0369 if (collPayments != null) 0370 { 0371 for (int i = 0; i < collPayments.size(); i++) 0372 { 0373 ((Payment) collPayments.get(i)).save(con); 0374 } 0375 } 0376 0377 0378 if (collServicesRelatedByCustomerId != null) 0379 { 0380 for (int i = 0; i < collServicesRelatedByCustomerId.size(); i++) 0381 { 0382 ((Service) collServicesRelatedByCustomerId.get(i)).save(con); 0383 } 0384 } 0385 0386 0387 if (collServicesRelatedByRecipientId != null) 0388 { 0389 for (int i = 0; i < collServicesRelatedByRecipientId.size(); i++) 0390 { 0391 ((Service) collServicesRelatedByRecipientId.get(i)).save(con); 0392 } 0393 } 0394 0395 0396 if (collShipmentsRelatedByCustomerId != null) 0397 { 0398 for (int i = 0; i < collShipmentsRelatedByCustomerId.size(); i++) 0399 { 0400 ((Shipment) collShipmentsRelatedByCustomerId.get(i)).save(con); 0401 } 0402 } 0403 0404 0405 if (collShipmentsRelatedByRecipientId != null) 0406 { 0407 for (int i = 0; i < collShipmentsRelatedByRecipientId.size(); i++) 0408 { 0409 ((Shipment) collShipmentsRelatedByRecipientId.get(i)).save(con); 0410 } 0411 } 0412 0413 0414 if (collPrintSubscriptionsRelatedByCustomerId != null) 0415 { 0416 for (int i = 0; i < collPrintSubscriptionsRelatedByCustomerId.size(); i++) 0417 { 0418 ((PrintSubscription) collPrintSubscriptionsRelatedByCustomerId.get(i)).save(con); 0419 } 0420 } 0421 0422 0423 if (collPrintSubscriptionsRelatedByRecipientId != null) 0424 { 0425 for (int i = 0; i < collPrintSubscriptionsRelatedByRecipientId.size(); i++) 0426 { 0427 ((PrintSubscription) collPrintSubscriptionsRelatedByRecipientId.get(i)).save(con); 0428 } 0429 } 0430 0431 0432 if (collOnlineSubscriptionsRelatedByCustomerId != null) 0433 { 0434 for (int i = 0; i < collOnlineSubscriptionsRelatedByCustomerId.size(); i++) 0435 { 0436 ((OnlineSubscription) collOnlineSubscriptionsRelatedByCustomerId.get(i)).save(con); 0437 } 0438 } 0439 0440 0441 if (collOnlineSubscriptionsRelatedByRecipientId != null) 0442 { 0443 for (int i = 0; i < collOnlineSubscriptionsRelatedByRecipientId.size(); i++) 0444 { 0445 ((OnlineSubscription) collOnlineSubscriptionsRelatedByRecipientId.get(i)).save(con); 0446 } 0447 } 0448 0449 0450 if (collInboxEvents != null) 0451 { 0452 for (int i = 0; i < collInboxEvents.size(); i++) 0453 { 0454 ((InboxEvent) collInboxEvents.get(i)).save(con); 0455 } 0456 } 0457 0458 0459 if (collOutboxEvents != null) 0460 { 0461 for (int i = 0; i < collOutboxEvents.size(); i++) 0462 { 0463 ((OutboxEvent) collOutboxEvents.get(i)).save(con); 0464 } 0465 } 0466 0467 0468 if (collSorderItemsRelatedByCustomerId != null) 0469 { 0470 for (int i = 0; i < collSorderItemsRelatedByCustomerId.size(); i++) 0471 { 0472 ((SorderItem) collSorderItemsRelatedByCustomerId.get(i)).save(con); 0473 } 0474 } 0475 0476 0477 if (collSorderItemsRelatedByRecipientId != null) 0478 { 0479 for (int i = 0; i < collSorderItemsRelatedByRecipientId.size(); i++) 0480 { 0481 ((SorderItem) collSorderItemsRelatedByRecipientId.get(i)).save(con); 0482 } 0483 } 0484 0485 0486 if (collPaymentItems != null) 0487 { 0488 for (int i = 0; i < collPaymentItems.size(); i++) 0489 { 0490 ((PaymentItem) collPaymentItems.get(i)).save(con); 0491 } 0492 } 0493 0494 0495 if (collShipmentItemsRelatedByCustomerId != null) 0496 { 0497 for (int i = 0; i < collShipmentItemsRelatedByCustomerId.size(); i++) 0498 { 0499 ((ShipmentItem) collShipmentItemsRelatedByCustomerId.get(i)).save(con); 0500 } 0501 } 0502 0503 0504 if (collShipmentItemsRelatedByRecipientId != null) 0505 { 0506 for (int i = 0; i < collShipmentItemsRelatedByRecipientId.size(); i++) 0507 { 0508 ((ShipmentItem) collShipmentItemsRelatedByRecipientId.get(i)).save(con); 0509 } 0510 } 0511 0512 0513 if (collServiceItemsRelatedByCustomerId != null) 0514 { 0515 for (int i = 0; i < collServiceItemsRelatedByCustomerId.size(); i++) 0516 { 0517 ((ServiceItem) collServiceItemsRelatedByCustomerId.get(i)).save(con); 0518 } 0519 } 0520 0521 0522 if (collServiceItemsRelatedByRecipientId != null) 0523 { 0524 for (int i = 0; i < collServiceItemsRelatedByRecipientId.size(); i++) 0525 { 0526 ((ServiceItem) collServiceItemsRelatedByRecipientId.get(i)).save(con); 0527 } 0528 } 0529 alreadyInSave = false; 0530 } 0531 } 0532 0533 0534 0539 public void setPrimaryKey(ObjectKey key) 0540 throws TorqueException 0541 { 0542 setCustomerId(((NumberKey) key).intValue()); 0543 } 0544 0545 0550 public void setPrimaryKey(String key) throws TorqueException 0551 { 0552 setCustomerId(Integer.parseInt(key)); 0553 } 0554 0555 0556 0560 public ObjectKey getPrimaryKey() 0561 { 0562 return SimpleKey.keyFor(getCustomerId()); 0563 } 0564 0565 0569 public String getQueryKey() 0570 { 0571 if (getPrimaryKey() == null) 0572 { 0573 return ""; 0574 } 0575 else 0576 { 0577 return getPrimaryKey().toString(); 0578 } 0579 } 0580 0581 0585 public void setQueryKey(String key) 0586 throws TorqueException 0587 { 0588 setPrimaryKey(key); 0589 } 0590 0591 0597 public Customer copy() throws TorqueException 0598 { 0599 return copyInto(new Customer()); 0600 } 0601 0602 protected Customer copyInto(Customer copyObj) throws TorqueException 0603 { 0604 copyObj.setCustomerId(customerId); 0605 copyObj.setCustomerCode(customerCode); 0606 copyObj.setStatus(status); 0607 copyObj.setPriority(priority); 0608 copyObj.setCustomerType(customerType); 0609 copyObj.setCustomerCatId(customerCatId); 0610 copyObj.setCustomerName1(customerName1); 0611 copyObj.setCustomerName2(customerName2); 0612 copyObj.setCustomerDisplay(customerDisplay); 0613 copyObj.setDear(dear); 0614 copyObj.setAddress1(address1); 0615 copyObj.setAddress2(address2); 0616 copyObj.setCity(city); 0617 copyObj.setZip(zip); 0618 copyObj.setState(state); 0619 copyObj.setCountryId(countryId); 0620 copyObj.setRegionId(regionId); 0621 copyObj.setPhone1(phone1); 0622 copyObj.setPhone2(phone2); 0623 copyObj.setFax(fax); 0624 copyObj.setEmail(email); 0625 copyObj.setEmailFormat(emailFormat); 0626 copyObj.setSendNews(sendNews); 0627 copyObj.setWebUrl(webUrl); 0628 copyObj.setLanguageId(languageId); 0629 copyObj.setGender(gender); 0630 copyObj.setEducationCatId(educationCatId); 0631 copyObj.setHouseholdCatId(householdCatId); 0632 copyObj.setCustom1(custom1); 0633 copyObj.setCustom2(custom2); 0634 copyObj.setCustom3(custom3); 0635 copyObj.setCustom4(custom4); 0636 copyObj.setCustom5(custom5); 0637 copyObj.setCustom6(custom6); 0638 copyObj.setNotes(notes); 0639 copyObj.setCreated(created); 0640 copyObj.setModified(modified); 0641 copyObj.setCreatedBy(createdBy); 0642 copyObj.setModifiedBy(modifiedBy); 0643 0644 copyObj.setCustomerId( 0); 0645 0646 0647 0648 List v = getSordersRelatedByCustomerId(); 0649 for (int i = 0; i < v.size(); i++) 0650 { 0651 Sorder obj = (Sorder) v.get(i); 0652 copyObj.addSorderRelatedByCustomerId(obj.copy()); 0653 } 0654 0655 0656 v = getSordersRelatedByRecipientId(); 0657 for (int i = 0; i < v.size(); i++) 0658 { 0659 Sorder obj = (Sorder) v.get(i); 0660 copyObj.addSorderRelatedByRecipientId(obj.copy()); 0661 } 0662 0663 0664 v = getPayments(); 0665 for (int i = 0; i < v.size(); i++) 0666 { 0667 Payment obj = (Payment) v.get(i); 0668 copyObj.addPayment(obj.copy()); 0669 } 0670 0671 0672 v = getServicesRelatedByCustomerId(); 0673 for (int i = 0; i < v.size(); i++) 0674 { 0675 Service obj = (Service) v.get(i); 0676 copyObj.addServiceRelatedByCustomerId(obj.copy()); 0677 } 0678 0679 0680 v = getServicesRelatedByRecipientId(); 0681 for (int i = 0; i < v.size(); i++) 0682 { 0683 Service obj = (Service) v.get(i); 0684 copyObj.addServiceRelatedByRecipientId(obj.copy()); 0685 } 0686 0687 0688 v = getShipmentsRelatedByCustomerId(); 0689 for (int i = 0; i < v.size(); i++) 0690 { 0691 Shipment obj = (Shipment) v.get(i); 0692 copyObj.addShipmentRelatedByCustomerId(obj.copy()); 0693 } 0694 0695 0696 v = getShipmentsRelatedByRecipientId(); 0697 for (int i = 0; i < v.size(); i++) 0698 { 0699 Shipment obj = (Shipment) v.get(i); 0700 copyObj.addShipmentRelatedByRecipientId(obj.copy()); 0701 } 0702 0703 0704 v = getPrintSubscriptionsRelatedByCustomerId(); 0705 for (int i = 0; i < v.size(); i++) 0706 { 0707 PrintSubscription obj = (PrintSubscription) v.get(i); 0708 copyObj.addPrintSubscriptionRelatedByCustomerId(obj.copy()); 0709 } 0710 0711 0712 v = getPrintSubscriptionsRelatedByRecipientId(); 0713 for (int i = 0; i < v.size(); i++) 0714 { 0715 PrintSubscription obj = (PrintSubscription) v.get(i); 0716 copyObj.addPrintSubscriptionRelatedByRecipientId(obj.copy()); 0717 } 0718 0719 0720 v = getOnlineSubscriptionsRelatedByCustomerId(); 0721 for (int i = 0; i < v.size(); i++) 0722 { 0723 OnlineSubscription obj = (OnlineSubscription) v.get(i); 0724 copyObj.addOnlineSubscriptionRelatedByCustomerId(obj.copy()); 0725 } 0726 0727 0728 v = getOnlineSubscriptionsRelatedByRecipientId(); 0729 for (int i = 0; i < v.size(); i++) 0730 { 0731 OnlineSubscription obj = (OnlineSubscription) v.get(i); 0732 copyObj.addOnlineSubscriptionRelatedByRecipientId(obj.copy()); 0733 } 0734 0735 0736 v = getInboxEvents(); 0737 for (int i = 0; i < v.size(); i++) 0738 { 0739 InboxEvent obj = (InboxEvent) v.get(i); 0740 copyObj.addInboxEvent(obj.copy()); 0741 } 0742 0743 0744 v = getOutboxEvents(); 0745 for (int i = 0; i < v.size(); i++) 0746 { 0747 OutboxEvent obj = (OutboxEvent) v.get(i); 0748 copyObj.addOutboxEvent(obj.copy()); 0749 } 0750 0751 0752 v = getSorderItemsRelatedByCustomerId(); 0753 for (int i = 0; i < v.size(); i++) 0754 { 0755 SorderItem obj = (SorderItem) v.get(i); 0756 copyObj.addSorderItemRelatedByCustomerId(obj.copy()); 0757 } 0758 0759 0760 v = getSorderItemsRelatedByRecipientId(); 0761 for (int i = 0; i < v.size(); i++) 0762 { 0763 SorderItem obj = (SorderItem) v.get(i); 0764 copyObj.addSorderItemRelatedByRecipientId(obj.copy()); 0765 } 0766 0767 0768 v = getPaymentItems(); 0769 for (int i = 0; i < v.size(); i++) 0770 { 0771 PaymentItem obj = (PaymentItem) v.get(i); 0772 copyObj.addPaymentItem(obj.copy()); 0773 } 0774 0775 0776 v = getShipmentItemsRelatedByCustomerId(); 0777 for (int i = 0; i < v.size(); i++) 0778 { 0779 ShipmentItem obj = (ShipmentItem) v.get(i); 0780 copyObj.addShipmentItemRelatedByCustomerId(obj.copy()); 0781 } 0782 0783 0784 v = getShipmentItemsRelatedByRecipientId(); 0785 for (int i = 0; i < v.size(); i++) 0786 { 0787 ShipmentItem obj = (ShipmentItem) v.get(i); 0788 copyObj.addShipmentItemRelatedByRecipientId(obj.copy()); 0789 } 0790 0791 0792 v = getServiceItemsRelatedByCustomerId(); 0793 for (int i = 0; i < v.size(); i++) 0794 { 0795 ServiceItem obj = (ServiceItem) v.get(i); 0796 copyObj.addServiceItemRelatedByCustomerId(obj.copy()); 0797 } 0798 0799 0800 v = getServiceItemsRelatedByRecipientId(); 0801 for (int i = 0; i < v.size(); i++) 0802 { 0803 ServiceItem obj = (ServiceItem) v.get(i); 0804 copyObj.addServiceItemRelatedByRecipientId(obj.copy()); 0805 } 0806 return copyObj; 0807 } 0808 0809 0815 public CustomerPeer getPeer() 0816 { 0817 return peer; 0818 } 0819 0820 public String toString() 0821 { 0822 StringBuffer str = new StringBuffer (); 0823 str.append("Customer:\n"); 0824 str.append("CustomerId = ") 0825 .append(getCustomerId()) 0826 .append("\n"); 0827 str.append("CustomerCode = ") 0828 .append(getCustomerCode()) 0829 .append("\n"); 0830 str.append("Status = ") 0831 .append(getStatus()) 0832 .append("\n"); 0833 str.append("Priority = ") 0834 .append(getPriority()) 0835 .append("\n"); 0836 str.append("CustomerType = ") 0837 .append(getCustomerType()) 0838 .append("\n"); 0839 str.append("CustomerCatId = ") 0840 .append(getCustomerCatId()) 0841 .append("\n"); 0842 str.append("CustomerName1 = ") 0843 .append(getCustomerName1()) 0844 .append("\n"); 0845 str.append("CustomerName2 = ") 0846 .append(getCustomerName2()) 0847 .append("\n"); 0848 str.append("CustomerDisplay = ") 0849 .append(getCustomerDisplay()) 0850 .append("\n"); 0851 str.append("Dear = ") 0852 .append(getDear()) 0853 .append("\n"); 0854 str.append("Address1 = ") 0855 .append(getAddress1()) 0856 .append("\n"); 0857 str.append("Address2 = ") 0858 .append(getAddress2()) 0859 .append("\n"); 0860 str.append("City = ") 0861 .append(getCity()) 0862 .append("\n"); 0863 str.append("Zip = ") 0864 .append(getZip()) 0865 .append("\n"); 0866 str.append("State = ") 0867 .append(getState()) 0868 .append("\n"); 0869 str.append("CountryId = ") 0870 .append(getCountryId()) 0871 .append("\n"); 0872 str.append("RegionId = ") 0873 .append(getRegionId()) 0874 .append("\n"); 0875 str.append("Phone1 = ") 0876 .append(getPhone1()) 0877 .append("\n"); 0878 str.append("Phone2 = ") 0879 .append(getPhone2()) 0880 .append("\n"); 0881 str.append("Fax = ") 0882 .append(getFax()) 0883 .append("\n"); 0884 str.append("Email = ") 0885 .append(getEmail()) 0886 .append("\n"); 0887 str.append("EmailFormat = ") 0888 .append(getEmailFormat()) 0889 .append("\n"); 0890 str.append("SendNews = ") 0891 .append(getSendNews()) 0892 .append("\n"); 0893 str.append("WebUrl = ") 0894 .append(getWebUrl()) 0895 .append("\n"); 0896 str.append("LanguageId = ") 0897 .append(getLanguageId()) 0898 .append("\n"); 0899 str.append("Gender = ") 0900 .append(getGender()) 0901 .append("\n"); 0902 str.append("EducationCatId = ") 0903 .append(getEducationCatId()) 0904 .append("\n"); 0905 str.append("HouseholdCatId = ") 0906 .append(getHouseholdCatId()) 0907 .append("\n"); 0908 str.append("Custom1 = ") 0909 .append(getCustom1()) 0910 .append("\n"); 0911 str.append("Custom2 = ") 0912 .append(getCustom2()) 0913 .append("\n"); 0914 str.append("Custom3 = ") 0915 .append(getCustom3()) 0916 .append("\n"); 0917 str.append("Custom4 = ") 0918 .append(getCustom4()) 0919 .append("\n"); 0920 str.append("Custom5 = ") 0921 .append(getCustom5()) 0922 .append("\n"); 0923 str.append("Custom6 = ") 0924 .append(getCustom6()) 0925 .append("\n"); 0926 str.append("Notes = ") 0927 .append(getNotes()) 0928 .append("\n"); 0929 str.append("Created = ") 0930 .append(getCreated()) 0931 .append("\n"); 0932 str.append("Modified = ") 0933 .append(getModified()) 0934 .append("\n"); 0935 str.append("CreatedBy = ") 0936 .append(getCreatedBy()) 0937 .append("\n"); 0938 str.append("ModifiedBy = ") 0939 .append(getModifiedBy()) 0940 .append("\n"); 0941 return(str.toString()); 0942 } 0943} 0944
| Popular Tags
|