KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > campware > cream > om > BaseCustomer


1 package org.campware.cream.om;
2
3
4 import java.math.BigDecimal JavaDoc;
5 import java.sql.Connection JavaDoc;
6 import java.util.ArrayList JavaDoc;
7 import java.util.Collections JavaDoc;
8 import java.util.Date JavaDoc;
9 import java.util.List JavaDoc;
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 /**
33  * This class was autogenerated by Torque on:
34  *
35  * [Wed May 04 09:10:56 CEST 2005]
36  *
37  * You should not use this class directly. It should not even be
38  * extended all references should be to Customer
39  */

40 public abstract class BaseCustomer extends BaseObject
41     implements org.apache.turbine.om.Retrievable
42 {
43     /** The Peer class */
44     private static final CustomerPeer peer =
45         new CustomerPeer();
46
47         
48     /** The value for the customerId field */
49     private int customerId;
50                                                 
51     /** The value for the customerCode field */
52     private String JavaDoc customerCode = "AUTO";
53                                           
54     /** The value for the status field */
55     private int status = 30;
56                                           
57     /** The value for the priority field */
58     private int priority = 30;
59                                           
60     /** The value for the customerType field */
61     private int customerType = 10;
62                                           
63     /** The value for the customerCatId field */
64     private int customerCatId = 1000;
65       
66     /** The value for the customerName1 field */
67     private String JavaDoc customerName1;
68       
69     /** The value for the customerName2 field */
70     private String JavaDoc customerName2;
71       
72     /** The value for the customerDisplay field */
73     private String JavaDoc customerDisplay;
74       
75     /** The value for the dear field */
76     private String JavaDoc dear;
77       
78     /** The value for the address1 field */
79     private String JavaDoc address1;
80       
81     /** The value for the address2 field */
82     private String JavaDoc address2;
83       
84     /** The value for the city field */
85     private String JavaDoc city;
86       
87     /** The value for the zip field */
88     private String JavaDoc zip;
89       
90     /** The value for the state field */
91     private String JavaDoc state;
92                                           
93     /** The value for the countryId field */
94     private int countryId = 1000;
95                                           
96     /** The value for the regionId field */
97     private int regionId = 1000;
98       
99     /** The value for the phone1 field */
100     private String JavaDoc phone1;
101       
102     /** The value for the phone2 field */
103     private String JavaDoc phone2;
104       
105     /** The value for the fax field */
106     private String JavaDoc fax;
107       
108     /** The value for the email field */
109     private String JavaDoc email;
110                                           
111     /** The value for the emailFormat field */
112     private int emailFormat = 10;
113                                           
114     /** The value for the sendNews field */
115     private int sendNews = 20;
116       
117     /** The value for the webUrl field */
118     private String JavaDoc webUrl;
119                                           
120     /** The value for the languageId field */
121     private int languageId = 1000;
122                                           
123     /** The value for the gender field */
124     private int gender = 10;
125                                           
126     /** The value for the educationCatId field */
127     private int educationCatId = 1000;
128                                           
129     /** The value for the householdCatId field */
130     private int householdCatId = 1000;
131       
132     /** The value for the custom1 field */
133     private String JavaDoc custom1;
134       
135     /** The value for the custom2 field */
136     private String JavaDoc custom2;
137       
138     /** The value for the custom3 field */
139     private String JavaDoc custom3;
140       
141     /** The value for the custom4 field */
142     private String JavaDoc custom4;
143       
144     /** The value for the custom5 field */
145     private String JavaDoc custom5;
146       
147     /** The value for the custom6 field */
148     private String JavaDoc custom6;
149       
150     /** The value for the notes field */
151     private String JavaDoc notes;
152       
153     /** The value for the created field */
154     private Date JavaDoc created;
155       
156     /** The value for the modified field */
157     private Date JavaDoc modified;
158       
159     /** The value for the createdBy field */
160     private String JavaDoc createdBy;
161       
162     /** The value for the modifiedBy field */
163     private String JavaDoc modifiedBy;
164   
165     
166     /**
167      * Get the CustomerId
168      *
169      * @return int
170      */

171     public int getCustomerId()
172     {
173         return customerId;
174     }
175
176                                               
177     /**
178      * Set the value of CustomerId
179      *
180      * @param v new value
181      */

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                   // update associated Sorder
194
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                   // update associated Sorder
204
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                   // update associated Payment
214
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                   // update associated Service
224
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                   // update associated Service
234
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                   // update associated Shipment
244
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                   // update associated Shipment
254
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                   // update associated PrintSubscription
264
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                   // update associated PrintSubscription
274
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                   // update associated OnlineSubscription
284
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                   // update associated OnlineSubscription
294
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                   // update associated InboxEvent
304
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                   // update associated OutboxEvent
314
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                   // update associated SorderItem
324
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                   // update associated SorderItem
334
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                   // update associated PaymentItem
344
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                   // update associated ShipmentItem
354
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                   // update associated ShipmentItem
364
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                   // update associated ServiceItem
374
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                   // update associated ServiceItem
384
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     /**
395      * Get the CustomerCode
396      *
397      * @return String
398      */

399     public String JavaDoc getCustomerCode()
400     {
401         return customerCode;
402     }
403
404                         
405     /**
406      * Set the value of CustomerCode
407      *
408      * @param v new value
409      */

410     public void setCustomerCode(String JavaDoc v)
411     {
412     
413                   if (!ObjectUtils.equals(this.customerCode, v))
414               {
415             this.customerCode = v;
416             setModified(true);
417         }
418     
419           
420               }
421   
422     /**
423      * Get the Status
424      *
425      * @return int
426      */

427     public int getStatus()
428     {
429         return status;
430     }
431
432                         
433     /**
434      * Set the value of Status
435      *
436      * @param v new value
437      */

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     /**
451      * Get the Priority
452      *
453      * @return int
454      */

455     public int getPriority()
456     {
457         return priority;
458     }
459
460                         
461     /**
462      * Set the value of Priority
463      *
464      * @param v new value
465      */

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     /**
479      * Get the CustomerType
480      *
481      * @return int
482      */

483     public int getCustomerType()
484     {
485         return customerType;
486     }
487
488                         
489     /**
490      * Set the value of CustomerType
491      *
492      * @param v new value
493      */

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     /**
507      * Get the CustomerCatId
508      *
509      * @return int
510      */

511     public int getCustomerCatId()
512     {
513         return customerCatId;
514     }
515
516                               
517     /**
518      * Set the value of CustomerCatId
519      *
520      * @param v new value
521      */

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     /**
540      * Get the CustomerName1
541      *
542      * @return String
543      */

544     public String JavaDoc getCustomerName1()
545     {
546         return customerName1;
547     }
548
549                         
550     /**
551      * Set the value of CustomerName1
552      *
553      * @param v new value
554      */

555     public void setCustomerName1(String JavaDoc v)
556     {
557     
558                   if (!ObjectUtils.equals(this.customerName1, v))
559               {
560             this.customerName1 = v;
561             setModified(true);
562         }
563     
564           
565               }
566   
567     /**
568      * Get the CustomerName2
569      *
570      * @return String
571      */

572     public String JavaDoc getCustomerName2()
573     {
574         return customerName2;
575     }
576
577                         
578     /**
579      * Set the value of CustomerName2
580      *
581      * @param v new value
582      */

583     public void setCustomerName2(String JavaDoc v)
584     {
585     
586                   if (!ObjectUtils.equals(this.customerName2, v))
587               {
588             this.customerName2 = v;
589             setModified(true);
590         }
591     
592           
593               }
594   
595     /**
596      * Get the CustomerDisplay
597      *
598      * @return String
599      */

600     public String JavaDoc getCustomerDisplay()
601     {
602         return customerDisplay;
603     }
604
605                         
606     /**
607      * Set the value of CustomerDisplay
608      *
609      * @param v new value
610      */

611     public void setCustomerDisplay(String JavaDoc v)
612     {
613     
614                   if (!ObjectUtils.equals(this.customerDisplay, v))
615               {
616             this.customerDisplay = v;
617             setModified(true);
618         }
619     
620           
621               }
622   
623     /**
624      * Get the Dear
625      *
626      * @return String
627      */

628     public String JavaDoc getDear()
629     {
630         return dear;
631     }
632
633                         
634     /**
635      * Set the value of Dear
636      *
637      * @param v new value
638      */

639     public void setDear(String JavaDoc v)
640     {
641     
642                   if (!ObjectUtils.equals(this.dear, v))
643               {
644             this.dear = v;
645             setModified(true);
646         }
647     
648           
649               }
650   
651     /**
652      * Get the Address1
653      *
654      * @return String
655      */

656     public String JavaDoc getAddress1()
657     {
658         return address1;
659     }
660
661                         
662     /**
663      * Set the value of Address1
664      *
665      * @param v new value
666      */

667     public void setAddress1(String JavaDoc v)
668     {
669     
670                   if (!ObjectUtils.equals(this.address1, v))
671               {
672             this.address1 = v;
673             setModified(true);
674         }
675     
676           
677               }
678   
679     /**
680      * Get the Address2
681      *
682      * @return String
683      */

684     public String JavaDoc getAddress2()
685     {
686         return address2;
687     }
688
689                         
690     /**
691      * Set the value of Address2
692      *
693      * @param v new value
694      */

695     public void setAddress2(String JavaDoc v)
696     {
697     
698                   if (!ObjectUtils.equals(this.address2, v))
699               {
700             this.address2 = v;
701             setModified(true);
702         }
703     
704           
705               }
706   
707     /**
708      * Get the City
709      *
710      * @return String
711      */

712     public String JavaDoc getCity()
713     {
714         return city;
715     }
716
717                         
718     /**
719      * Set the value of City
720      *
721      * @param v new value
722      */

723     public void setCity(String JavaDoc v)
724     {
725     
726                   if (!ObjectUtils.equals(this.city, v))
727               {
728             this.city = v;
729             setModified(true);
730         }
731     
732           
733               }
734   
735     /**
736      * Get the Zip
737      *
738      * @return String
739      */

740     public String JavaDoc getZip()
741     {
742         return zip;
743     }
744
745                         
746     /**
747      * Set the value of Zip
748      *
749      * @param v new value
750      */

751     public void setZip(String JavaDoc v)
752     {
753     
754                   if (!ObjectUtils.equals(this.zip, v))
755               {
756             this.zip = v;
757             setModified(true);
758         }
759     
760           
761               }
762   
763     /**
764      * Get the State
765      *
766      * @return String
767      */

768     public String JavaDoc getState()
769     {
770         return state;
771     }
772
773                         
774     /**
775      * Set the value of State
776      *
777      * @param v new value
778      */

779     public void setState(String JavaDoc v)
780     {
781     
782                   if (!ObjectUtils.equals(this.state, v))
783               {
784             this.state = v;
785             setModified(true);
786         }
787     
788           
789               }
790   
791     /**
792      * Get the CountryId
793      *
794      * @return int
795      */

796     public int getCountryId()
797     {
798         return countryId;
799     }
800
801                               
802     /**
803      * Set the value of CountryId
804      *
805      * @param v new value
806      */

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     /**
825      * Get the RegionId
826      *
827      * @return int
828      */

829     public int getRegionId()
830     {
831         return regionId;
832     }
833
834                               
835     /**
836      * Set the value of RegionId
837      *
838      * @param v new value
839      */

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     /**
858      * Get the Phone1
859      *
860      * @return String
861      */

862     public String JavaDoc getPhone1()
863     {
864         return phone1;
865     }
866
867                         
868     /**
869      * Set the value of Phone1
870      *
871      * @param v new value
872      */

873     public void setPhone1(String JavaDoc v)
874     {
875     
876                   if (!ObjectUtils.equals(this.phone1, v))
877               {
878             this.phone1 = v;
879             setModified(true);
880         }
881     
882           
883               }
884   
885     /**
886      * Get the Phone2
887      *
888      * @return String
889      */

890     public String JavaDoc getPhone2()
891     {
892         return phone2;
893     }
894
895                         
896     /**
897      * Set the value of Phone2
898      *
899      * @param v new value
900      */

901     public void setPhone2(String JavaDoc v)
902     {
903     
904                   if (!ObjectUtils.equals(this.phone2, v))
905               {
906             this.phone2 = v;
907             setModified(true);
908         }
909     
910           
911               }
912   
913     /**
914      * Get the Fax
915      *
916      * @return String
917      */

918     public String JavaDoc getFax()
919     {
920         return fax;
921     }
922
923                         
924     /**
925      * Set the value of Fax
926      *
927      * @param v new value
928      */

929     public void setFax(String JavaDoc v)
930     {
931     
932                   if (!ObjectUtils.equals(this.fax, v))
933               {
934             this.fax = v;
935             setModified(true);
936         }
937     
938           
939               }
940   
941     /**
942      * Get the Email
943      *
944      * @return String
945      */

946     public String JavaDoc getEmail()
947     {
948         return email;
949     }
950
951                         
952     /**
953      * Set the value of Email
954      *
955      * @param v new value
956      */

957     public void setEmail(String JavaDoc v)
958     {
959     
960                   if (!ObjectUtils.equals(this.email, v))
961               {
962             this.email = v;
963             setModified(true);
964         }
965     
966           
967               }
968   
969     /**
970      * Get the EmailFormat
971      *
972      * @return int
973      */

974     public int getEmailFormat()
975     {
976         return emailFormat;
977     }
978
979                         
980     /**
981      * Set the value of EmailFormat
982      *
983      * @param v new value
984      */

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     /**
998      * Get the SendNews
999      *
1000     * @return int
1001     */

1002    public int getSendNews()
1003    {
1004        return sendNews;
1005    }
1006
1007                        
1008    /**
1009     * Set the value of SendNews
1010     *
1011     * @param v new value
1012     */

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    /**
1026     * Get the WebUrl
1027     *
1028     * @return String
1029     */

1030    public String JavaDoc getWebUrl()
1031    {
1032        return webUrl;
1033    }
1034
1035                        
1036    /**
1037     * Set the value of WebUrl
1038     *
1039     * @param v new value
1040     */

1041    public void setWebUrl(String JavaDoc v)
1042    {
1043    
1044                  if (!ObjectUtils.equals(this.webUrl, v))
1045              {
1046            this.webUrl = v;
1047            setModified(true);
1048        }
1049    
1050          
1051              }
1052  
1053    /**
1054     * Get the LanguageId
1055     *
1056     * @return int
1057     */

1058    public int getLanguageId()
1059    {
1060        return languageId;
1061    }
1062
1063                              
1064    /**
1065     * Set the value of LanguageId
1066     *
1067     * @param v new value
1068     */

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    /**
1087     * Get the Gender
1088     *
1089     * @return int
1090     */

1091    public int getGender()
1092    {
1093        return gender;
1094    }
1095
1096                        
1097    /**
1098     * Set the value of Gender
1099     *
1100     * @param v new value
1101     */

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    /**
1115     * Get the EducationCatId
1116     *
1117     * @return int
1118     */

1119    public int getEducationCatId()
1120    {
1121        return educationCatId;
1122    }
1123
1124                              
1125    /**
1126     * Set the value of EducationCatId
1127     *
1128     * @param v new value
1129     */

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    /**
1148     * Get the HouseholdCatId
1149     *
1150     * @return int
1151     */

1152    public int getHouseholdCatId()
1153    {
1154        return householdCatId;
1155    }
1156
1157                              
1158    /**
1159     * Set the value of HouseholdCatId
1160     *
1161     * @param v new value
1162     */

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    /**
1181     * Get the Custom1
1182     *
1183     * @return String
1184     */

1185    public String JavaDoc getCustom1()
1186    {
1187        return custom1;
1188    }
1189
1190                        
1191    /**
1192     * Set the value of Custom1
1193     *
1194     * @param v new value
1195     */

1196    public void setCustom1(String JavaDoc v)
1197    {
1198    
1199                  if (!ObjectUtils.equals(this.custom1, v))
1200              {
1201            this.custom1 = v;
1202            setModified(true);
1203        }
1204    
1205          
1206              }
1207  
1208    /**
1209     * Get the Custom2
1210     *
1211     * @return String
1212     */

1213    public String JavaDoc getCustom2()
1214    {
1215        return custom2;
1216    }
1217
1218                        
1219    /**
1220     * Set the value of Custom2
1221     *
1222     * @param v new value
1223     */

1224    public void setCustom2(String JavaDoc v)
1225    {
1226    
1227                  if (!ObjectUtils.equals(this.custom2, v))
1228              {
1229            this.custom2 = v;
1230            setModified(true);
1231        }
1232    
1233          
1234              }
1235  
1236    /**
1237     * Get the Custom3
1238     *
1239     * @return String
1240     */

1241    public String JavaDoc getCustom3()
1242    {
1243        return custom3;
1244    }
1245
1246                        
1247    /**
1248     * Set the value of Custom3
1249     *
1250     * @param v new value
1251     */

1252    public void setCustom3(String JavaDoc v)
1253    {
1254    
1255                  if (!ObjectUtils.equals(this.custom3, v))
1256              {
1257            this.custom3 = v;
1258            setModified(true);
1259        }
1260    
1261          
1262              }
1263  
1264    /**
1265     * Get the Custom4
1266     *
1267     * @return String
1268     */

1269    public String JavaDoc getCustom4()
1270    {
1271        return custom4;
1272    }
1273
1274                        
1275    /**
1276     * Set the value of Custom4
1277     *
1278     * @param v new value
1279     */

1280    public void setCustom4(String JavaDoc v)
1281    {
1282    
1283                  if (!ObjectUtils.equals(this.custom4, v))
1284              {
1285            this.custom4 = v;
1286            setModified(true);
1287        }
1288    
1289          
1290              }
1291  
1292    /**
1293     * Get the Custom5
1294     *
1295     * @return String
1296     */

1297    public String JavaDoc getCustom5()
1298    {
1299        return custom5;
1300    }
1301
1302                        
1303    /**
1304     * Set the value of Custom5
1305     *
1306     * @param v new value
1307     */

1308    public void setCustom5(String JavaDoc v)
1309    {
1310    
1311                  if (!ObjectUtils.equals(this.custom5, v))
1312              {
1313            this.custom5 = v;
1314            setModified(true);
1315        }
1316    
1317          
1318              }
1319  
1320    /**
1321     * Get the Custom6
1322     *
1323     * @return String
1324     */

1325    public String JavaDoc getCustom6()
1326    {
1327        return custom6;
1328    }
1329
1330                        
1331    /**
1332     * Set the value of Custom6
1333     *
1334     * @param v new value
1335     */

1336    public void setCustom6(String JavaDoc v)
1337    {
1338    
1339                  if (!ObjectUtils.equals(this.custom6, v))
1340              {
1341            this.custom6 = v;
1342            setModified(true);
1343        }
1344    
1345          
1346              }
1347  
1348    /**
1349     * Get the Notes
1350     *
1351     * @return String
1352     */

1353    public String JavaDoc getNotes()
1354    {
1355        return notes;
1356    }
1357
1358                        
1359    /**
1360     * Set the value of Notes
1361     *
1362     * @param v new value
1363     */

1364    public void setNotes(String JavaDoc v)
1365    {
1366    
1367                  if (!ObjectUtils.equals(this.notes, v))
1368              {
1369            this.notes = v;
1370            setModified(true);
1371        }
1372    
1373          
1374              }
1375  
1376    /**
1377     * Get the Created
1378     *
1379     * @return Date
1380     */

1381    public Date JavaDoc getCreated()
1382    {
1383        return created;
1384    }
1385
1386                        
1387    /**
1388     * Set the value of Created
1389     *
1390     * @param v new value
1391     */

1392    public void setCreated(Date JavaDoc v)
1393    {
1394    
1395                  if (!ObjectUtils.equals(this.created, v))
1396              {
1397            this.created = v;
1398            setModified(true);
1399        }
1400    
1401          
1402              }
1403  
1404    /**
1405     * Get the Modified
1406     *
1407     * @return Date
1408     */

1409    public Date JavaDoc getModified()
1410    {
1411        return modified;
1412    }
1413
1414                        
1415    /**
1416     * Set the value of Modified
1417     *
1418     * @param v new value
1419     */

1420    public void setModified(Date JavaDoc v)
1421    {
1422    
1423                  if (!ObjectUtils.equals(this.modified, v))
1424              {
1425            this.modified = v;
1426            setModified(true);
1427        }
1428    
1429          
1430              }
1431  
1432    /**
1433     * Get the CreatedBy
1434     *
1435     * @return String
1436     */

1437    public String JavaDoc getCreatedBy()
1438    {
1439        return createdBy;
1440    }
1441
1442                        
1443    /**
1444     * Set the value of CreatedBy
1445     *
1446     * @param v new value
1447     */

1448    public void setCreatedBy(String JavaDoc v)
1449    {
1450    
1451                  if (!ObjectUtils.equals(this.createdBy, v))
1452              {
1453            this.createdBy = v;
1454            setModified(true);
1455        }
1456    
1457          
1458              }
1459  
1460    /**
1461     * Get the ModifiedBy
1462     *
1463     * @return String
1464     */

1465    public String JavaDoc getModifiedBy()
1466    {
1467        return modifiedBy;
1468    }
1469
1470                        
1471    /**
1472     * Set the value of ModifiedBy
1473     *
1474     * @param v new value
1475     */

1476    public void setModifiedBy(String JavaDoc 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    /**
1495     * Declares an association between this object and a CustomerCategory object
1496     *
1497     * @param v CustomerCategory
1498     * @throws TorqueException
1499     */

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    /**
1515     * Get the associated CustomerCategory object
1516     *
1517     * @return the associated CustomerCategory object
1518     * @throws TorqueException
1519     */

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            /* The following can be used instead of the line above to
1527               guarantee the related object contains a reference
1528               to this object, but this level of coupling
1529               may be undesirable in many circumstances.
1530               As it can lead to a db query with many results that may
1531               never be used.
1532               CustomerCategory obj = CustomerCategoryPeer.retrieveByPK(this.customerCatId);
1533               obj.addCustomers(this);
1534            */

1535        }
1536        return aCustomerCategory;
1537    }
1538
1539    /**
1540     * Provides convenient way to set a relationship based on a
1541     * ObjectKey, for example
1542     * <code>bar.setFooKey(foo.getPrimaryKey())</code>
1543     *
1544         */

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    /**
1557     * Declares an association between this object and a Country object
1558     *
1559     * @param v Country
1560     * @throws TorqueException
1561     */

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    /**
1577     * Get the associated Country object
1578     *
1579     * @return the associated Country object
1580     * @throws TorqueException
1581     */

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            /* The following can be used instead of the line above to
1589               guarantee the related object contains a reference
1590               to this object, but this level of coupling
1591               may be undesirable in many circumstances.
1592               As it can lead to a db query with many results that may
1593               never be used.
1594               Country obj = CountryPeer.retrieveByPK(this.countryId);
1595               obj.addCustomers(this);
1596            */

1597        }
1598        return aCountry;
1599    }
1600
1601    /**
1602     * Provides convenient way to set a relationship based on a
1603     * ObjectKey, for example
1604     * <code>bar.setFooKey(foo.getPrimaryKey())</code>
1605     *
1606         */

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    /**
1619     * Declares an association between this object and a Region object
1620     *
1621     * @param v Region
1622     * @throws TorqueException
1623     */

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    /**
1639     * Get the associated Region object
1640     *
1641     * @return the associated Region object
1642     * @throws TorqueException
1643     */

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            /* The following can be used instead of the line above to
1651               guarantee the related object contains a reference
1652               to this object, but this level of coupling
1653               may be undesirable in many circumstances.
1654               As it can lead to a db query with many results that may
1655               never be used.
1656               Region obj = RegionPeer.retrieveByPK(this.regionId);
1657               obj.addCustomers(this);
1658            */

1659        }
1660        return aRegion;
1661    }
1662
1663    /**
1664     * Provides convenient way to set a relationship based on a
1665     * ObjectKey, for example
1666     * <code>bar.setFooKey(foo.getPrimaryKey())</code>
1667     *
1668         */

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    /**
1681     * Declares an association between this object and a Language object
1682     *
1683     * @param v Language
1684     * @throws TorqueException
1685     */

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    /**
1701     * Get the associated Language object
1702     *
1703     * @return the associated Language object
1704     * @throws TorqueException
1705     */

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            /* The following can be used instead of the line above to
1713               guarantee the related object contains a reference
1714               to this object, but this level of coupling
1715               may be undesirable in many circumstances.
1716               As it can lead to a db query with many results that may
1717               never be used.
1718               Language obj = LanguagePeer.retrieveByPK(this.languageId);
1719               obj.addCustomers(this);
1720            */

1721        }
1722        return aLanguage;
1723    }
1724
1725    /**
1726     * Provides convenient way to set a relationship based on a
1727     * ObjectKey, for example
1728     * <code>bar.setFooKey(foo.getPrimaryKey())</code>
1729     *
1730         */

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    /**
1743     * Declares an association between this object and a EducationCategory object
1744     *
1745     * @param v EducationCategory
1746     * @throws TorqueException
1747     */

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    /**
1763     * Get the associated EducationCategory object
1764     *
1765     * @return the associated EducationCategory object
1766     * @throws TorqueException
1767     */

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            /* The following can be used instead of the line above to
1775               guarantee the related object contains a reference
1776               to this object, but this level of coupling
1777               may be undesirable in many circumstances.
1778               As it can lead to a db query with many results that may
1779               never be used.
1780               EducationCategory obj = EducationCategoryPeer.retrieveByPK(this.educationCatId);
1781               obj.addCustomers(this);
1782            */

1783        }
1784        return aEducationCategory;
1785    }
1786
1787    /**
1788     * Provides convenient way to set a relationship based on a
1789     * ObjectKey, for example
1790     * <code>bar.setFooKey(foo.getPrimaryKey())</code>
1791     *
1792         */

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    /**
1805     * Declares an association between this object and a HouseholdCategory object
1806     *
1807     * @param v HouseholdCategory
1808     * @throws TorqueException
1809     */

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    /**
1825     * Get the associated HouseholdCategory object
1826     *
1827     * @return the associated HouseholdCategory object
1828     * @throws TorqueException
1829     */

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            /* The following can be used instead of the line above to
1837               guarantee the related object contains a reference
1838               to this object, but this level of coupling
1839               may be undesirable in many circumstances.
1840               As it can lead to a db query with many results that may
1841               never be used.
1842               HouseholdCategory obj = HouseholdCategoryPeer.retrieveByPK(this.householdCatId);
1843               obj.addCustomers(this);
1844            */

1845        }
1846        return aHouseholdCategory;
1847    }
1848
1849    /**
1850     * Provides convenient way to set a relationship based on a
1851     * ObjectKey, for example
1852     * <code>bar.setFooKey(foo.getPrimaryKey())</code>
1853     *
1854         */

1855    public void setHouseholdCategoryKey(ObjectKey key) throws TorqueException
1856    {
1857      
1858                        setHouseholdCatId(((NumberKey) key).intValue());
1859                  }
1860       
1861                                        
1862            
1863          /**
1864     * Collection to store aggregation of collSordersRelatedByCustomerId
1865     */

1866    protected List JavaDoc collSordersRelatedByCustomerId;
1867
1868    /**
1869     * Temporary storage of collSordersRelatedByCustomerId to save a possible db hit in
1870     * the event objects are add to the collection, but the
1871     * complete collection is never requested.
1872     */

1873    protected void initSordersRelatedByCustomerId()
1874    {
1875        if (collSordersRelatedByCustomerId == null)
1876        {
1877            collSordersRelatedByCustomerId = new ArrayList JavaDoc();
1878        }
1879    }
1880
1881    /**
1882     * Method called to associate a Sorder object to this object
1883     * through the Sorder foreign key attribute
1884     *
1885     * @param l Sorder
1886     * @throws TorqueException
1887     */

1888    public void addSorderRelatedByCustomerId(Sorder l) throws TorqueException
1889    {
1890        getSordersRelatedByCustomerId().add(l);
1891        l.setCustomerRelatedByCustomerId((Customer) this);
1892    }
1893
1894    /**
1895     * The criteria used to select the current contents of collSordersRelatedByCustomerId
1896     */

1897    private Criteria lastSordersRelatedByCustomerIdCriteria = null;
1898      
1899    /**
1900     * If this collection has already been initialized, returns
1901     * the collection. Otherwise returns the results of
1902     * getSordersRelatedByCustomerId(new Criteria())
1903     *
1904     * @throws TorqueException
1905     */

1906    public List JavaDoc getSordersRelatedByCustomerId() throws TorqueException
1907    {
1908              if (collSordersRelatedByCustomerId == null)
1909        {
1910            collSordersRelatedByCustomerId = getSordersRelatedByCustomerId(new Criteria(10));
1911        }
1912        return collSordersRelatedByCustomerId;
1913          }
1914
1915    /**
1916     * If this collection has already been initialized with
1917     * an identical criteria, it returns the collection.
1918     * Otherwise if this Customer has previously
1919     * been saved, it will retrieve related SordersRelatedByCustomerId from storage.
1920     * If this Customer is new, it will return
1921     * an empty collection or the current collection, the criteria
1922     * is ignored on a new object.
1923     *
1924     * @throws TorqueException
1925     */

1926    public List JavaDoc getSordersRelatedByCustomerId(Criteria criteria) throws TorqueException
1927    {
1928              if (collSordersRelatedByCustomerId == null)
1929        {
1930            if (isNew())
1931            {
1932               collSordersRelatedByCustomerId = new ArrayList JavaDoc();
1933            }
1934            else
1935            {
1936                        criteria.add(SorderPeer.CUSTOMER_ID, getCustomerId() );
1937                        collSordersRelatedByCustomerId = SorderPeer.doSelect(criteria);
1938            }
1939        }
1940        else
1941        {
1942            // criteria has no effect for a new object
1943
if (!isNew())
1944            {
1945                // the following code is to determine if a new query is
1946
// called for. If the criteria is the same as the last
1947
// one, just return the collection.
1948
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    /**
1961     * If this collection has already been initialized, returns
1962     * the collection. Otherwise returns the results of
1963     * getSordersRelatedByCustomerId(new Criteria(),Connection)
1964     * This method takes in the Connection also as input so that
1965     * referenced objects can also be obtained using a Connection
1966     * that is taken as input
1967     */

1968    public List JavaDoc getSordersRelatedByCustomerId(Connection JavaDoc con) throws TorqueException
1969    {
1970              if (collSordersRelatedByCustomerId == null)
1971        {
1972            collSordersRelatedByCustomerId = getSordersRelatedByCustomerId(new Criteria(10), con);
1973        }
1974        return collSordersRelatedByCustomerId;
1975          }
1976
1977    /**
1978     * If this collection has already been initialized with
1979     * an identical criteria, it returns the collection.
1980     * Otherwise if this Customer has previously
1981     * been saved, it will retrieve related SordersRelatedByCustomerId from storage.
1982     * If this Customer is new, it will return
1983     * an empty collection or the current collection, the criteria
1984     * is ignored on a new object.
1985     * This method takes in the Connection also as input so that
1986     * referenced objects can also be obtained using a Connection
1987     * that is taken as input
1988     */

1989    public List JavaDoc getSordersRelatedByCustomerId(Criteria criteria, Connection JavaDoc con)
1990            throws TorqueException
1991    {
1992              if (collSordersRelatedByCustomerId == null)
1993        {
1994            if (isNew())
1995            {
1996               collSordersRelatedByCustomerId = new ArrayList JavaDoc();
1997            }
1998            else
1999            {
2000                         criteria.add(SorderPeer.CUSTOMER_ID, getCustomerId());
2001                         collSordersRelatedByCustomerId = SorderPeer.doSelect(criteria, con);
2002             }
2003         }
2004         else
2005         {
2006             // criteria has no effect for a new object
2007
if (!isNew())
2008             {
2009                 // the following code is to determine if a new query is
2010
// called for. If the criteria is the same as the last
2011
// one, just return the collection.
2012
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    /**
2043     * If this collection has already been initialized with
2044     * an identical criteria, it returns the collection.
2045     * Otherwise if this Customer is new, it will return
2046     * an empty collection; or if this Customer has previously
2047     * been saved, it will retrieve related SordersRelatedByCustomerId from storage.
2048     *
2049     * This method is protected by default in order to keep the public
2050     * api reasonable. You can provide public methods for those you
2051     * actually need in Customer.
2052     */

2053    protected List JavaDoc getSordersRelatedByCustomerIdJoinCustomerRelatedByRecipientId(Criteria criteria)
2054        throws TorqueException
2055    {
2056                    if (collSordersRelatedByCustomerId == null)
2057        {
2058            if (isNew())
2059            {
2060               collSordersRelatedByCustomerId = new ArrayList JavaDoc();
2061            }
2062            else
2063            {
2064                              criteria.add(SorderPeer.CUSTOMER_ID, getCustomerId());
2065                              collSordersRelatedByCustomerId = SorderPeer.doSelectJoinCustomerRelatedByRecipientId(criteria);
2066            }
2067        }
2068        else
2069        {
2070            // the following code is to determine if a new query is
2071
// called for. If the criteria is the same as the last
2072
// one, just return the collection.
2073

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    /**
2094     * If this collection has already been initialized with
2095     * an identical criteria, it returns the collection.
2096     * Otherwise if this Customer is new, it will return
2097     * an empty collection; or if this Customer has previously
2098     * been saved, it will retrieve related SordersRelatedByCustomerId from storage.
2099     *
2100     * This method is protected by default in order to keep the public
2101     * api reasonable. You can provide public methods for those you
2102     * actually need in Customer.
2103     */

2104    protected List JavaDoc getSordersRelatedByCustomerIdJoinProject(Criteria criteria)
2105        throws TorqueException
2106    {
2107                    if (collSordersRelatedByCustomerId == null)
2108        {
2109            if (isNew())
2110            {
2111               collSordersRelatedByCustomerId = new ArrayList JavaDoc();
2112            }
2113            else
2114            {
2115                              criteria.add(SorderPeer.CUSTOMER_ID, getCustomerId());
2116                              collSordersRelatedByCustomerId = SorderPeer.doSelectJoinProject(criteria);
2117            }
2118        }
2119        else
2120        {
2121            // the following code is to determine if a new query is
2122
// called for. If the criteria is the same as the last
2123
// one, just return the collection.
2124

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    /**
2145     * If this collection has already been initialized with
2146     * an identical criteria, it returns the collection.
2147     * Otherwise if this Customer is new, it will return
2148     * an empty collection; or if this Customer has previously
2149     * been saved, it will retrieve related SordersRelatedByCustomerId from storage.
2150     *
2151     * This method is protected by default in order to keep the public
2152     * api reasonable. You can provide public methods for those you
2153     * actually need in Customer.
2154     */

2155    protected List JavaDoc getSordersRelatedByCustomerIdJoinCarrier(Criteria criteria)
2156        throws TorqueException
2157    {
2158                    if (collSordersRelatedByCustomerId == null)
2159        {
2160            if (isNew())
2161            {
2162               collSordersRelatedByCustomerId = new ArrayList JavaDoc();
2163            }
2164            else
2165            {
2166                              criteria.add(SorderPeer.CUSTOMER_ID, getCustomerId());
2167                              collSordersRelatedByCustomerId = SorderPeer.doSelectJoinCarrier(criteria);
2168            }
2169        }
2170        else
2171        {
2172            // the following code is to determine if a new query is
2173
// called for. If the criteria is the same as the last
2174
// one, just return the collection.
2175

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    /**
2196     * If this collection has already been initialized with
2197     * an identical criteria, it returns the collection.
2198     * Otherwise if this Customer is new, it will return
2199     * an empty collection; or if this Customer has previously
2200     * been saved, it will retrieve related SordersRelatedByCustomerId from storage.
2201     *
2202     * This method is protected by default in order to keep the public
2203     * api reasonable. You can provide public methods for those you
2204     * actually need in Customer.
2205     */

2206    protected List JavaDoc getSordersRelatedByCustomerIdJoinCurrency(Criteria criteria)
2207        throws TorqueException
2208    {
2209                    if (collSordersRelatedByCustomerId == null)
2210        {
2211            if (isNew())
2212            {
2213               collSordersRelatedByCustomerId = new ArrayList JavaDoc();
2214            }
2215            else
2216            {
2217                              criteria.add(SorderPeer.CUSTOMER_ID, getCustomerId());
2218                              collSordersRelatedByCustomerId = SorderPeer.doSelectJoinCurrency(criteria);
2219            }
2220        }
2221        else
2222        {
2223            // the following code is to determine if a new query is
2224
// called for. If the criteria is the same as the last
2225
// one, just return the collection.
2226

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          /**
2243     * Collection to store aggregation of collSordersRelatedByRecipientId
2244     */

2245    protected List JavaDoc collSordersRelatedByRecipientId;
2246
2247    /**
2248     * Temporary storage of collSordersRelatedByRecipientId to save a possible db hit in
2249     * the event objects are add to the collection, but the
2250     * complete collection is never requested.
2251     */

2252    protected void initSordersRelatedByRecipientId()
2253    {
2254        if (collSordersRelatedByRecipientId == null)
2255        {
2256            collSordersRelatedByRecipientId = new ArrayList JavaDoc();
2257        }
2258    }
2259
2260    /**
2261     * Method called to associate a Sorder object to this object
2262     * through the Sorder foreign key attribute
2263     *
2264     * @param l Sorder
2265     * @throws TorqueException
2266     */

2267    public void addSorderRelatedByRecipientId(Sorder l) throws TorqueException
2268    {
2269        getSordersRelatedByRecipientId().add(l);
2270        l.setCustomerRelatedByRecipientId((Customer) this);
2271    }
2272
2273    /**
2274     * The criteria used to select the current contents of collSordersRelatedByRecipientId
2275     */

2276    private Criteria lastSordersRelatedByRecipientIdCriteria = null;
2277      
2278    /**
2279     * If this collection has already been initialized, returns
2280     * the collection. Otherwise returns the results of
2281     * getSordersRelatedByRecipientId(new Criteria())
2282     *
2283     * @throws TorqueException
2284     */

2285    public List JavaDoc getSordersRelatedByRecipientId() throws TorqueException
2286    {
2287              if (collSordersRelatedByRecipientId == null)
2288        {
2289            collSordersRelatedByRecipientId = getSordersRelatedByRecipientId(new Criteria(10));
2290        }
2291        return collSordersRelatedByRecipientId;
2292          }
2293
2294    /**
2295     * If this collection has already been initialized with
2296     * an identical criteria, it returns the collection.
2297     * Otherwise if this Customer has previously
2298     * been saved, it will retrieve related SordersRelatedByRecipientId from storage.
2299     * If this Customer is new, it will return
2300     * an empty collection or the current collection, the criteria
2301     * is ignored on a new object.
2302     *
2303     * @throws TorqueException
2304     */

2305    public List JavaDoc getSordersRelatedByRecipientId(Criteria criteria) throws TorqueException
2306    {
2307              if (collSordersRelatedByRecipientId == null)
2308        {
2309            if (isNew())
2310            {
2311               collSordersRelatedByRecipientId = new ArrayList JavaDoc();
2312            }
2313            else
2314            {
2315                        criteria.add(SorderPeer.RECIPIENT_ID, getCustomerId() );
2316                        collSordersRelatedByRecipientId = SorderPeer.doSelect(criteria);
2317            }
2318        }
2319        else
2320        {
2321            // criteria has no effect for a new object
2322
if (!isNew())
2323            {
2324                // the following code is to determine if a new query is
2325
// called for. If the criteria is the same as the last
2326
// one, just return the collection.
2327
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    /**
2340     * If this collection has already been initialized, returns
2341     * the collection. Otherwise returns the results of
2342     * getSordersRelatedByRecipientId(new Criteria(),Connection)
2343     * This method takes in the Connection also as input so that
2344     * referenced objects can also be obtained using a Connection
2345     * that is taken as input
2346     */

2347    public List JavaDoc getSordersRelatedByRecipientId(Connection JavaDoc con) throws TorqueException
2348    {
2349              if (collSordersRelatedByRecipientId == null)
2350        {
2351            collSordersRelatedByRecipientId = getSordersRelatedByRecipientId(new Criteria(10), con);
2352        }
2353        return collSordersRelatedByRecipientId;
2354          }
2355
2356    /**
2357     * If this collection has already been initialized with
2358     * an identical criteria, it returns the collection.
2359     * Otherwise if this Customer has previously
2360     * been saved, it will retrieve related SordersRelatedByRecipientId from storage.
2361     * If this Customer is new, it will return
2362     * an empty collection or the current collection, the criteria
2363     * is ignored on a new object.
2364     * This method takes in the Connection also as input so that
2365     * referenced objects can also be obtained using a Connection
2366     * that is taken as input
2367     */

2368    public List JavaDoc getSordersRelatedByRecipientId(Criteria criteria, Connection JavaDoc con)
2369            throws TorqueException
2370    {
2371              if (collSordersRelatedByRecipientId == null)
2372        {
2373            if (isNew())
2374            {
2375               collSordersRelatedByRecipientId = new ArrayList JavaDoc();
2376            }
2377            else
2378            {
2379                         criteria.add(SorderPeer.RECIPIENT_ID, getCustomerId());
2380                         collSordersRelatedByRecipientId = SorderPeer.doSelect(criteria, con);
2381             }
2382         }
2383         else
2384         {
2385             // criteria has no effect for a new object
2386
if (!isNew())
2387             {
2388                 // the following code is to determine if a new query is
2389
// called for. If the criteria is the same as the last
2390
// one, just return the collection.
2391
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    /**
2414     * If this collection has already been initialized with
2415     * an identical criteria, it returns the collection.
2416     * Otherwise if this Customer is new, it will return
2417     * an empty collection; or if this Customer has previously
2418     * been saved, it will retrieve related SordersRelatedByRecipientId from storage.
2419     *
2420     * This method is protected by default in order to keep the public
2421     * api reasonable. You can provide public methods for those you
2422     * actually need in Customer.
2423     */

2424    protected List JavaDoc getSordersRelatedByRecipientIdJoinCustomerRelatedByCustomerId(Criteria criteria)
2425        throws TorqueException
2426    {
2427                    if (collSordersRelatedByRecipientId == null)
2428        {
2429            if (isNew())
2430            {
2431               collSordersRelatedByRecipientId = new ArrayList JavaDoc();
2432            }
2433            else
2434            {
2435                              criteria.add(SorderPeer.RECIPIENT_ID, getCustomerId());
2436                              collSordersRelatedByRecipientId = SorderPeer.doSelectJoinCustomerRelatedByCustomerId(criteria);
2437            }
2438        }
2439        else
2440        {
2441            // the following code is to determine if a new query is
2442
// called for. If the criteria is the same as the last
2443
// one, just return the collection.
2444

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    /**
2473     * If this collection has already been initialized with
2474     * an identical criteria, it returns the collection.
2475     * Otherwise if this Customer is new, it will return
2476     * an empty collection; or if this Customer has previously
2477     * been saved, it will retrieve related SordersRelatedByRecipientId from storage.
2478     *
2479     * This method is protected by default in order to keep the public
2480     * api reasonable. You can provide public methods for those you
2481     * actually need in Customer.
2482     */

2483    protected List JavaDoc getSordersRelatedByRecipientIdJoinProject(Criteria criteria)
2484        throws TorqueException
2485    {
2486                    if (collSordersRelatedByRecipientId == null)
2487        {
2488            if (isNew())
2489            {
2490               collSordersRelatedByRecipientId = new ArrayList JavaDoc();
2491            }
2492            else
2493            {
2494                              criteria.add(SorderPeer.RECIPIENT_ID, getCustomerId());
2495                              collSordersRelatedByRecipientId = SorderPeer.doSelectJoinProject(criteria);
2496            }
2497        }
2498        else
2499        {
2500            // the following code is to determine if a new query is
2501
// called for. If the criteria is the same as the last
2502
// one, just return the collection.
2503

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    /**
2524     * If this collection has already been initialized with
2525     * an identical criteria, it returns the collection.
2526     * Otherwise if this Customer is new, it will return
2527     * an empty collection; or if this Customer has previously
2528     * been saved, it will retrieve related SordersRelatedByRecipientId from storage.
2529     *
2530     * This method is protected by default in order to keep the public
2531     * api reasonable. You can provide public methods for those you
2532     * actually need in Customer.
2533     */

2534    protected List JavaDoc getSordersRelatedByRecipientIdJoinCarrier(Criteria criteria)
2535        throws TorqueException
2536    {
2537                    if (collSordersRelatedByRecipientId == null)
2538        {
2539            if (isNew())
2540            {
2541               collSordersRelatedByRecipientId = new ArrayList JavaDoc();
2542            }
2543            else
2544            {
2545                              criteria.add(SorderPeer.RECIPIENT_ID, getCustomerId());
2546                              collSordersRelatedByRecipientId = SorderPeer.doSelectJoinCarrier(criteria);
2547            }
2548        }
2549        else
2550        {
2551            // the following code is to determine if a new query is
2552
// called for. If the criteria is the same as the last
2553
// one, just return the collection.
2554

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    /**
2575     * If this collection has already been initialized with
2576     * an identical criteria, it returns the collection.
2577     * Otherwise if this Customer is new, it will return
2578     * an empty collection; or if this Customer has previously
2579     * been saved, it will retrieve related SordersRelatedByRecipientId from storage.
2580     *
2581     * This method is protected by default in order to keep the public
2582     * api reasonable. You can provide public methods for those you
2583     * actually need in Customer.
2584     */

2585    protected List JavaDoc getSordersRelatedByRecipientIdJoinCurrency(Criteria criteria)
2586        throws TorqueException
2587    {
2588                    if (collSordersRelatedByRecipientId == null)
2589        {
2590            if (isNew())
2591            {
2592               collSordersRelatedByRecipientId = new ArrayList JavaDoc();
2593            }
2594            else
2595            {
2596                              criteria.add(SorderPeer.RECIPIENT_ID, getCustomerId());
2597                              collSordersRelatedByRecipientId = SorderPeer.doSelectJoinCurrency(criteria);
2598            }
2599        }
2600        else
2601        {
2602            // the following code is to determine if a new query is
2603
// called for. If the criteria is the same as the last
2604
// one, just return the collection.
2605

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          /**
2622     * Collection to store aggregation of collPayments
2623     */

2624    protected List JavaDoc collPayments;
2625
2626    /**
2627     * Temporary storage of collPayments to save a possible db hit in
2628     * the event objects are add to the collection, but the
2629     * complete collection is never requested.
2630     */

2631    protected void initPayments()
2632    {
2633        if (collPayments == null)
2634        {
2635            collPayments = new ArrayList JavaDoc();
2636        }
2637    }
2638
2639    /**
2640     * Method called to associate a Payment object to this object
2641     * through the Payment foreign key attribute
2642     *
2643     * @param l Payment
2644     * @throws TorqueException
2645     */

2646    public void addPayment(Payment l) throws TorqueException
2647    {
2648        getPayments().add(l);
2649        l.setCustomer((Customer) this);
2650    }
2651
2652    /**
2653     * The criteria used to select the current contents of collPayments
2654     */

2655    private Criteria lastPaymentsCriteria = null;
2656      
2657    /**
2658     * If this collection has already been initialized, returns
2659     * the collection. Otherwise returns the results of
2660     * getPayments(new Criteria())
2661     *
2662     * @throws TorqueException
2663     */

2664    public List JavaDoc getPayments() throws TorqueException
2665    {
2666              if (collPayments == null)
2667        {
2668            collPayments = getPayments(new Criteria(10));
2669        }
2670        return collPayments;
2671          }
2672
2673    /**
2674     * If this collection has already been initialized with
2675     * an identical criteria, it returns the collection.
2676     * Otherwise if this Customer has previously
2677     * been saved, it will retrieve related Payments from storage.
2678     * If this Customer is new, it will return
2679     * an empty collection or the current collection, the criteria
2680     * is ignored on a new object.
2681     *
2682     * @throws TorqueException
2683     */

2684    public List JavaDoc getPayments(Criteria criteria) throws TorqueException
2685    {
2686              if (collPayments == null)
2687        {
2688            if (isNew())
2689            {
2690               collPayments = new ArrayList JavaDoc();
2691            }
2692            else
2693            {
2694                        criteria.add(PaymentPeer.CUSTOMER_ID, getCustomerId() );
2695                        collPayments = PaymentPeer.doSelect(criteria);
2696            }
2697        }
2698        else
2699        {
2700            // criteria has no effect for a new object
2701
if (!isNew())
2702            {
2703                // the following code is to determine if a new query is
2704
// called for. If the criteria is the same as the last
2705
// one, just return the collection.
2706
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    /**
2719     * If this collection has already been initialized, returns
2720     * the collection. Otherwise returns the results of
2721     * getPayments(new Criteria(),Connection)
2722     * This method takes in the Connection also as input so that
2723     * referenced objects can also be obtained using a Connection
2724     * that is taken as input
2725     */

2726    public List JavaDoc getPayments(Connection JavaDoc con) throws TorqueException
2727    {
2728              if (collPayments == null)
2729        {
2730            collPayments = getPayments(new Criteria(10), con);
2731        }
2732        return collPayments;
2733          }
2734
2735    /**
2736     * If this collection has already been initialized with
2737     * an identical criteria, it returns the collection.
2738     * Otherwise if this Customer has previously
2739     * been saved, it will retrieve related Payments from storage.
2740     * If this Customer is new, it will return
2741     * an empty collection or the current collection, the criteria
2742     * is ignored on a new object.
2743     * This method takes in the Connection also as input so that
2744     * referenced objects can also be obtained using a Connection
2745     * that is taken as input
2746     */

2747    public List JavaDoc getPayments(Criteria criteria, Connection JavaDoc con)
2748            throws TorqueException
2749    {
2750              if (collPayments == null)
2751        {
2752            if (isNew())
2753            {
2754               collPayments = new ArrayList JavaDoc();
2755            }
2756            else
2757            {
2758                         criteria.add(PaymentPeer.CUSTOMER_ID, getCustomerId());
2759                         collPayments = PaymentPeer.doSelect(criteria, con);
2760             }
2761         }
2762         else
2763         {
2764             // criteria has no effect for a new object
2765
if (!isNew())
2766             {
2767                 // the following code is to determine if a new query is
2768
// called for. If the criteria is the same as the last
2769
// one, just return the collection.
2770
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    /**
2793     * If this collection has already been initialized with
2794     * an identical criteria, it returns the collection.
2795     * Otherwise if this Customer is new, it will return
2796     * an empty collection; or if this Customer has previously
2797     * been saved, it will retrieve related Payments from storage.
2798     *
2799     * This method is protected by default in order to keep the public
2800     * api reasonable. You can provide public methods for those you
2801     * actually need in Customer.
2802     */

2803    protected List JavaDoc getPaymentsJoinCustomer(Criteria criteria)
2804        throws TorqueException
2805    {
2806                    if (collPayments == null)
2807        {
2808            if (isNew())
2809            {
2810               collPayments = new ArrayList JavaDoc();
2811            }
2812            else
2813            {
2814                              criteria.add(PaymentPeer.CUSTOMER_ID, getCustomerId());
2815                              collPayments = PaymentPeer.doSelectJoinCustomer(criteria);
2816            }
2817        }
2818        else
2819        {
2820            // the following code is to determine if a new query is
2821
// called for. If the criteria is the same as the last
2822
// one, just return the collection.
2823

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    /**
2844     * If this collection has already been initialized with
2845     * an identical criteria, it returns the collection.
2846     * Otherwise if this Customer is new, it will return
2847     * an empty collection; or if this Customer has previously
2848     * been saved, it will retrieve related Payments from storage.
2849     *
2850     * This method is protected by default in order to keep the public
2851     * api reasonable. You can provide public methods for those you
2852     * actually need in Customer.
2853     */

2854    protected List JavaDoc getPaymentsJoinProject(Criteria criteria)
2855        throws TorqueException
2856    {
2857                    if (collPayments == null)
2858        {
2859            if (isNew())
2860            {
2861               collPayments = new ArrayList JavaDoc();
2862            }
2863            else
2864            {
2865                              criteria.add(PaymentPeer.CUSTOMER_ID, getCustomerId());
2866                              collPayments = PaymentPeer.doSelectJoinProject(criteria);
2867            }
2868        }
2869        else
2870        {
2871            // the following code is to determine if a new query is
2872
// called for. If the criteria is the same as the last
2873
// one, just return the collection.
2874

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    /**
2895     * If this collection has already been initialized with
2896     * an identical criteria, it returns the collection.
2897     * Otherwise if this Customer is new, it will return
2898     * an empty collection; or if this Customer has previously
2899     * been saved, it will retrieve related Payments from storage.
2900     *
2901     * This method is protected by default in order to keep the public
2902     * api reasonable. You can provide public methods for those you
2903     * actually need in Customer.
2904     */

2905    protected List JavaDoc getPaymentsJoinSorder(Criteria criteria)
2906        throws TorqueException
2907    {
2908                    if (collPayments == null)
2909        {
2910            if (isNew())
2911            {
2912               collPayments = new ArrayList JavaDoc();
2913            }
2914            else
2915            {
2916                              criteria.add(PaymentPeer.CUSTOMER_ID, getCustomerId());
2917                              collPayments = PaymentPeer.doSelectJoinSorder(criteria);
2918            }
2919        }
2920        else
2921        {
2922            // the following code is to determine if a new query is
2923
// called for. If the criteria is the same as the last
2924
// one, just return the collection.
2925

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    /**
2946     * If this collection has already been initialized with
2947     * an identical criteria, it returns the collection.
2948     * Otherwise if this Customer is new, it will return
2949     * an empty collection; or if this Customer has previously
2950     * been saved, it will retrieve related Payments from storage.
2951     *
2952     * This method is protected by default in order to keep the public
2953     * api reasonable. You can provide public methods for those you
2954     * actually need in Customer.
2955     */

2956    protected List JavaDoc getPaymentsJoinCurrency(Criteria criteria)
2957        throws TorqueException
2958    {
2959                    if (collPayments == null)
2960        {
2961            if (isNew())
2962            {
2963               collPayments = new ArrayList JavaDoc();
2964            }
2965            else
2966            {
2967                              criteria.add(PaymentPeer.CUSTOMER_ID, getCustomerId());
2968                              collPayments = PaymentPeer.doSelectJoinCurrency(criteria);
2969            }
2970        }
2971        else
2972        {
2973            // the following code is to determine if a new query is
2974
// called for. If the criteria is the same as the last
2975
// one, just return the collection.
2976

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          /**
2993     * Collection to store aggregation of collServicesRelatedByCustomerId
2994     */

2995    protected List JavaDoc collServicesRelatedByCustomerId;
2996
2997    /**
2998     * Temporary storage of collServicesRelatedByCustomerId to save a possible db hit in
2999     * the event objects are add to the collection, but the
3000     * complete collection is never requested.
3001     */

3002    protected void initServicesRelatedByCustomerId()
3003    {
3004        if (collServicesRelatedByCustomerId == null)
3005        {
3006            collServicesRelatedByCustomerId = new ArrayList JavaDoc();
3007        }
3008    }
3009
3010    /**
3011     * Method called to associate a Service object to this object
3012     * through the Service foreign key attribute
3013     *
3014     * @param l Service
3015     * @throws TorqueException
3016     */

3017    public void addServiceRelatedByCustomerId(Service l) throws TorqueException
3018    {
3019        getServicesRelatedByCustomerId().add(l);
3020        l.setCustomerRelatedByCustomerId((Customer) this);
3021    }
3022
3023    /**
3024     * The criteria used to select the current contents of collServicesRelatedByCustomerId
3025     */

3026    private Criteria lastServicesRelatedByCustomerIdCriteria = null;
3027      
3028    /**
3029     * If this collection has already been initialized, returns
3030     * the collection. Otherwise returns the results of
3031     * getServicesRelatedByCustomerId(new Criteria())
3032     *
3033     * @throws TorqueException
3034     */

3035    public List JavaDoc getServicesRelatedByCustomerId() throws TorqueException
3036    {
3037              if (collServicesRelatedByCustomerId == null)
3038        {
3039            collServicesRelatedByCustomerId = getServicesRelatedByCustomerId(new Criteria(10));
3040        }
3041        return collServicesRelatedByCustomerId;
3042          }
3043
3044    /**
3045     * If this collection has already been initialized with
3046     * an identical criteria, it returns the collection.
3047     * Otherwise if this Customer has previously
3048     * been saved, it will retrieve related ServicesRelatedByCustomerId from storage.
3049     * If this Customer is new, it will return
3050     * an empty collection or the current collection, the criteria
3051     * is ignored on a new object.
3052     *
3053     * @throws TorqueException
3054     */

3055    public List JavaDoc getServicesRelatedByCustomerId(Criteria criteria) throws TorqueException
3056    {
3057              if (collServicesRelatedByCustomerId == null)
3058        {
3059            if (isNew())
3060            {
3061               collServicesRelatedByCustomerId = new ArrayList JavaDoc();
3062            }
3063            else
3064            {
3065                        criteria.add(ServicePeer.CUSTOMER_ID, getCustomerId() );
3066                        collServicesRelatedByCustomerId = ServicePeer.doSelect(criteria);
3067            }
3068        }
3069        else
3070        {
3071            // criteria has no effect for a new object
3072
if (!isNew())
3073            {
3074                // the following code is to determine if a new query is
3075
// called for. If the criteria is the same as the last
3076
// one, just return the collection.
3077
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    /**
3090     * If this collection has already been initialized, returns
3091     * the collection. Otherwise returns the results of
3092     * getServicesRelatedByCustomerId(new Criteria(),Connection)
3093     * This method takes in the Connection also as input so that
3094     * referenced objects can also be obtained using a Connection
3095     * that is taken as input
3096     */

3097    public List JavaDoc getServicesRelatedByCustomerId(Connection JavaDoc con) throws TorqueException
3098    {
3099              if (collServicesRelatedByCustomerId == null)
3100        {
3101            collServicesRelatedByCustomerId = getServicesRelatedByCustomerId(new Criteria(10), con);
3102        }
3103        return collServicesRelatedByCustomerId;
3104          }
3105
3106    /**
3107     * If this collection has already been initialized with
3108     * an identical criteria, it returns the collection.
3109     * Otherwise if this Customer has previously
3110     * been saved, it will retrieve related ServicesRelatedByCustomerId from storage.
3111     * If this Customer is new, it will return
3112     * an empty collection or the current collection, the criteria
3113     * is ignored on a new object.
3114     * This method takes in the Connection also as input so that
3115     * referenced objects can also be obtained using a Connection
3116     * that is taken as input
3117     */

3118    public List JavaDoc getServicesRelatedByCustomerId(Criteria criteria, Connection JavaDoc con)
3119            throws TorqueException
3120    {
3121              if (collServicesRelatedByCustomerId == null)
3122        {
3123            if (isNew())
3124            {
3125               collServicesRelatedByCustomerId = new ArrayList JavaDoc();
3126            }
3127            else
3128            {
3129                         criteria.add(ServicePeer.CUSTOMER_ID, getCustomerId());
3130                         collServicesRelatedByCustomerId = ServicePeer.doSelect(criteria, con);
3131             }
3132         }
3133         else
3134         {
3135             // criteria has no effect for a new object
3136
if (!isNew())
3137             {
3138                 // the following code is to determine if a new query is
3139
// called for. If the criteria is the same as the last
3140
// one, just return the collection.
3141
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    /**
3172     * If this collection has already been initialized with
3173     * an identical criteria, it returns the collection.
3174     * Otherwise if this Customer is new, it will return
3175     * an empty collection; or if this Customer has previously
3176     * been saved, it will retrieve related ServicesRelatedByCustomerId from storage.
3177     *
3178     * This method is protected by default in order to keep the public
3179     * api reasonable. You can provide public methods for those you
3180     * actually need in Customer.
3181     */

3182    protected List JavaDoc getServicesRelatedByCustomerIdJoinCustomerRelatedByRecipientId(Criteria criteria)
3183        throws TorqueException
3184    {
3185                    if (collServicesRelatedByCustomerId == null)
3186        {
3187            if (isNew())
3188            {
3189               collServicesRelatedByCustomerId = new ArrayList JavaDoc();
3190            }
3191            else
3192            {
3193                              criteria.add(ServicePeer.CUSTOMER_ID, getCustomerId());
3194                              collServicesRelatedByCustomerId = ServicePeer.doSelectJoinCustomerRelatedByRecipientId(criteria);
3195            }
3196        }
3197        else
3198        {
3199            // the following code is to determine if a new query is
3200
// called for. If the criteria is the same as the last
3201
// one, just return the collection.
3202

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    /**
3223     * If this collection has already been initialized with
3224     * an identical criteria, it returns the collection.
3225     * Otherwise if this Customer is new, it will return
3226     * an empty collection; or if this Customer has previously
3227     * been saved, it will retrieve related ServicesRelatedByCustomerId from storage.
3228     *
3229     * This method is protected by default in order to keep the public
3230     * api reasonable. You can provide public methods for those you
3231     * actually need in Customer.
3232     */

3233    protected List JavaDoc getServicesRelatedByCustomerIdJoinProject(Criteria criteria)
3234        throws TorqueException
3235    {
3236                    if (collServicesRelatedByCustomerId == null)
3237        {
3238            if (isNew())
3239            {
3240               collServicesRelatedByCustomerId = new ArrayList JavaDoc();
3241            }
3242            else
3243            {
3244                              criteria.add(ServicePeer.CUSTOMER_ID, getCustomerId());
3245                              collServicesRelatedByCustomerId = ServicePeer.doSelectJoinProject(criteria);
3246            }
3247        }
3248        else
3249        {
3250            // the following code is to determine if a new query is
3251
// called for. If the criteria is the same as the last
3252
// one, just return the collection.
3253

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    /**
3274     * If this collection has already been initialized with
3275     * an identical criteria, it returns the collection.
3276     * Otherwise if this Customer is new, it will return
3277     * an empty collection; or if this Customer has previously
3278     * been saved, it will retrieve related ServicesRelatedByCustomerId from storage.
3279     *
3280     * This method is protected by default in order to keep the public
3281     * api reasonable. You can provide public methods for those you
3282     * actually need in Customer.
3283     */

3284    protected List JavaDoc getServicesRelatedByCustomerIdJoinSorder(Criteria criteria)
3285        throws TorqueException
3286    {
3287                    if (collServicesRelatedByCustomerId == null)
3288        {
3289            if (isNew())
3290            {
3291               collServicesRelatedByCustomerId = new ArrayList JavaDoc();
3292            }
3293            else
3294            {
3295                              criteria.add(ServicePeer.CUSTOMER_ID, getCustomerId());
3296                              collServicesRelatedByCustomerId = ServicePeer.doSelectJoinSorder(criteria);
3297            }
3298        }
3299        else
3300        {
3301            // the following code is to determine if a new query is
3302
// called for. If the criteria is the same as the last
3303
// one, just return the collection.
3304

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          /**
3321     * Collection to store aggregation of collServicesRelatedByRecipientId
3322     */

3323    protected List JavaDoc collServicesRelatedByRecipientId;
3324
3325    /**
3326     * Temporary storage of collServicesRelatedByRecipientId to save a possible db hit in
3327     * the event objects are add to the collection, but the
3328     * complete collection is never requested.
3329     */

3330    protected void initServicesRelatedByRecipientId()
3331    {
3332        if (collServicesRelatedByRecipientId == null)
3333        {
3334            collServicesRelatedByRecipientId = new ArrayList JavaDoc();
3335        }
3336    }
3337
3338    /**
3339     * Method called to associate a Service object to this object
3340     * through the Service foreign key attribute
3341     *
3342     * @param l Service
3343     * @throws TorqueException
3344     */

3345    public void addServiceRelatedByRecipientId(Service l) throws TorqueException
3346    {
3347        getServicesRelatedByRecipientId().add(l);
3348        l.setCustomerRelatedByRecipientId((Customer) this);
3349    }
3350
3351    /**
3352     * The criteria used to select the current contents of collServicesRelatedByRecipientId
3353     */

3354    private Criteria lastServicesRelatedByRecipientIdCriteria = null;
3355      
3356    /**
3357     * If this collection has already been initialized, returns
3358     * the collection. Otherwise returns the results of
3359     * getServicesRelatedByRecipientId(new Criteria())
3360     *
3361     * @throws TorqueException
3362     */

3363    public List JavaDoc getServicesRelatedByRecipientId() throws TorqueException
3364    {
3365              if (collServicesRelatedByRecipientId == null)
3366        {
3367            collServicesRelatedByRecipientId = getServicesRelatedByRecipientId(new Criteria(10));
3368        }
3369        return collServicesRelatedByRecipientId;
3370          }
3371
3372    /**
3373     * If this collection has already been initialized with
3374     * an identical criteria, it returns the collection.
3375     * Otherwise if this Customer has previously
3376     * been saved, it will retrieve related ServicesRelatedByRecipientId from storage.
3377     * If this Customer is new, it will return
3378     * an empty collection or the current collection, the criteria
3379     * is ignored on a new object.
3380     *
3381     * @throws TorqueException
3382     */

3383    public List JavaDoc getServicesRelatedByRecipientId(Criteria criteria) throws TorqueException
3384    {
3385              if (collServicesRelatedByRecipientId == null)
3386        {
3387            if (isNew())
3388            {
3389               collServicesRelatedByRecipientId = new ArrayList JavaDoc();
3390            }
3391            else
3392            {
3393                        criteria.add(ServicePeer.RECIPIENT_ID, getCustomerId() );
3394                        collServicesRelatedByRecipientId = ServicePeer.doSelect(criteria);
3395            }
3396        }
3397        else
3398        {
3399            // criteria has no effect for a new object
3400
if (!isNew())
3401            {
3402                // the following code is to determine if a new query is
3403
// called for. If the criteria is the same as the last
3404
// one, just return the collection.
3405
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    /**
3418     * If this collection has already been initialized, returns
3419     * the collection. Otherwise returns the results of
3420     * getServicesRelatedByRecipientId(new Criteria(),Connection)
3421     * This method takes in the Connection also as input so that
3422     * referenced objects can also be obtained using a Connection
3423     * that is taken as input
3424     */

3425    public List JavaDoc getServicesRelatedByRecipientId(Connection JavaDoc con) throws TorqueException
3426    {
3427              if (collServicesRelatedByRecipientId == null)
3428        {
3429            collServicesRelatedByRecipientId = getServicesRelatedByRecipientId(new Criteria(10), con);
3430        }
3431        return collServicesRelatedByRecipientId;
3432          }
3433
3434    /**
3435     * If this collection has already been initialized with
3436     * an identical criteria, it returns the collection.
3437     * Otherwise if this Customer has previously
3438     * been saved, it will retrieve related ServicesRelatedByRecipientId from storage.
3439     * If this Customer is new, it will return
3440     * an empty collection or the current collection, the criteria
3441     * is ignored on a new object.
3442     * This method takes in the Connection also as input so that
3443     * referenced objects can also be obtained using a Connection
3444     * that is taken as input
3445     */

3446    public List JavaDoc getServicesRelatedByRecipientId(Criteria criteria, Connection JavaDoc con)
3447            throws TorqueException
3448    {
3449              if (collServicesRelatedByRecipientId == null)
3450        {
3451            if (isNew())
3452            {
3453               collServicesRelatedByRecipientId = new ArrayList JavaDoc();
3454            }
3455            else
3456            {
3457                         criteria.add(ServicePeer.RECIPIENT_ID, getCustomerId());
3458                         collServicesRelatedByRecipientId = ServicePeer.doSelect(criteria, con);
3459             }
3460         }
3461         else
3462         {
3463             // criteria has no effect for a new object
3464
if (!isNew())
3465             {
3466                 // the following code is to determine if a new query is
3467
// called for. If the criteria is the same as the last
3468
// one, just return the collection.
3469
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    /**
3492     * If this collection has already been initialized with
3493     * an identical criteria, it returns the collection.
3494     * Otherwise if this Customer is new, it will return
3495     * an empty collection; or if this Customer has previously
3496     * been saved, it will retrieve related ServicesRelatedByRecipientId from storage.
3497     *
3498     * This method is protected by default in order to keep the public
3499     * api reasonable. You can provide public methods for those you
3500     * actually need in Customer.
3501     */

3502    protected List JavaDoc getServicesRelatedByRecipientIdJoinCustomerRelatedByCustomerId(Criteria criteria)
3503        throws TorqueException
3504    {
3505                    if (collServicesRelatedByRecipientId == null)
3506        {
3507            if (isNew())
3508            {
3509               collServicesRelatedByRecipientId = new ArrayList JavaDoc();
3510            }
3511            else
3512            {
3513                              criteria.add(ServicePeer.RECIPIENT_ID, getCustomerId());
3514                              collServicesRelatedByRecipientId = ServicePeer.doSelectJoinCustomerRelatedByCustomerId(criteria);
3515            }
3516        }
3517        else
3518        {
3519            // the following code is to determine if a new query is
3520
// called for. If the criteria is the same as the last
3521
// one, just return the collection.
3522

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    /**
3551     * If this collection has already been initialized with
3552     * an identical criteria, it returns the collection.
3553     * Otherwise if this Customer is new, it will return
3554     * an empty collection; or if this Customer has previously
3555     * been saved, it will retrieve related ServicesRelatedByRecipientId from storage.
3556     *
3557     * This method is protected by default in order to keep the public
3558     * api reasonable. You can provide public methods for those you
3559     * actually need in Customer.
3560     */

3561    protected List JavaDoc getServicesRelatedByRecipientIdJoinProject(Criteria criteria)
3562        throws TorqueException
3563    {
3564                    if (collServicesRelatedByRecipientId == null)
3565        {
3566            if (isNew())
3567            {
3568               collServicesRelatedByRecipientId = new ArrayList JavaDoc();
3569            }
3570            else
3571            {
3572                              criteria.add(ServicePeer.RECIPIENT_ID, getCustomerId());
3573                              collServicesRelatedByRecipientId = ServicePeer.doSelectJoinProject(criteria);
3574            }
3575        }
3576        else
3577        {
3578            // the following code is to determine if a new query is
3579
// called for. If the criteria is the same as the last
3580
// one, just return the collection.
3581

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    /**
3602     * If this collection has already been initialized with
3603     * an identical criteria, it returns the collection.
3604     * Otherwise if this Customer is new, it will return
3605     * an empty collection; or if this Customer has previously
3606     * been saved, it will retrieve related ServicesRelatedByRecipientId from storage.
3607     *
3608     * This method is protected by default in order to keep the public
3609     * api reasonable. You can provide public methods for those you
3610     * actually need in Customer.
3611     */

3612    protected List JavaDoc getServicesRelatedByRecipientIdJoinSorder(Criteria criteria)
3613        throws TorqueException
3614    {
3615                    if (collServicesRelatedByRecipientId == null)
3616        {
3617            if (isNew())
3618            {
3619               collServicesRelatedByRecipientId = new ArrayList JavaDoc();
3620            }
3621            else
3622            {
3623                              criteria.add(ServicePeer.RECIPIENT_ID, getCustomerId());
3624                              collServicesRelatedByRecipientId = ServicePeer.doSelectJoinSorder(criteria);
3625            }
3626        }
3627        else
3628        {
3629            // the following code is to determine if a new query is
3630
// called for. If the criteria is the same as the last
3631
// one, just return the collection.
3632

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          /**
3649     * Collection to store aggregation of collShipmentsRelatedByCustomerId
3650     */

3651    protected List JavaDoc collShipmentsRelatedByCustomerId;
3652
3653    /**
3654     * Temporary storage of collShipmentsRelatedByCustomerId to save a possible db hit in
3655     * the event objects are add to the collection, but the
3656     * complete collection is never requested.
3657     */

3658    protected void initShipmentsRelatedByCustomerId()
3659    {
3660        if (collShipmentsRelatedByCustomerId == null)
3661        {
3662            collShipmentsRelatedByCustomerId = new ArrayList JavaDoc();
3663        }
3664    }
3665
3666    /**
3667     * Method called to associate a Shipment object to this object
3668     * through the Shipment foreign key attribute
3669     *
3670     * @param l Shipment
3671     * @throws TorqueException
3672     */

3673    public void addShipmentRelatedByCustomerId(Shipment l) throws TorqueException
3674    {
3675        getShipmentsRelatedByCustomerId().add(l);
3676        l.setCustomerRelatedByCustomerId((Customer) this);
3677    }
3678
3679    /**
3680     * The criteria used to select the current contents of collShipmentsRelatedByCustomerId
3681     */

3682    private Criteria lastShipmentsRelatedByCustomerIdCriteria = null;
3683      
3684    /**
3685     * If this collection has already been initialized, returns
3686     * the collection. Otherwise returns the results of
3687     * getShipmentsRelatedByCustomerId(new Criteria())
3688     *
3689     * @throws TorqueException
3690     */

3691    public List JavaDoc getShipmentsRelatedByCustomerId() throws TorqueException
3692    {
3693              if (collShipmentsRelatedByCustomerId == null)
3694        {
3695            collShipmentsRelatedByCustomerId = getShipmentsRelatedByCustomerId(new Criteria(10));
3696        }
3697        return collShipmentsRelatedByCustomerId;
3698          }
3699
3700    /**
3701     * If this collection has already been initialized with
3702     * an identical criteria, it returns the collection.
3703     * Otherwise if this Customer has previously
3704     * been saved, it will retrieve related ShipmentsRelatedByCustomerId from storage.
3705     * If this Customer is new, it will return
3706     * an empty collection or the current collection, the criteria
3707     * is ignored on a new object.
3708     *
3709     * @throws TorqueException
3710     */

3711    public List JavaDoc getShipmentsRelatedByCustomerId(Criteria criteria) throws TorqueException
3712    {
3713              if (collShipmentsRelatedByCustomerId == null)
3714        {
3715            if (isNew())
3716            {
3717               collShipmentsRelatedByCustomerId = new ArrayList JavaDoc();
3718            }
3719            else
3720            {
3721                        criteria.add(ShipmentPeer.CUSTOMER_ID, getCustomerId() );
3722                        collShipmentsRelatedByCustomerId = ShipmentPeer.doSelect(criteria);
3723            }
3724        }
3725        else
3726        {
3727            // criteria has no effect for a new object
3728
if (!isNew())
3729            {
3730                // the following code is to determine if a new query is
3731
// called for. If the criteria is the same as the last
3732
// one, just return the collection.
3733
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    /**
3746     * If this collection has already been initialized, returns
3747     * the collection. Otherwise returns the results of
3748     * getShipmentsRelatedByCustomerId(new Criteria(),Connection)
3749     * This method takes in the Connection also as input so that
3750     * referenced objects can also be obtained using a Connection
3751     * that is taken as input
3752     */

3753    public List JavaDoc getShipmentsRelatedByCustomerId(Connection JavaDoc con) throws TorqueException
3754    {
3755              if (collShipmentsRelatedByCustomerId == null)
3756        {
3757            collShipmentsRelatedByCustomerId = getShipmentsRelatedByCustomerId(new Criteria(10), con);
3758        }
3759        return collShipmentsRelatedByCustomerId;
3760          }
3761
3762    /**
3763     * If this collection has already been initialized with
3764     * an identical criteria, it returns the collection.
3765     * Otherwise if this Customer has previously
3766     * been saved, it will retrieve related ShipmentsRelatedByCustomerId from storage.
3767     * If this Customer is new, it will return
3768     * an empty collection or the current collection, the criteria
3769     * is ignored on a new object.
3770     * This method takes in the Connection also as input so that
3771     * referenced objects can also be obtained using a Connection
3772     * that is taken as input
3773     */

3774    public List JavaDoc getShipmentsRelatedByCustomerId(Criteria criteria, Connection JavaDoc con)
3775            throws TorqueException
3776    {
3777              if (collShipmentsRelatedByCustomerId == null)
3778        {
3779            if (isNew())
3780            {
3781               collShipmentsRelatedByCustomerId = new ArrayList JavaDoc();
3782            }
3783            else
3784            {
3785                         criteria.add(ShipmentPeer.CUSTOMER_ID, getCustomerId());
3786                         collShipmentsRelatedByCustomerId = ShipmentPeer.doSelect(criteria, con);
3787             }
3788         }
3789         else
3790         {
3791             // criteria has no effect for a new object
3792
if (!isNew())
3793             {
3794                 // the following code is to determine if a new query is
3795
// called for. If the criteria is the same as the last
3796
// one, just return the collection.
3797
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    /**
3828     * If this collection has already been initialized with
3829     * an identical criteria, it returns the collection.
3830     * Otherwise if this Customer is new, it will return
3831     * an empty collection; or if this Customer has previously
3832     * been saved, it will retrieve related ShipmentsRelatedByCustomerId from storage.
3833     *
3834     * This method is protected by default in order to keep the public
3835     * api reasonable. You can provide public methods for those you
3836     * actually need in Customer.
3837     */

3838    protected List JavaDoc getShipmentsRelatedByCustomerIdJoinCustomerRelatedByRecipientId(Criteria criteria)
3839        throws TorqueException
3840    {
3841                    if (collShipmentsRelatedByCustomerId == null)
3842        {
3843            if (isNew())
3844            {
3845               collShipmentsRelatedByCustomerId = new ArrayList JavaDoc();
3846            }
3847            else
3848            {
3849                              criteria.add(ShipmentPeer.CUSTOMER_ID, getCustomerId());
3850                              collShipmentsRelatedByCustomerId = ShipmentPeer.doSelectJoinCustomerRelatedByRecipientId(criteria);
3851            }
3852        }
3853        else
3854        {
3855            // the following code is to determine if a new query is
3856
// called for. If the criteria is the same as the last
3857
// one, just return the collection.
3858

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    /**
3879     * If this collection has already been initialized with
3880     * an identical criteria, it returns the collection.
3881     * Otherwise if this Customer is new, it will return
3882     * an empty collection; or if this Customer has previously
3883     * been saved, it will retrieve related ShipmentsRelatedByCustomerId from storage.
3884     *
3885     * This method is protected by default in order to keep the public
3886     * api reasonable. You can provide public methods for those you
3887     * actually need in Customer.
3888     */

3889    protected List JavaDoc getShipmentsRelatedByCustomerIdJoinProject(Criteria criteria)
3890        throws TorqueException
3891    {
3892                    if (collShipmentsRelatedByCustomerId == null)
3893        {
3894            if (isNew())
3895            {
3896               collShipmentsRelatedByCustomerId = new ArrayList JavaDoc();
3897            }
3898            else
3899            {
3900                              criteria.add(ShipmentPeer.CUSTOMER_ID, getCustomerId());
3901                              collShipmentsRelatedByCustomerId = ShipmentPeer.doSelectJoinProject(criteria);
3902            }
3903        }
3904        else
3905        {
3906            // the following code is to determine if a new query is
3907
// called for. If the criteria is the same as the last
3908
// one, just return the collection.
3909

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    /**
3930     * If this collection has already been initialized with
3931     * an identical criteria, it returns the collection.
3932     * Otherwise if this Customer is new, it will return
3933     * an empty collection; or if this Customer has previously
3934     * been saved, it will retrieve related ShipmentsRelatedByCustomerId from storage.
3935     *
3936     * This method is protected by default in order to keep the public
3937     * api reasonable. You can provide public methods for those you
3938     * actually need in Customer.
3939     */

3940    protected List JavaDoc getShipmentsRelatedByCustomerIdJoinSorder(Criteria criteria)
3941        throws TorqueException
3942    {
3943                    if (collShipmentsRelatedByCustomerId == null)
3944        {
3945            if (isNew())
3946            {
3947               collShipmentsRelatedByCustomerId = new ArrayList JavaDoc();
3948            }
3949            else
3950            {
3951                              criteria.add(ShipmentPeer.CUSTOMER_ID, getCustomerId());
3952                              collShipmentsRelatedByCustomerId = ShipmentPeer.doSelectJoinSorder(criteria);
3953            }
3954        }
3955        else
3956        {
3957            // the following code is to determine if a new query is
3958
// called for. If the criteria is the same as the last
3959
// one, just return the collection.
3960

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    /**
3981     * If this collection has already been initialized with
3982     * an identical criteria, it returns the collection.
3983     * Otherwise if this Customer is new, it will return
3984     * an empty collection; or if this Customer has previously
3985     * been saved, it will retrieve related ShipmentsRelatedByCustomerId from storage.
3986     *
3987     * This method is protected by default in order to keep the public
3988     * api reasonable. You can provide public methods for those you
3989     * actually need in Customer.
3990     */

3991    protected List JavaDoc getShipmentsRelatedByCustomerIdJoinCarrier(Criteria criteria)
3992        throws TorqueException
3993    {
3994                    if (collShipmentsRelatedByCustomerId == null)
3995        {
3996            if (isNew())
3997            {
3998               collShipmentsRelatedByCustomerId = new ArrayList JavaDoc();
3999            }
4000            else
4001            {
4002                              criteria.add(ShipmentPeer.CUSTOMER_ID, getCustomerId());
4003                              collShipmentsRelatedByCustomerId = ShipmentPeer.doSelectJoinCarrier(criteria);
4004            }
4005        }
4006        else
4007        {
4008            // the following code is to determine if a new query is
4009
// called for. If the criteria is the same as the last
4010
// one, just return the collection.
4011

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          /**
4028     * Collection to store aggregation of collShipmentsRelatedByRecipientId
4029     */

4030    protected List JavaDoc collShipmentsRelatedByRecipientId;
4031
4032    /**
4033     * Temporary storage of collShipmentsRelatedByRecipientId to save a possible db hit in
4034     * the event objects are add to the collection, but the
4035     * complete collection is never requested.
4036     */

4037    protected void initShipmentsRelatedByRecipientId()
4038    {
4039        if (collShipmentsRelatedByRecipientId == null)
4040        {
4041            collShipmentsRelatedByRecipientId = new ArrayList JavaDoc();
4042        }
4043    }
4044
4045    /**
4046     * Method called to associate a Shipment object to this object
4047     * through the Shipment foreign key attribute
4048     *
4049     * @param l Shipment
4050     * @throws TorqueException
4051     */

4052    public void addShipmentRelatedByRecipientId(Shipment l) throws TorqueException
4053    {
4054        getShipmentsRelatedByRecipientId().add(l);
4055        l.setCustomerRelatedByRecipientId((Customer) this);
4056    }
4057
4058    /**
4059     * The criteria used to select the current contents of collShipmentsRelatedByRecipientId
4060     */

4061    private Criteria lastShipmentsRelatedByRecipientIdCriteria = null;
4062      
4063    /**
4064     * If this collection has already been initialized, returns
4065     * the collection. Otherwise returns the results of
4066     * getShipmentsRelatedByRecipientId(new Criteria())
4067     *
4068     * @throws TorqueException
4069     */

4070    public List JavaDoc getShipmentsRelatedByRecipientId() throws TorqueException
4071    {
4072              if (collShipmentsRelatedByRecipientId == null)
4073        {
4074            collShipmentsRelatedByRecipientId = getShipmentsRelatedByRecipientId(new Criteria(10));
4075        }
4076        return collShipmentsRelatedByRecipientId;
4077          }
4078
4079    /**
4080     * If this collection has already been initialized with
4081     * an identical criteria, it returns the collection.
4082     * Otherwise if this Customer has previously
4083     * been saved, it will retrieve related ShipmentsRelatedByRecipientId from storage.
4084     * If this Customer is new, it will return
4085     * an empty collection or the current collection, the criteria
4086     * is ignored on a new object.
4087     *
4088     * @throws TorqueException
4089     */

4090    public List JavaDoc getShipmentsRelatedByRecipientId(Criteria criteria) throws TorqueException
4091    {
4092              if (collShipmentsRelatedByRecipientId == null)
4093        {
4094            if (isNew())
4095            {
4096               collShipmentsRelatedByRecipientId = new ArrayList JavaDoc();
4097            }
4098            else
4099            {
4100                        criteria.add(ShipmentPeer.RECIPIENT_ID, getCustomerId() );
4101                        collShipmentsRelatedByRecipientId = ShipmentPeer.doSelect(criteria);
4102            }
4103        }
4104        else
4105        {
4106            // criteria has no effect for a new object
4107
if (!isNew())
4108            {
4109                // the following code is to determine if a new query is
4110
// called for. If the criteria is the same as the last
4111
// one, just return the collection.
4112
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    /**
4125     * If this collection has already been initialized, returns
4126     * the collection. Otherwise returns the results of
4127     * getShipmentsRelatedByRecipientId(new Criteria(),Connection)
4128     * This method takes in the Connection also as input so that
4129     * referenced objects can also be obtained using a Connection
4130     * that is taken as input
4131     */

4132    public List JavaDoc getShipmentsRelatedByRecipientId(Connection JavaDoc con) throws TorqueException
4133    {
4134              if (collShipmentsRelatedByRecipientId == null)
4135        {
4136            collShipmentsRelatedByRecipientId = getShipmentsRelatedByRecipientId(new Criteria(10), con);
4137        }
4138        return collShipmentsRelatedByRecipientId;
4139          }
4140
4141    /**
4142     * If this collection has already been initialized with
4143     * an identical criteria, it returns the collection.
4144     * Otherwise if this Customer has previously
4145     * been saved, it will retrieve related ShipmentsRelatedByRecipientId from storage.
4146     * If this Customer is new, it will return
4147     * an empty collection or the current collection, the criteria
4148     * is ignored on a new object.
4149     * This method takes in the Connection also as input so that
4150     * referenced objects can also be obtained using a Connection
4151     * that is taken as input
4152     */

4153    public List JavaDoc getShipmentsRelatedByRecipientId(Criteria criteria, Connection JavaDoc con)
4154            throws TorqueException
4155    {
4156              if (collShipmentsRelatedByRecipientId == null)
4157        {
4158            if (isNew())
4159            {
4160               collShipmentsRelatedByRecipientId = new ArrayList JavaDoc();
4161            }
4162            else
4163            {
4164                         criteria.add(ShipmentPeer.RECIPIENT_ID, getCustomerId());
4165                         collShipmentsRelatedByRecipientId = ShipmentPeer.doSelect(criteria, con);
4166             }
4167         }
4168         else
4169         {
4170             // criteria has no effect for a new object
4171
if (!isNew())
4172             {
4173                 // the following code is to determine if a new query is
4174
// called for. If the criteria is the same as the last
4175
// one, just return the collection.
4176
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    /**
4199     * If this collection has already been initialized with
4200     * an identical criteria, it returns the collection.
4201     * Otherwise if this Customer is new, it will return
4202     * an empty collection; or if this Customer has previously
4203     * been saved, it will retrieve related ShipmentsRelatedByRecipientId from storage.
4204     *
4205     * This method is protected by default in order to keep the public
4206     * api reasonable. You can provide public methods for those you
4207     * actually need in Customer.
4208     */

4209    protected List JavaDoc getShipmentsRelatedByRecipientIdJoinCustomerRelatedByCustomerId(Criteria criteria)
4210        throws TorqueException
4211    {
4212                    if (collShipmentsRelatedByRecipientId == null)
4213        {
4214            if (isNew())
4215            {
4216               collShipmentsRelatedByRecipientId = new ArrayList JavaDoc();
4217            }
4218            else
4219            {
4220                              criteria.add(ShipmentPeer.RECIPIENT_ID, getCustomerId());
4221                              collShipmentsRelatedByRecipientId = ShipmentPeer.doSelectJoinCustomerRelatedByCustomerId(criteria);
4222            }
4223        }
4224        else
4225        {
4226            // the following code is to determine if a new query is
4227
// called for. If the criteria is the same as the last
4228
// one, just return the collection.
4229

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    /**
4258     * If this collection has already been initialized with
4259     * an identical criteria, it returns the collection.
4260     * Otherwise if this Customer is new, it will return
4261     * an empty collection; or if this Customer has previously
4262     * been saved, it will retrieve related ShipmentsRelatedByRecipientId from storage.
4263     *
4264     * This method is protected by default in order to keep the public
4265     * api reasonable. You can provide public methods for those you
4266     * actually need in Customer.
4267     */

4268    protected List JavaDoc getShipmentsRelatedByRecipientIdJoinProject(Criteria criteria)
4269        throws TorqueException
4270    {
4271                    if (collShipmentsRelatedByRecipientId == null)
4272        {
4273            if (isNew())
4274            {
4275               collShipmentsRelatedByRecipientId = new ArrayList JavaDoc();
4276            }
4277            else
4278            {
4279                              criteria.add(ShipmentPeer.RECIPIENT_ID, getCustomerId());
4280                              collShipmentsRelatedByRecipientId = ShipmentPeer.doSelectJoinProject(criteria);
4281            }
4282        }
4283        else
4284        {
4285            // the following code is to determine if a new query is
4286
// called for. If the criteria is the same as the last
4287
// one, just return the collection.
4288

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    /**
4309     * If this collection has already been initialized with
4310     * an identical criteria, it returns the collection.
4311     * Otherwise if this Customer is new, it will return
4312     * an empty collection; or if this Customer has previously
4313     * been saved, it will retrieve related ShipmentsRelatedByRecipientId from storage.
4314     *
4315     * This method is protected by default in order to keep the public
4316     * api reasonable. You can provide public methods for those you
4317     * actually need in Customer.
4318     */

4319    protected List JavaDoc getShipmentsRelatedByRecipientIdJoinSorder(Criteria criteria)
4320        throws TorqueException
4321    {
4322                    if (collShipmentsRelatedByRecipientId == null)
4323        {
4324            if (isNew())
4325            {
4326               collShipmentsRelatedByRecipientId = new ArrayList JavaDoc();
4327            }
4328            else
4329            {
4330                              criteria.add(ShipmentPeer.RECIPIENT_ID, getCustomerId());
4331                              collShipmentsRelatedByRecipientId = ShipmentPeer.doSelectJoinSorder(criteria);
4332            }
4333        }
4334        else
4335        {
4336            // the following code is to determine if a new query is
4337
// called for. If the criteria is the same as the last
4338
// one, just return the collection.
4339

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    /**
4360     * If this collection has already been initialized with
4361     * an identical criteria, it returns the collection.
4362     * Otherwise if this Customer is new, it will return
4363     * an empty collection; or if this Customer has previously
4364     * been saved, it will retrieve related ShipmentsRelatedByRecipientId from storage.
4365     *
4366     * This method is protected by default in order to keep the public
4367     * api reasonable. You can provide public methods for those you
4368     * actually need in Customer.
4369     */

4370    protected List JavaDoc getShipmentsRelatedByRecipientIdJoinCarrier(Criteria criteria)
4371        throws TorqueException
4372    {
4373                    if (collShipmentsRelatedByRecipientId == null)
4374        {
4375            if (isNew())
4376            {
4377               collShipmentsRelatedByRecipientId = new ArrayList JavaDoc();
4378            }
4379            else
4380            {
4381                              criteria.add(ShipmentPeer.RECIPIENT_ID, getCustomerId());
4382                              collShipmentsRelatedByRecipientId = ShipmentPeer.doSelectJoinCarrier(criteria);
4383            }
4384        }
4385        else
4386        {
4387            // the following code is to determine if a new query is
4388
// called for. If the criteria is the same as the last
4389
// one, just return the collection.
4390

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          /**
4407     * Collection to store aggregation of collPrintSubscriptionsRelatedByCustomerId
4408     */

4409    protected List JavaDoc collPrintSubscriptionsRelatedByCustomerId;
4410
4411    /**
4412     * Temporary storage of collPrintSubscriptionsRelatedByCustomerId to save a possible db hit in
4413     * the event objects are add to the collection, but the
4414     * complete collection is never requested.
4415     */

4416    protected void initPrintSubscriptionsRelatedByCustomerId()
4417    {
4418        if (collPrintSubscriptionsRelatedByCustomerId == null)
4419        {
4420            collPrintSubscriptionsRelatedByCustomerId = new ArrayList JavaDoc();
4421        }
4422    }
4423
4424    /**
4425     * Method called to associate a PrintSubscription object to this object
4426     * through the PrintSubscription foreign key attribute
4427     *
4428     * @param l PrintSubscription
4429     * @throws TorqueException
4430     */

4431    public void addPrintSubscriptionRelatedByCustomerId(PrintSubscription l) throws TorqueException
4432    {
4433        getPrintSubscriptionsRelatedByCustomerId().add(l);
4434        l.setCustomerRelatedByCustomerId((Customer) this);
4435    }
4436
4437    /**
4438     * The criteria used to select the current contents of collPrintSubscriptionsRelatedByCustomerId
4439     */

4440    private Criteria lastPrintSubscriptionsRelatedByCustomerIdCriteria = null;
4441      
4442    /**
4443     * If this collection has already been initialized, returns
4444     * the collection. Otherwise returns the results of
4445     * getPrintSubscriptionsRelatedByCustomerId(new Criteria())
4446     *
4447     * @throws TorqueException
4448     */

4449    public List JavaDoc getPrintSubscriptionsRelatedByCustomerId() throws TorqueException
4450    {
4451              if (collPrintSubscriptionsRelatedByCustomerId == null)
4452        {
4453            collPrintSubscriptionsRelatedByCustomerId = getPrintSubscriptionsRelatedByCustomerId(new Criteria(10));
4454        }
4455        return collPrintSubscriptionsRelatedByCustomerId;
4456          }
4457
4458    /**
4459     * If this collection has already been initialized with
4460     * an identical criteria, it returns the collection.
4461     * Otherwise if this Customer has previously
4462     * been saved, it will retrieve related PrintSubscriptionsRelatedByCustomerId from storage.
4463     * If this Customer is new, it will return
4464     * an empty collection or the current collection, the criteria
4465     * is ignored on a new object.
4466     *
4467     * @throws TorqueException
4468     */

4469    public List JavaDoc getPrintSubscriptionsRelatedByCustomerId(Criteria criteria) throws TorqueException
4470    {
4471              if (collPrintSubscriptionsRelatedByCustomerId == null)
4472        {
4473            if (isNew())
4474            {
4475               collPrintSubscriptionsRelatedByCustomerId = new ArrayList JavaDoc();
4476            }
4477            else
4478            {
4479                        criteria.add(PrintSubscriptionPeer.CUSTOMER_ID, getCustomerId() );
4480                        collPrintSubscriptionsRelatedByCustomerId = PrintSubscriptionPeer.doSelect(criteria);
4481            }
4482        }
4483        else
4484        {
4485            // criteria has no effect for a new object
4486
if (!isNew())
4487            {
4488                // the following code is to determine if a new query is
4489
// called for. If the criteria is the same as the last
4490
// one, just return the collection.
4491
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    /**
4504     * If this collection has already been initialized, returns
4505     * the collection. Otherwise returns the results of
4506     * getPrintSubscriptionsRelatedByCustomerId(new Criteria(),Connection)
4507     * This method takes in the Connection also as input so that
4508     * referenced objects can also be obtained using a Connection
4509     * that is taken as input
4510     */

4511    public List JavaDoc getPrintSubscriptionsRelatedByCustomerId(Connection JavaDoc con) throws TorqueException
4512    {
4513              if (collPrintSubscriptionsRelatedByCustomerId == null)
4514        {
4515            collPrintSubscriptionsRelatedByCustomerId = getPrintSubscriptionsRelatedByCustomerId(new Criteria(10), con);
4516        }
4517        return collPrintSubscriptionsRelatedByCustomerId;
4518          }
4519
4520    /**
4521     * If this collection has already been initialized with
4522     * an identical criteria, it returns the collection.
4523     * Otherwise if this Customer has previously
4524     * been saved, it will retrieve related PrintSubscriptionsRelatedByCustomerId from storage.
4525     * If this Customer is new, it will return
4526     * an empty collection or the current collection, the criteria
4527     * is ignored on a new object.
4528     * This method takes in the Connection also as input so that
4529     * referenced objects can also be obtained using a Connection
4530     * that is taken as input
4531     */

4532    public List JavaDoc getPrintSubscriptionsRelatedByCustomerId(Criteria criteria, Connection JavaDoc con)
4533            throws TorqueException
4534    {
4535              if (collPrintSubscriptionsRelatedByCustomerId == null)
4536        {
4537            if (isNew())
4538            {
4539               collPrintSubscriptionsRelatedByCustomerId = new ArrayList JavaDoc();
4540            }
4541            else
4542            {
4543                         criteria.add(PrintSubscriptionPeer.CUSTOMER_ID, getCustomerId());
4544                         collPrintSubscriptionsRelatedByCustomerId = PrintSubscriptionPeer.doSelect(criteria, con);
4545             }
4546         }
4547         else
4548         {
4549             // criteria has no effect for a new object
4550
if (!isNew())
4551             {
4552                 // the following code is to determine if a new query is
4553
// called for. If the criteria is the same as the last
4554
// one, just return the collection.
4555
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    /**
4586     * If this collection has already been initialized with
4587     * an identical criteria, it returns the collection.
4588     * Otherwise if this Customer is new, it will return
4589     * an empty collection; or if this Customer has previously
4590     * been saved, it will retrieve related PrintSubscriptionsRelatedByCustomerId from storage.
4591     *
4592     * This method is protected by default in order to keep the public
4593     * api reasonable. You can provide public methods for those you
4594     * actually need in Customer.
4595     */

4596    protected List JavaDoc getPrintSubscriptionsRelatedByCustomerIdJoinCustomerRelatedByRecipientId(Criteria criteria)
4597        throws TorqueException
4598    {
4599                    if (collPrintSubscriptionsRelatedByCustomerId == null)
4600        {
4601            if (isNew())
4602            {
4603               collPrintSubscriptionsRelatedByCustomerId = new ArrayList JavaDoc();
4604            }
4605            else
4606            {
4607                              criteria.add(PrintSubscriptionPeer.CUSTOMER_ID, getCustomerId());
4608                              collPrintSubscriptionsRelatedByCustomerId = PrintSubscriptionPeer.doSelectJoinCustomerRelatedByRecipientId(criteria);
4609            }
4610        }
4611        else
4612        {
4613            // the following code is to determine if a new query is
4614
// called for. If the criteria is the same as the last
4615
// one, just return the collection.
4616

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    /**
4637     * If this collection has already been initialized with
4638     * an identical criteria, it returns the collection.
4639     * Otherwise if this Customer is new, it will return
4640     * an empty collection; or if this Customer has previously
4641     * been saved, it will retrieve related PrintSubscriptionsRelatedByCustomerId from storage.
4642     *
4643     * This method is protected by default in order to keep the public
4644     * api reasonable. You can provide public methods for those you
4645     * actually need in Customer.
4646     */

4647    protected List JavaDoc getPrintSubscriptionsRelatedByCustomerIdJoinCarrier(Criteria criteria)
4648        throws TorqueException
4649    {
4650                    if (collPrintSubscriptionsRelatedByCustomerId == null)
4651        {
4652            if (isNew())
4653            {
4654               collPrintSubscriptionsRelatedByCustomerId = new ArrayList JavaDoc();
4655            }
4656            else
4657            {
4658                              criteria.add(PrintSubscriptionPeer.CUSTOMER_ID, getCustomerId());
4659                              collPrintSubscriptionsRelatedByCustomerId = PrintSubscriptionPeer.doSelectJoinCarrier(criteria);
4660            }
4661        }
4662        else
4663        {
4664            // the following code is to determine if a new query is
4665
// called for. If the criteria is the same as the last
4666
// one, just return the collection.
4667

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    /**
4688     * If this collection has already been initialized with
4689     * an identical criteria, it returns the collection.
4690     * Otherwise if this Customer is new, it will return
4691     * an empty collection; or if this Customer has previously
4692     * been saved, it will retrieve related PrintSubscriptionsRelatedByCustomerId from storage.
4693     *
4694     * This method is protected by default in order to keep the public
4695     * api reasonable. You can provide public methods for those you
4696     * actually need in Customer.
4697     */

4698    protected List JavaDoc getPrintSubscriptionsRelatedByCustomerIdJoinProject(Criteria criteria)
4699        throws TorqueException
4700    {
4701                    if (collPrintSubscriptionsRelatedByCustomerId == null)
4702        {
4703            if (isNew())
4704            {
4705               collPrintSubscriptionsRelatedByCustomerId = new ArrayList JavaDoc();
4706            }
4707            else
4708            {
4709                              criteria.add(PrintSubscriptionPeer.CUSTOMER_ID, getCustomerId());
4710                              collPrintSubscriptionsRelatedByCustomerId = PrintSubscriptionPeer.doSelectJoinProject(criteria);
4711            }
4712        }
4713        else
4714        {
4715            // the following code is to determine if a new query is
4716
// called for. If the criteria is the same as the last
4717
// one, just return the collection.
4718

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    /**
4739     * If this collection has already been initialized with
4740     * an identical criteria, it returns the collection.
4741     * Otherwise if this Customer is new, it will return
4742     * an empty collection; or if this Customer has previously
4743     * been saved, it will retrieve related PrintSubscriptionsRelatedByCustomerId from storage.
4744     *
4745     * This method is protected by default in order to keep the public
4746     * api reasonable. You can provide public methods for those you
4747     * actually need in Customer.
4748     */

4749    protected List JavaDoc getPrintSubscriptionsRelatedByCustomerIdJoinProduct(Criteria criteria)
4750        throws TorqueException
4751    {
4752                    if (collPrintSubscriptionsRelatedByCustomerId == null)
4753        {
4754            if (isNew())
4755            {
4756               collPrintSubscriptionsRelatedByCustomerId = new ArrayList JavaDoc();
4757            }
4758            else
4759            {
4760                              criteria.add(PrintSubscriptionPeer.CUSTOMER_ID, getCustomerId());
4761                              collPrintSubscriptionsRelatedByCustomerId = PrintSubscriptionPeer.doSelectJoinProduct(criteria);
4762            }
4763        }
4764        else
4765        {
4766            // the following code is to determine if a new query is
4767
// called for. If the criteria is the same as the last
4768
// one, just return the collection.
4769

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    /**
4790     * If this collection has already been initialized with
4791     * an identical criteria, it returns the collection.
4792     * Otherwise if this Customer is new, it will return
4793     * an empty collection; or if this Customer has previously
4794     * been saved, it will retrieve related PrintSubscriptionsRelatedByCustomerId from storage.
4795     *
4796     * This method is protected by default in order to keep the public
4797     * api reasonable. You can provide public methods for those you
4798     * actually need in Customer.
4799     */

4800    protected List JavaDoc getPrintSubscriptionsRelatedByCustomerIdJoinSorder(Criteria criteria)
4801        throws TorqueException
4802    {
4803                    if (collPrintSubscriptionsRelatedByCustomerId == null)
4804        {
4805            if (isNew())
4806            {
4807               collPrintSubscriptionsRelatedByCustomerId = new ArrayList JavaDoc();
4808            }
4809            else
4810            {
4811                              criteria.add(PrintSubscriptionPeer.CUSTOMER_ID, getCustomerId());
4812                              collPrintSubscriptionsRelatedByCustomerId = PrintSubscriptionPeer.doSelectJoinSorder(criteria);
4813            }
4814        }
4815        else
4816        {
4817            // the following code is to determine if a new query is
4818
// called for. If the criteria is the same as the last
4819
// one, just return the collection.
4820

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          /**
4837     * Collection to store aggregation of collPrintSubscriptionsRelatedByRecipientId
4838     */

4839    protected List JavaDoc collPrintSubscriptionsRelatedByRecipientId;
4840
4841    /**
4842     * Temporary storage of collPrintSubscriptionsRelatedByRecipientId to save a possible db hit in
4843     * the event objects are add to the collection, but the
4844     * complete collection is never requested.
4845     */

4846    protected void initPrintSubscriptionsRelatedByRecipientId()
4847    {
4848        if (collPrintSubscriptionsRelatedByRecipientId == null)
4849        {
4850            collPrintSubscriptionsRelatedByRecipientId = new ArrayList JavaDoc();
4851        }
4852    }
4853
4854    /**
4855     * Method called to associate a PrintSubscription object to this object
4856     * through the PrintSubscription foreign key attribute
4857     *
4858     * @param l PrintSubscription
4859     * @throws TorqueException
4860     */

4861    public void addPrintSubscriptionRelatedByRecipientId(PrintSubscription l) throws TorqueException
4862    {
4863        getPrintSubscriptionsRelatedByRecipientId().add(l);
4864        l.setCustomerRelatedByRecipientId((Customer) this);
4865    }
4866
4867    /**
4868     * The criteria used to select the current contents of collPrintSubscriptionsRelatedByRecipientId
4869     */

4870    private Criteria lastPrintSubscriptionsRelatedByRecipientIdCriteria = null;
4871      
4872    /**
4873     * If this collection has already been initialized, returns
4874     * the collection. Otherwise returns the results of
4875     * getPrintSubscriptionsRelatedByRecipientId(new Criteria())
4876     *
4877     * @throws TorqueException
4878     */

4879    public List JavaDoc getPrintSubscriptionsRelatedByRecipientId() throws TorqueException
4880    {
4881              if (collPrintSubscriptionsRelatedByRecipientId == null)
4882        {
4883            collPrintSubscriptionsRelatedByRecipientId = getPrintSubscriptionsRelatedByRecipientId(new Criteria(10));
4884        }
4885        return collPrintSubscriptionsRelatedByRecipientId;
4886          }
4887
4888    /**
4889     * If this collection has already been initialized with
4890     * an identical criteria, it returns the collection.
4891     * Otherwise if this Customer has previously
4892     * been saved, it will retrieve related PrintSubscriptionsRelatedByRecipientId from storage.
4893     * If this Customer is new, it will return
4894     * an empty collection or the current collection, the criteria
4895     * is ignored on a new object.
4896     *
4897     * @throws TorqueException
4898     */

4899    public List JavaDoc getPrintSubscriptionsRelatedByRecipientId(Criteria criteria) throws TorqueException
4900    {
4901              if (collPrintSubscriptionsRelatedByRecipientId == null)
4902        {
4903            if (isNew())
4904            {
4905               collPrintSubscriptionsRelatedByRecipientId = new ArrayList JavaDoc();
4906            }
4907            else
4908            {
4909                        criteria.add(PrintSubscriptionPeer.RECIPIENT_ID, getCustomerId() );
4910                        collPrintSubscriptionsRelatedByRecipientId = PrintSubscriptionPeer.doSelect(criteria);
4911            }
4912        }
4913        else
4914        {
4915            // criteria has no effect for a new object
4916
if (!isNew())
4917            {
4918                // the following code is to determine if a new query is
4919
// called for. If the criteria is the same as the last
4920
// one, just return the collection.
4921
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    /**
4934     * If this collection has already been initialized, returns
4935     * the collection. Otherwise returns the results of
4936     * getPrintSubscriptionsRelatedByRecipientId(new Criteria(),Connection)
4937     * This method takes in the Connection also as input so that
4938     * referenced objects can also be obtained using a Connection
4939     * that is taken as input
4940     */

4941    public List JavaDoc getPrintSubscriptionsRelatedByRecipientId(Connection JavaDoc con) throws TorqueException
4942    {
4943              if (collPrintSubscriptionsRelatedByRecipientId == null)
4944        {
4945            collPrintSubscriptionsRelatedByRecipientId = getPrintSubscriptionsRelatedByRecipientId(new Criteria(10), con);
4946        }
4947        return collPrintSubscriptionsRelatedByRecipientId;
4948          }
4949
4950    /**
4951     * If this collection has already been initialized with
4952     * an identical criteria, it returns the collection.
4953     * Otherwise if this Customer has previously
4954     * been saved, it will retrieve related PrintSubscriptionsRelatedByRecipientId from storage.
4955     * If this Customer is new, it will return
4956     * an empty collection or the current collection, the criteria
4957     * is ignored on a new object.
4958     * This method takes in the Connection also as input so that
4959     * referenced objects can also be obtained using a Connection
4960     * that is taken as input
4961     */

4962    public List JavaDoc getPrintSubscriptionsRelatedByRecipientId(Criteria criteria, Connection JavaDoc con)
4963            throws TorqueException
4964    {
4965              if (collPrintSubscriptionsRelatedByRecipientId == null)
4966        {
4967            if (isNew())
4968            {
4969               collPrintSubscriptionsRelatedByRecipientId = new ArrayList JavaDoc();
4970            }
4971            else
4972            {
4973                         criteria.add(PrintSubscriptionPeer.RECIPIENT_ID, getCustomerId());
4974                         collPrintSubscriptionsRelatedByRecipientId = PrintSubscriptionPeer.doSelect(criteria, con);
4975             }
4976         }
4977         else
4978         {
4979             // criteria has no effect for a new object
4980
if (!isNew())
4981             {
4982                 // the following code is to determine if a new query is
4983
// called for. If the criteria is the same as the last
4984
// one, just return the collection.
4985
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    /**
5008     * If this collection has already been initialized with
5009     * an identical criteria, it returns the collection.
5010     * Otherwise if this Customer is new, it will return
5011     * an empty collection; or if this Customer has previously
5012     * been saved, it will retrieve related PrintSubscriptionsRelatedByRecipientId from storage.
5013     *
5014     * This method is protected by default in order to keep the public
5015     * api reasonable. You can provide public methods for those you
5016     * actually need in Customer.
5017     */

5018    protected List JavaDoc getPrintSubscriptionsRelatedByRecipientIdJoinCustomerRelatedByCustomerId(Criteria criteria)
5019        throws TorqueException
5020    {
5021                    if (collPrintSubscriptionsRelatedByRecipientId == null)
5022        {
5023            if (isNew())
5024            {
5025               collPrintSubscriptionsRelatedByRecipientId = new ArrayList JavaDoc();
5026            }
5027            else
5028            {
5029                              criteria.add(PrintSubscriptionPeer.RECIPIENT_ID, getCustomerId());
5030                              collPrintSubscriptionsRelatedByRecipientId = PrintSubscriptionPeer.doSelectJoinCustomerRelatedByCustomerId(criteria);
5031            }
5032        }
5033        else
5034        {
5035            // the following code is to determine if a new query is
5036
// called for. If the criteria is the same as the last
5037
// one, just return the collection.
5038

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    /**
5067     * If this collection has already been initialized with
5068     * an identical criteria, it returns the collection.
5069     * Otherwise if this Customer is new, it will return
5070     * an empty collection; or if this Customer has previously
5071     * been saved, it will retrieve related PrintSubscriptionsRelatedByRecipientId from storage.
5072     *
5073     * This method is protected by default in order to keep the public
5074     * api reasonable. You can provide public methods for those you
5075     * actually need in Customer.
5076     */

5077    protected List JavaDoc getPrintSubscriptionsRelatedByRecipientIdJoinCarrier(Criteria criteria)
5078        throws TorqueException
5079    {
5080                    if (collPrintSubscriptionsRelatedByRecipientId == null)
5081        {
5082            if (isNew())
5083            {
5084               collPrintSubscriptionsRelatedByRecipientId = new ArrayList JavaDoc();
5085            }
5086            else
5087            {
5088                              criteria.add(PrintSubscriptionPeer.RECIPIENT_ID, getCustomerId());
5089                              collPrintSubscriptionsRelatedByRecipientId = PrintSubscriptionPeer.doSelectJoinCarrier(criteria);
5090            }
5091        }
5092        else
5093        {
5094            // the following code is to determine if a new query is
5095
// called for. If the criteria is the same as the last
5096
// one, just return the collection.
5097

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    /**
5118     * If this collection has already been initialized with
5119     * an identical criteria, it returns the collection.
5120     * Otherwise if this Customer is new, it will return
5121     * an empty collection; or if this Customer has previously
5122     * been saved, it will retrieve related PrintSubscriptionsRelatedByRecipientId from storage.
5123     *
5124     * This method is protected by default in order to keep the public
5125     * api reasonable. You can provide public methods for those you
5126     * actually need in Customer.
5127     */

5128    protected List JavaDoc getPrintSubscriptionsRelatedByRecipientIdJoinProject(Criteria criteria)
5129        throws TorqueException
5130    {
5131                    if (collPrintSubscriptionsRelatedByRecipientId == null)
5132        {
5133            if (isNew())
5134            {
5135               collPrintSubscriptionsRelatedByRecipientId = new ArrayList JavaDoc();
5136            }
5137            else
5138            {
5139                              criteria.add(PrintSubscriptionPeer.RECIPIENT_ID, getCustomerId());
5140                              collPrintSubscriptionsRelatedByRecipientId = PrintSubscriptionPeer.doSelectJoinProject(criteria);
5141            }
5142        }
5143        else
5144        {
5145            // the following code is to determine if a new query is
5146
// called for. If the criteria is the same as the last
5147
// one, just return the collection.
5148

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    /**
5169     * If this collection has already been initialized with
5170     * an identical criteria, it returns the collection.
5171     * Otherwise if this Customer is new, it will return
5172     * an empty collection; or if this Customer has previously
5173     * been saved, it will retrieve related PrintSubscriptionsRelatedByRecipientId from storage.
5174     *
5175     * This method is protected by default in order to keep the public
5176     * api reasonable. You can provide public methods for those you
5177     * actually need in Customer.
5178     */

5179    protected List JavaDoc getPrintSubscriptionsRelatedByRecipientIdJoinProduct(Criteria criteria)
5180        throws TorqueException
5181    {
5182                    if (collPrintSubscriptionsRelatedByRecipientId == null)
5183        {
5184            if (isNew())
5185            {
5186               collPrintSubscriptionsRelatedByRecipientId = new ArrayList JavaDoc();
5187            }
5188            else
5189            {
5190                              criteria.add(PrintSubscriptionPeer.RECIPIENT_ID, getCustomerId());
5191                              collPrintSubscriptionsRelatedByRecipientId = PrintSubscriptionPeer.doSelectJoinProduct(criteria);
5192            }
5193        }
5194        else
5195        {
5196            // the following code is to determine if a new query is
5197
// called for. If the criteria is the same as the last
5198
// one, just return the collection.
5199

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    /**
5220     * If this collection has already been initialized with
5221     * an identical criteria, it returns the collection.
5222     * Otherwise if this Customer is new, it will return
5223     * an empty collection; or if this Customer has previously
5224     * been saved, it will retrieve related PrintSubscriptionsRelatedByRecipientId from storage.
5225     *
5226     * This method is protected by default in order to keep the public
5227     * api reasonable. You can provide public methods for those you
5228     * actually need in Customer.
5229     */

5230    protected List JavaDoc getPrintSubscriptionsRelatedByRecipientIdJoinSorder(Criteria criteria)
5231        throws TorqueException
5232    {
5233                    if (collPrintSubscriptionsRelatedByRecipientId == null)
5234        {
5235            if (isNew())
5236            {
5237               collPrintSubscriptionsRelatedByRecipientId = new ArrayList JavaDoc();
5238            }
5239            else
5240            {
5241                              criteria.add(PrintSubscriptionPeer.RECIPIENT_ID, getCustomerId());
5242                              collPrintSubscriptionsRelatedByRecipientId = PrintSubscriptionPeer.doSelectJoinSorder(criteria);
5243            }
5244        }
5245        else
5246        {
5247            // the following code is to determine if a new query is
5248
// called for. If the criteria is the same as the last
5249
// one, just return the collection.
5250

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          /**
5267     * Collection to store aggregation of collOnlineSubscriptionsRelatedByCustomerId
5268     */

5269    protected List JavaDoc collOnlineSubscriptionsRelatedByCustomerId;
5270
5271    /**
5272     * Temporary storage of collOnlineSubscriptionsRelatedByCustomerId to save a possible db hit in
5273     * the event objects are add to the collection, but the
5274     * complete collection is never requested.
5275     */

5276    protected void initOnlineSubscriptionsRelatedByCustomerId()
5277    {
5278        if (collOnlineSubscriptionsRelatedByCustomerId == null)
5279        {
5280            collOnlineSubscriptionsRelatedByCustomerId = new ArrayList JavaDoc();
5281        }
5282    }
5283
5284    /**
5285     * Method called to associate a OnlineSubscription object to this object
5286     * through the OnlineSubscription foreign key attribute
5287     *
5288     * @param l OnlineSubscription
5289     * @throws TorqueException
5290     */

5291    public void addOnlineSubscriptionRelatedByCustomerId(OnlineSubscription l) throws TorqueException
5292    {
5293        getOnlineSubscriptionsRelatedByCustomerId().add(l);
5294        l.setCustomerRelatedByCustomerId((Customer) this);
5295    }
5296
5297    /**
5298     * The criteria used to select the current contents of collOnlineSubscriptionsRelatedByCustomerId
5299     */

5300    private Criteria lastOnlineSubscriptionsRelatedByCustomerIdCriteria = null;
5301      
5302    /**
5303     * If this collection has already been initialized, returns
5304     * the collection. Otherwise returns the results of
5305     * getOnlineSubscriptionsRelatedByCustomerId(new Criteria())
5306     *
5307     * @throws TorqueException
5308     */

5309    public List JavaDoc getOnlineSubscriptionsRelatedByCustomerId() throws TorqueException
5310    {
5311              if (collOnlineSubscriptionsRelatedByCustomerId == null)
5312        {
5313            collOnlineSubscriptionsRelatedByCustomerId = getOnlineSubscriptionsRelatedByCustomerId(new Criteria(10));
5314        }
5315        return collOnlineSubscriptionsRelatedByCustomerId;
5316          }
5317
5318    /**
5319     * If this collection has already been initialized with
5320     * an identical criteria, it returns the collection.
5321     * Otherwise if this Customer has previously
5322     * been saved, it will retrieve related OnlineSubscriptionsRelatedByCustomerId from storage.
5323     * If this Customer is new, it will return
5324     * an empty collection or the current collection, the criteria
5325     * is ignored on a new object.
5326     *
5327     * @throws TorqueException
5328     */

5329    public List JavaDoc getOnlineSubscriptionsRelatedByCustomerId(Criteria criteria) throws TorqueException
5330    {
5331              if (collOnlineSubscriptionsRelatedByCustomerId == null)
5332        {
5333            if (isNew())
5334            {
5335               collOnlineSubscriptionsRelatedByCustomerId = new ArrayList JavaDoc();
5336            }
5337            else
5338            {
5339                        criteria.add(OnlineSubscriptionPeer.CUSTOMER_ID, getCustomerId() );
5340                        collOnlineSubscriptionsRelatedByCustomerId = OnlineSubscriptionPeer.doSelect(criteria);
5341            }
5342        }
5343        else
5344        {
5345            // criteria has no effect for a new object
5346
if (!isNew())
5347            {
5348                // the following code is to determine if a new query is
5349
// called for. If the criteria is the same as the last
5350
// one, just return the collection.
5351
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    /**
5364     * If this collection has already been initialized, returns
5365     * the collection. Otherwise returns the results of
5366     * getOnlineSubscriptionsRelatedByCustomerId(new Criteria(),Connection)
5367     * This method takes in the Connection also as input so that
5368     * referenced objects can also be obtained using a Connection
5369     * that is taken as input
5370     */

5371    public List JavaDoc getOnlineSubscriptionsRelatedByCustomerId(Connection JavaDoc con) throws TorqueException
5372    {
5373              if (collOnlineSubscriptionsRelatedByCustomerId == null)
5374        {
5375            collOnlineSubscriptionsRelatedByCustomerId = getOnlineSubscriptionsRelatedByCustomerId(new Criteria(10), con);
5376        }
5377        return collOnlineSubscriptionsRelatedByCustomerId;
5378          }
5379
5380    /**
5381     * If this collection has already been initialized with
5382     * an identical criteria, it returns the collection.
5383     * Otherwise if this Customer has previously
5384     * been saved, it will retrieve related OnlineSubscriptionsRelatedByCustomerId from storage.
5385     * If this Customer is new, it will return
5386     * an empty collection or the current collection, the criteria
5387     * is ignored on a new object.
5388     * This method takes in the Connection also as input so that
5389     * referenced objects can also be obtained using a Connection
5390     * that is taken as input
5391     */

5392    public List JavaDoc getOnlineSubscriptionsRelatedByCustomerId(Criteria criteria, Connection JavaDoc con)
5393            throws TorqueException
5394    {
5395              if (collOnlineSubscriptionsRelatedByCustomerId == null)
5396        {
5397            if (isNew())
5398            {
5399               collOnlineSubscriptionsRelatedByCustomerId = new ArrayList JavaDoc();
5400            }
5401            else
5402            {
5403                         criteria.add(OnlineSubscriptionPeer.CUSTOMER_ID, getCustomerId());
5404                         collOnlineSubscriptionsRelatedByCustomerId = OnlineSubscriptionPeer.doSelect(criteria, con);
5405             }
5406         }
5407         else
5408         {
5409             // criteria has no effect for a new object
5410
if (!isNew())
5411             {
5412                 // the following code is to determine if a new query is
5413
// called for. If the criteria is the same as the last
5414
// one, just return the collection.
5415
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    /**
5446     * If this collection has already been initialized with
5447     * an identical criteria, it returns the collection.
5448     * Otherwise if this Customer is new, it will return
5449     * an empty collection; or if this Customer has previously
5450     * been saved, it will retrieve related OnlineSubscriptionsRelatedByCustomerId from storage.
5451     *
5452     * This method is protected by default in order to keep the public
5453     * api reasonable. You can provide public methods for those you
5454     * actually need in Customer.
5455     */

5456    protected List JavaDoc getOnlineSubscriptionsRelatedByCustomerIdJoinCustomerRelatedByRecipientId(Criteria criteria)
5457        throws TorqueException
5458    {
5459                    if (collOnlineSubscriptionsRelatedByCustomerId == null)
5460        {
5461            if (isNew())
5462            {
5463               collOnlineSubscriptionsRelatedByCustomerId = new ArrayList JavaDoc();
5464            }
5465            else
5466            {
5467                              criteria.add(OnlineSubscriptionPeer.CUSTOMER_ID, getCustomerId());
5468                              collOnlineSubscriptionsRelatedByCustomerId = OnlineSubscriptionPeer.doSelectJoinCustomerRelatedByRecipientId(criteria);
5469            }
5470        }
5471        else
5472        {
5473            // the following code is to determine if a new query is
5474
// called for. If the criteria is the same as the last
5475
// one, just return the collection.
5476

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    /**
5497     * If this collection has already been initialized with
5498     * an identical criteria, it returns the collection.
5499     * Otherwise if this Customer is new, it will return
5500     * an empty collection; or if this Customer has previously
5501     * been saved, it will retrieve related OnlineSubscriptionsRelatedByCustomerId from storage.
5502     *
5503     * This method is protected by default in order to keep the public
5504     * api reasonable. You can provide public methods for those you
5505     * actually need in Customer.
5506     */

5507    protected List JavaDoc getOnlineSubscriptionsRelatedByCustomerIdJoinProject(Criteria criteria)
5508        throws TorqueException
5509    {
5510                    if (collOnlineSubscriptionsRelatedByCustomerId == null)
5511        {
5512            if (isNew())
5513            {
5514               collOnlineSubscriptionsRelatedByCustomerId = new ArrayList JavaDoc();
5515            }
5516            else
5517            {
5518                              criteria.add(OnlineSubscriptionPeer.CUSTOMER_ID, getCustomerId());
5519                              collOnlineSubscriptionsRelatedByCustomerId = OnlineSubscriptionPeer.doSelectJoinProject(criteria);
5520            }
5521        }
5522        else
5523        {
5524            // the following code is to determine if a new query is
5525
// called for. If the criteria is the same as the last
5526
// one, just return the collection.
5527

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    /**
5548     * If this collection has already been initialized with
5549     * an identical criteria, it returns the collection.
5550     * Otherwise if this Customer is new, it will return
5551     * an empty collection; or if this Customer has previously
5552     * been saved, it will retrieve related OnlineSubscriptionsRelatedByCustomerId from storage.
5553     *
5554     * This method is protected by default in order to keep the public
5555     * api reasonable. You can provide public methods for those you
5556     * actually need in Customer.
5557     */

5558    protected List JavaDoc getOnlineSubscriptionsRelatedByCustomerIdJoinProduct(Criteria criteria)
5559        throws TorqueException
5560    {
5561                    if (collOnlineSubscriptionsRelatedByCustomerId == null)
5562        {
5563            if (isNew())
5564            {
5565               collOnlineSubscriptionsRelatedByCustomerId = new ArrayList JavaDoc();
5566            }
5567            else
5568            {
5569                              criteria.add(OnlineSubscriptionPeer.CUSTOMER_ID, getCustomerId());
5570                              collOnlineSubscriptionsRelatedByCustomerId = OnlineSubscriptionPeer.doSelectJoinProduct(criteria);
5571            }
5572        }
5573        else
5574        {
5575            // the following code is to determine if a new query is
5576
// called for. If the criteria is the same as the last
5577
// one, just return the collection.
5578

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    /**
5599     * If this collection has already been initialized with
5600     * an identical criteria, it returns the collection.
5601     * Otherwise if this Customer is new, it will return
5602     * an empty collection; or if this Customer has previously
5603     * been saved, it will retrieve related OnlineSubscriptionsRelatedByCustomerId from storage.
5604     *
5605     * This method is protected by default in order to keep the public
5606     * api reasonable. You can provide public methods for those you
5607     * actually need in Customer.
5608     */

5609    protected List JavaDoc getOnlineSubscriptionsRelatedByCustomerIdJoinSorder(Criteria criteria)
5610        throws TorqueException
5611    {
5612                    if (collOnlineSubscriptionsRelatedByCustomerId == null)
5613        {
5614            if (isNew())
5615            {
5616               collOnlineSubscriptionsRelatedByCustomerId = new ArrayList JavaDoc();
5617            }
5618            else
5619            {
5620                              criteria.add(OnlineSubscriptionPeer.CUSTOMER_ID, getCustomerId());
5621                              collOnlineSubscriptionsRelatedByCustomerId = OnlineSubscriptionPeer.doSelectJoinSorder(criteria);
5622            }
5623        }
5624        else
5625        {
5626            // the following code is to determine if a new query is
5627
// called for. If the criteria is the same as the last
5628
// one, just return the collection.
5629

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          /**
5646     * Collection to store aggregation of collOnlineSubscriptionsRelatedByRecipientId
5647     */

5648    protected List JavaDoc collOnlineSubscriptionsRelatedByRecipientId;
5649
5650    /**
5651     * Temporary storage of collOnlineSubscriptionsRelatedByRecipientId to save a possible db hit in
5652     * the event objects are add to the collection, but the
5653     * complete collection is never requested.
5654     */

5655    protected void initOnlineSubscriptionsRelatedByRecipientId()
5656    {
5657        if (collOnlineSubscriptionsRelatedByRecipientId == null)
5658        {
5659            collOnlineSubscriptionsRelatedByRecipientId = new ArrayList JavaDoc();
5660        }
5661    }
5662
5663    /**
5664     * Method called to associate a OnlineSubscription object to this object
5665     * through the OnlineSubscription foreign key attribute
5666     *
5667     * @param l OnlineSubscription
5668     * @throws TorqueException
5669     */

5670    public void addOnlineSubscriptionRelatedByRecipientId(OnlineSubscription l) throws TorqueException
5671    {
5672        getOnlineSubscriptionsRelatedByRecipientId().add(l);
5673        l.setCustomerRelatedByRecipientId((Customer) this);
5674    }
5675
5676    /**
5677     * The criteria used to select the current contents of collOnlineSubscriptionsRelatedByRecipientId
5678     */

5679    private Criteria lastOnlineSubscriptionsRelatedByRecipientIdCriteria = null;
5680      
5681    /**
5682     * If this collection has already been initialized, returns
5683     * the collection. Otherwise returns the results of
5684     * getOnlineSubscriptionsRelatedByRecipientId(new Criteria())
5685     *
5686     * @throws TorqueException
5687     */

5688    public List JavaDoc getOnlineSubscriptionsRelatedByRecipientId() throws TorqueException
5689    {
5690              if (collOnlineSubscriptionsRelatedByRecipientId == null)
5691        {
5692            collOnlineSubscriptionsRelatedByRecipientId = getOnlineSubscriptionsRelatedByRecipientId(new Criteria(10));
5693        }
5694        return collOnlineSubscriptionsRelatedByRecipientId;
5695          }
5696
5697    /**
5698     * If this collection has already been initialized with
5699     * an identical criteria, it returns the collection.
5700     * Otherwise if this Customer has previously
5701     * been saved, it will retrieve related OnlineSubscriptionsRelatedByRecipientId from storage.
5702     * If this Customer is new, it will return
5703     * an empty collection or the current collection, the criteria
5704     * is ignored on a new object.
5705     *
5706     * @throws TorqueException
5707     */

5708    public List JavaDoc getOnlineSubscriptionsRelatedByRecipientId(Criteria criteria) throws TorqueException
5709    {
5710              if (collOnlineSubscriptionsRelatedByRecipientId == null)
5711        {
5712            if (isNew())
5713            {
5714               collOnlineSubscriptionsRelatedByRecipientId = new ArrayList JavaDoc();
5715            }
5716            else
5717            {
5718                        criteria.add(OnlineSubscriptionPeer.RECIPIENT_ID, getCustomerId() );
5719                        collOnlineSubscriptionsRelatedByRecipientId = OnlineSubscriptionPeer.doSelect(criteria);
5720            }
5721        }
5722        else
5723        {
5724            // criteria has no effect for a new object
5725
if (!isNew())
5726            {
5727                // the following code is to determine if a new query is
5728
// called for. If the criteria is the same as the last
5729
// one, just return the collection.
5730
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    /**
5743     * If this collection has already been initialized, returns
5744     * the collection. Otherwise returns the results of
5745     * getOnlineSubscriptionsRelatedByRecipientId(new Criteria(),Connection)
5746     * This method takes in the Connection also as input so that
5747     * referenced objects can also be obtained using a Connection
5748     * that is taken as input
5749     */

5750    public List JavaDoc getOnlineSubscriptionsRelatedByRecipientId(Connection JavaDoc con) throws TorqueException
5751    {
5752              if (collOnlineSubscriptionsRelatedByRecipientId == null)
5753        {
5754            collOnlineSubscriptionsRelatedByRecipientId = getOnlineSubscriptionsRelatedByRecipientId(new Criteria(10), con);
5755        }
5756        return collOnlineSubscriptionsRelatedByRecipientId;
5757          }
5758
5759    /**
5760     * If this collection has already been initialized with
5761     * an identical criteria, it returns the collection.
5762     * Otherwise if this Customer has previously
5763     * been saved, it will retrieve related OnlineSubscriptionsRelatedByRecipientId from storage.
5764     * If this Customer is new, it will return
5765     * an empty collection or the current collection, the criteria
5766     * is ignored on a new object.
5767     * This method takes in the Connection also as input so that
5768     * referenced objects can also be obtained using a Connection
5769     * that is taken as input
5770     */

5771    public List JavaDoc getOnlineSubscriptionsRelatedByRecipientId(Criteria criteria, Connection JavaDoc con)
5772            throws TorqueException
5773    {
5774              if (collOnlineSubscriptionsRelatedByRecipientId == null)
5775        {
5776            if (isNew())
5777            {
5778               collOnlineSubscriptionsRelatedByRecipientId = new ArrayList JavaDoc();
5779            }
5780            else
5781            {
5782                         criteria.add(OnlineSubscriptionPeer.RECIPIENT_ID, getCustomerId());
5783                         collOnlineSubscriptionsRelatedByRecipientId = OnlineSubscriptionPeer.doSelect(criteria, con);
5784             }
5785         }
5786         else
5787         {
5788             // criteria has no effect for a new object
5789
if (!isNew())
5790             {
5791                 // the following code is to determine if a new query is
5792
// called for. If the criteria is the same as the last
5793
// one, just return the collection.
5794
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    /**
5817     * If this collection has already been initialized with
5818     * an identical criteria, it returns the collection.
5819     * Otherwise if this Customer is new, it will return
5820     * an empty collection; or if this Customer has previously
5821     * been saved, it will retrieve related OnlineSubscriptionsRelatedByRecipientId from storage.
5822     *
5823     * This method is protected by default in order to keep the public
5824     * api reasonable. You can provide public methods for those you
5825     * actually need in Customer.
5826     */

5827    protected List JavaDoc getOnlineSubscriptionsRelatedByRecipientIdJoinCustomerRelatedByCustomerId(Criteria criteria)
5828        throws TorqueException
5829    {
5830                    if (collOnlineSubscriptionsRelatedByRecipientId == null)
5831        {
5832            if (isNew())
5833            {
5834               collOnlineSubscriptionsRelatedByRecipientId = new ArrayList JavaDoc();
5835            }
5836            else
5837            {
5838                              criteria.add(OnlineSubscriptionPeer.RECIPIENT_ID, getCustomerId());
5839                              collOnlineSubscriptionsRelatedByRecipientId = OnlineSubscriptionPeer.doSelectJoinCustomerRelatedByCustomerId(criteria);
5840            }
5841        }
5842        else
5843        {
5844            // the following code is to determine if a new query is
5845
// called for. If the criteria is the same as the last
5846
// one, just return the collection.
5847

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    /**
5876     * If this collection has already been initialized with
5877     * an identical criteria, it returns the collection.
5878     * Otherwise if this Customer is new, it will return
5879     * an empty collection; or if this Customer has previously
5880     * been saved, it will retrieve related OnlineSubscriptionsRelatedByRecipientId from storage.
5881     *
5882     * This method is protected by default in order to keep the public
5883     * api reasonable. You can provide public methods for those you
5884     * actually need in Customer.
5885     */

5886    protected List JavaDoc getOnlineSubscriptionsRelatedByRecipientIdJoinProject(Criteria criteria)
5887        throws TorqueException
5888    {
5889                    if (collOnlineSubscriptionsRelatedByRecipientId == null)
5890        {
5891            if (isNew())
5892            {
5893               collOnlineSubscriptionsRelatedByRecipientId = new ArrayList JavaDoc();
5894            }
5895            else
5896            {
5897                              criteria.add(OnlineSubscriptionPeer.RECIPIENT_ID, getCustomerId());
5898                              collOnlineSubscriptionsRelatedByRecipientId = OnlineSubscriptionPeer.doSelectJoinProject(criteria);
5899            }
5900        }
5901        else
5902        {
5903            // the following code is to determine if a new query is
5904
// called for. If the criteria is the same as the last
5905
// one, just return the collection.
5906

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    /**
5927     * If this collection has already been initialized with
5928     * an identical criteria, it returns the collection.
5929     * Otherwise if this Customer is new, it will return
5930     * an empty collection; or if this Customer has previously
5931     * been saved, it will retrieve related OnlineSubscriptionsRelatedByRecipientId from storage.
5932     *
5933     * This method is protected by default in order to keep the public
5934     * api reasonable. You can provide public methods for those you
5935     * actually need in Customer.
5936     */

5937    protected List JavaDoc getOnlineSubscriptionsRelatedByRecipientIdJoinProduct(Criteria criteria)
5938        throws TorqueException
5939    {
5940                    if (collOnlineSubscriptionsRelatedByRecipientId == null)
5941        {
5942            if (isNew())
5943            {
5944               collOnlineSubscriptionsRelatedByRecipientId = new ArrayList JavaDoc();
5945            }
5946            else
5947            {
5948                              criteria.add(OnlineSubscriptionPeer.RECIPIENT_ID, getCustomerId());
5949                              collOnlineSubscriptionsRelatedByRecipientId = OnlineSubscriptionPeer.doSelectJoinProduct(criteria);
5950            }
5951        }
5952        else
5953        {
5954            // the following code is to determine if a new query is
5955
// called for. If the criteria is the same as the last
5956
// one, just return the collection.
5957

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    /**
5978     * If this collection has already been initialized with
5979     * an identical criteria, it returns the collection.
5980     * Otherwise if this Customer is new, it will return
5981     * an empty collection; or if this Customer has previously
5982     * been saved, it will retrieve related OnlineSubscriptionsRelatedByRecipientId from storage.
5983     *
5984     * This method is protected by default in order to keep the public
5985     * api reasonable. You can provide public methods for those you
5986     * actually need in Customer.
5987     */

5988    protected List JavaDoc getOnlineSubscriptionsRelatedByRecipientIdJoinSorder(Criteria criteria)
5989        throws TorqueException
5990    {
5991                    if (collOnlineSubscriptionsRelatedByRecipientId == null)
5992        {
5993            if (isNew())
5994            {
5995               collOnlineSubscriptionsRelatedByRecipientId = new ArrayList JavaDoc();
5996            }
5997            else
5998            {
5999                              criteria.add(OnlineSubscriptionPeer.RECIPIENT_ID, getCustomerId());
6000                              collOnlineSubscriptionsRelatedByRecipientId = OnlineSubscriptionPeer.doSelectJoinSorder(criteria);
6001            }
6002        }
6003        else
6004        {
6005            // the following code is to determine if a new query is
6006
// called for. If the criteria is the same as the last
6007
// one, just return the collection.
6008

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          /**
6025     * Collection to store aggregation of collInboxEvents
6026     */

6027    protected List JavaDoc collInboxEvents;
6028
6029    /**
6030     * Temporary storage of collInboxEvents to save a possible db hit in
6031     * the event objects are add to the collection, but the
6032     * complete collection is never requested.
6033     */

6034    protected void initInboxEvents()
6035    {
6036        if (collInboxEvents == null)
6037        {
6038            collInboxEvents = new ArrayList JavaDoc();
6039        }
6040    }
6041
6042    /**
6043     * Method called to associate a InboxEvent object to this object
6044     * through the InboxEvent foreign key attribute
6045     *
6046     * @param l InboxEvent
6047     * @throws TorqueException
6048     */

6049    public void addInboxEvent(InboxEvent l) throws TorqueException
6050    {
6051        getInboxEvents().add(l);
6052        l.setCustomer((Customer) this);
6053    }
6054
6055    /**
6056     * The criteria used to select the current contents of collInboxEvents
6057     */

6058    private Criteria lastInboxEventsCriteria = null;
6059      
6060    /**
6061     * If this collection has already been initialized, returns
6062     * the collection. Otherwise returns the results of
6063     * getInboxEvents(new Criteria())
6064     *
6065     * @throws TorqueException
6066     */

6067    public List JavaDoc getInboxEvents() throws TorqueException
6068    {
6069              if (collInboxEvents == null)
6070        {
6071            collInboxEvents = getInboxEvents(new Criteria(10));
6072        }
6073        return collInboxEvents;
6074          }
6075
6076    /**
6077     * If this collection has already been initialized with
6078     * an identical criteria, it returns the collection.
6079     * Otherwise if this Customer has previously
6080     * been saved, it will retrieve related InboxEvents from storage.
6081     * If this Customer is new, it will return
6082     * an empty collection or the current collection, the criteria
6083     * is ignored on a new object.
6084     *
6085     * @throws TorqueException
6086     */

6087    public List JavaDoc getInboxEvents(Criteria criteria) throws TorqueException
6088    {
6089              if (collInboxEvents == null)
6090        {
6091            if (isNew())
6092            {
6093               collInboxEvents = new ArrayList JavaDoc();
6094            }
6095            else
6096            {
6097                        criteria.add(InboxEventPeer.CUSTOMER_ID, getCustomerId() );
6098                        collInboxEvents = InboxEventPeer.doSelect(criteria);
6099            }
6100        }
6101        else
6102        {
6103            // criteria has no effect for a new object
6104
if (!isNew())
6105            {
6106                // the following code is to determine if a new query is
6107
// called for. If the criteria is the same as the last
6108
// one, just return the collection.
6109
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    /**
6122     * If this collection has already been initialized, returns
6123     * the collection. Otherwise returns the results of
6124     * getInboxEvents(new Criteria(),Connection)
6125     * This method takes in the Connection also as input so that
6126     * referenced objects can also be obtained using a Connection
6127     * that is taken as input
6128     */

6129    public List JavaDoc getInboxEvents(Connection JavaDoc con) throws TorqueException
6130    {
6131              if (collInboxEvents == null)
6132        {
6133            collInboxEvents = getInboxEvents(new Criteria(10), con);
6134        }
6135        return collInboxEvents;
6136          }
6137
6138    /**
6139     * If this collection has already been initialized with
6140     * an identical criteria, it returns the collection.
6141     * Otherwise if this Customer has previously
6142     * been saved, it will retrieve related InboxEvents from storage.
6143     * If this Customer is new, it will return
6144     * an empty collection or the current collection, the criteria
6145     * is ignored on a new object.
6146     * This method takes in the Connection also as input so that
6147     * referenced objects can also be obtained using a Connection
6148     * that is taken as input
6149     */

6150    public List JavaDoc getInboxEvents(Criteria criteria, Connection JavaDoc con)
6151            throws TorqueException
6152    {
6153              if (collInboxEvents == null)
6154        {
6155            if (isNew())
6156            {
6157               collInboxEvents = new ArrayList JavaDoc();
6158            }
6159            else
6160            {
6161                         criteria.add(InboxEventPeer.CUSTOMER_ID, getCustomerId());
6162                         collInboxEvents = InboxEventPeer.doSelect(criteria, con);
6163             }
6164         }
6165         else
6166         {
6167             // criteria has no effect for a new object
6168
if (!isNew())
6169             {
6170                 // the following code is to determine if a new query is
6171
// called for. If the criteria is the same as the last
6172
// one, just return the collection.
6173
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    /**
6196     * If this collection has already been initialized with
6197     * an identical criteria, it returns the collection.
6198     * Otherwise if this Customer is new, it will return
6199     * an empty collection; or if this Customer has previously
6200     * been saved, it will retrieve related InboxEvents from storage.
6201     *
6202     * This method is protected by default in order to keep the public
6203     * api reasonable. You can provide public methods for those you
6204     * actually need in Customer.
6205     */

6206    protected List JavaDoc getInboxEventsJoinCustomer(Criteria criteria)
6207        throws TorqueException
6208    {
6209                    if (collInboxEvents == null)
6210        {
6211            if (isNew())
6212            {
6213               collInboxEvents = new ArrayList JavaDoc();
6214            }
6215            else
6216            {
6217                              criteria.add(InboxEventPeer.CUSTOMER_ID, getCustomerId());
6218                              collInboxEvents = InboxEventPeer.doSelectJoinCustomer(criteria);
6219            }
6220        }
6221        else
6222        {
6223            // the following code is to determine if a new query is
6224
// called for. If the criteria is the same as the last
6225
// one, just return the collection.
6226

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    /**
6247     * If this collection has already been initialized with
6248     * an identical criteria, it returns the collection.
6249     * Otherwise if this Customer is new, it will return
6250     * an empty collection; or if this Customer has previously
6251     * been saved, it will retrieve related InboxEvents from storage.
6252     *
6253     * This method is protected by default in order to keep the public
6254     * api reasonable. You can provide public methods for those you
6255     * actually need in Customer.
6256     */

6257    protected List JavaDoc getInboxEventsJoinProject(Criteria criteria)
6258        throws TorqueException
6259    {
6260                    if (collInboxEvents == null)
6261        {
6262            if (isNew())
6263            {
6264               collInboxEvents = new ArrayList JavaDoc();
6265            }
6266            else
6267            {
6268                              criteria.add(InboxEventPeer.CUSTOMER_ID, getCustomerId());
6269                              collInboxEvents = InboxEventPeer.doSelectJoinProject(criteria);
6270            }
6271        }
6272        else
6273        {
6274            // the following code is to determine if a new query is
6275
// called for. If the criteria is the same as the last
6276
// one, just return the collection.
6277

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    /**
6298     * If this collection has already been initialized with
6299     * an identical criteria, it returns the collection.
6300     * Otherwise if this Customer is new, it will return
6301     * an empty collection; or if this Customer has previously
6302     * been saved, it will retrieve related InboxEvents from storage.
6303     *
6304     * This method is protected by default in order to keep the public
6305     * api reasonable. You can provide public methods for those you
6306     * actually need in Customer.
6307     */

6308    protected List JavaDoc getInboxEventsJoinProduct(Criteria criteria)
6309        throws TorqueException
6310    {
6311                    if (collInboxEvents == null)
6312        {
6313            if (isNew())
6314            {
6315               collInboxEvents = new ArrayList JavaDoc();
6316            }
6317            else
6318            {
6319                              criteria.add(InboxEventPeer.CUSTOMER_ID, getCustomerId());
6320                              collInboxEvents = InboxEventPeer.doSelectJoinProduct(criteria);
6321            }
6322        }
6323        else
6324        {
6325            // the following code is to determine if a new query is
6326
// called for. If the criteria is the same as the last
6327
// one, just return the collection.
6328

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          /**
6345     * Collection to store aggregation of collOutboxEvents
6346     */

6347    protected List JavaDoc collOutboxEvents;
6348
6349    /**
6350     * Temporary storage of collOutboxEvents to save a possible db hit in
6351     * the event objects are add to the collection, but the
6352     * complete collection is never requested.
6353     */

6354    protected void initOutboxEvents()
6355    {
6356        if (collOutboxEvents == null)
6357        {
6358            collOutboxEvents = new ArrayList JavaDoc();
6359        }
6360    }
6361
6362    /**
6363     * Method called to associate a OutboxEvent object to this object
6364     * through the OutboxEvent foreign key attribute
6365     *
6366     * @param l OutboxEvent
6367     * @throws TorqueException
6368     */

6369    public void addOutboxEvent(OutboxEvent l) throws TorqueException
6370    {
6371        getOutboxEvents().add(l);
6372        l.setCustomer((Customer) this);
6373    }
6374
6375    /**
6376     * The criteria used to select the current contents of collOutboxEvents
6377     */

6378    private Criteria lastOutboxEventsCriteria = null;
6379      
6380    /**
6381     * If this collection has already been initialized, returns
6382     * the collection. Otherwise returns the results of
6383     * getOutboxEvents(new Criteria())
6384     *
6385     * @throws TorqueException
6386     */

6387    public List JavaDoc getOutboxEvents() throws TorqueException
6388    {
6389              if (collOutboxEvents == null)
6390        {
6391            collOutboxEvents = getOutboxEvents(new Criteria(10));
6392        }
6393        return collOutboxEvents;
6394          }
6395
6396    /**
6397     * If this collection has already been initialized with
6398     * an identical criteria, it returns the collection.
6399     * Otherwise if this Customer has previously
6400     * been saved, it will retrieve related OutboxEvents from storage.
6401     * If this Customer is new, it will return
6402     * an empty collection or the current collection, the criteria
6403     * is ignored on a new object.
6404     *
6405     * @throws TorqueException
6406     */

6407    public List JavaDoc getOutboxEvents(Criteria criteria) throws TorqueException
6408    {
6409              if (collOutboxEvents == null)
6410        {
6411            if (isNew())
6412            {
6413               collOutboxEvents = new ArrayList JavaDoc();
6414            }
6415            else
6416            {
6417                        criteria.add(OutboxEventPeer.CUSTOMER_ID, getCustomerId() );
6418                        collOutboxEvents = OutboxEventPeer.doSelect(criteria);
6419            }
6420        }
6421        else
6422        {
6423            // criteria has no effect for a new object
6424
if (!isNew())
6425            {
6426                // the following code is to determine if a new query is
6427
// called for. If the criteria is the same as the last
6428
// one, just return the collection.
6429
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    /**
6442     * If this collection has already been initialized, returns
6443     * the collection. Otherwise returns the results of
6444     * getOutboxEvents(new Criteria(),Connection)
6445     * This method takes in the Connection also as input so that
6446     * referenced objects can also be obtained using a Connection
6447     * that is taken as input
6448     */

6449    public List JavaDoc getOutboxEvents(Connection JavaDoc con) throws TorqueException
6450    {
6451              if (collOutboxEvents == null)
6452        {
6453            collOutboxEvents = getOutboxEvents(new Criteria(10), con);
6454        }
6455        return collOutboxEvents;
6456          }
6457
6458    /**
6459     * If this collection has already been initialized with
6460     * an identical criteria, it returns the collection.
6461     * Otherwise if this Customer has previously
6462     * been saved, it will retrieve related OutboxEvents from storage.
6463     * If this Customer is new, it will return
6464     * an empty collection or the current collection, the criteria
6465     * is ignored on a new object.
6466     * This method takes in the Connection also as input so that
6467     * referenced objects can also be obtained using a Connection
6468     * that is taken as input
6469     */

6470    public List JavaDoc getOutboxEvents(Criteria criteria, Connection JavaDoc con)
6471            throws TorqueException
6472    {
6473              if (collOutboxEvents == null)
6474        {
6475            if (isNew())
6476            {
6477               collOutboxEvents = new ArrayList JavaDoc();
6478            }
6479            else
6480            {
6481                         criteria.add(OutboxEventPeer.CUSTOMER_ID, getCustomerId());
6482                         collOutboxEvents = OutboxEventPeer.doSelect(criteria, con);
6483             }
6484         }
6485         else
6486         {
6487             // criteria has no effect for a new object
6488
if (!isNew())
6489             {
6490                 // the following code is to determine if a new query is
6491
// called for. If the criteria is the same as the last
6492
// one, just return the collection.
6493
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    /**
6516     * If this collection has already been initialized with
6517     * an identical criteria, it returns the collection.
6518     * Otherwise if this Customer is new, it will return
6519     * an empty collection; or if this Customer has previously
6520     * been saved, it will retrieve related OutboxEvents from storage.
6521     *
6522     * This method is protected by default in order to keep the public
6523     * api reasonable. You can provide public methods for those you
6524     * actually need in Customer.
6525     */

6526    protected List JavaDoc getOutboxEventsJoinCustomer(Criteria criteria)
6527        throws TorqueException
6528    {
6529                    if (collOutboxEvents == null)
6530        {
6531            if (isNew())
6532            {
6533               collOutboxEvents = new ArrayList JavaDoc();
6534            }
6535            else
6536            {
6537                              criteria.add(OutboxEventPeer.CUSTOMER_ID, getCustomerId());
6538                              collOutboxEvents = OutboxEventPeer.doSelectJoinCustomer(criteria);
6539            }
6540        }
6541        else
6542        {
6543            // the following code is to determine if a new query is
6544
// called for. If the criteria is the same as the last
6545
// one, just return the collection.
6546

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    /**
6567     * If this collection has already been initialized with
6568     * an identical criteria, it returns the collection.
6569     * Otherwise if this Customer is new, it will return
6570     * an empty collection; or if this Customer has previously
6571     * been saved, it will retrieve related OutboxEvents from storage.
6572     *
6573     * This method is protected by default in order to keep the public
6574     * api reasonable. You can provide public methods for those you
6575     * actually need in Customer.
6576     */

6577    protected List JavaDoc getOutboxEventsJoinProject(Criteria criteria)
6578        throws TorqueException
6579    {
6580                    if (collOutboxEvents == null)
6581        {
6582            if (isNew())
6583            {
6584               collOutboxEvents = new ArrayList JavaDoc();
6585            }
6586            else
6587            {
6588                              criteria.add(OutboxEventPeer.CUSTOMER_ID, getCustomerId());
6589                              collOutboxEvents = OutboxEventPeer.doSelectJoinProject(criteria);
6590            }
6591        }
6592        else
6593        {
6594            // the following code is to determine if a new query is
6595
// called for. If the criteria is the same as the last
6596
// one, just return the collection.
6597

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    /**
6618     * If this collection has already been initialized with
6619     * an identical criteria, it returns the collection.
6620     * Otherwise if this Customer is new, it will return
6621     * an empty collection; or if this Customer has previously
6622     * been saved, it will retrieve related OutboxEvents from storage.
6623     *
6624     * This method is protected by default in order to keep the public
6625     * api reasonable. You can provide public methods for those you
6626     * actually need in Customer.
6627     */

6628    protected List JavaDoc getOutboxEventsJoinProduct(Criteria criteria)
6629        throws TorqueException
6630    {
6631                    if (collOutboxEvents == null)
6632        {
6633            if (isNew())
6634            {
6635               collOutboxEvents = new ArrayList JavaDoc();
6636            }
6637            else
6638            {
6639                              criteria.add(OutboxEventPeer.CUSTOMER_ID, getCustomerId());
6640                              collOutboxEvents = OutboxEventPeer.doSelectJoinProduct(criteria);
6641            }
6642        }
6643        else
6644        {
6645            // the following code is to determine if a new query is
6646
// called for. If the criteria is the same as the last
6647
// one, just return the collection.
6648

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          /**
6665     * Collection to store aggregation of collSorderItemsRelatedByCustomerId
6666     */

6667    protected List JavaDoc collSorderItemsRelatedByCustomerId;
6668
6669    /**
6670     * Temporary storage of collSorderItemsRelatedByCustomerId to save a possible db hit in
6671     * the event objects are add to the collection, but the
6672     * complete collection is never requested.
6673     */

6674    protected void initSorderItemsRelatedByCustomerId()
6675    {
6676        if (collSorderItemsRelatedByCustomerId == null)
6677        {
6678            collSorderItemsRelatedByCustomerId = new ArrayList JavaDoc();
6679        }
6680    }
6681
6682    /**
6683     * Method called to associate a SorderItem object to this object
6684     * through the SorderItem foreign key attribute
6685     *
6686     * @param l SorderItem
6687     * @throws TorqueException
6688     */

6689    public void addSorderItemRelatedByCustomerId(SorderItem l) throws TorqueException
6690    {
6691        getSorderItemsRelatedByCustomerId().add(l);
6692        l.setCustomerRelatedByCustomerId((Customer) this);
6693    }
6694
6695    /**
6696     * The criteria used to select the current contents of collSorderItemsRelatedByCustomerId
6697     */

6698    private Criteria lastSorderItemsRelatedByCustomerIdCriteria = null;
6699      
6700    /**
6701     * If this collection has already been initialized, returns
6702     * the collection. Otherwise returns the results of
6703     * getSorderItemsRelatedByCustomerId(new Criteria())
6704     *
6705     * @throws TorqueException
6706     */

6707    public List JavaDoc getSorderItemsRelatedByCustomerId() throws TorqueException
6708    {
6709              if (collSorderItemsRelatedByCustomerId == null)
6710        {
6711            collSorderItemsRelatedByCustomerId = getSorderItemsRelatedByCustomerId(new Criteria(10));
6712        }
6713        return collSorderItemsRelatedByCustomerId;
6714          }
6715
6716    /**
6717     * If this collection has already been initialized with
6718     * an identical criteria, it returns the collection.
6719     * Otherwise if this Customer has previously
6720     * been saved, it will retrieve related SorderItemsRelatedByCustomerId from storage.
6721     * If this Customer is new, it will return
6722     * an empty collection or the current collection, the criteria
6723     * is ignored on a new object.
6724     *
6725     * @throws TorqueException
6726     */

6727    public List JavaDoc getSorderItemsRelatedByCustomerId(Criteria criteria) throws TorqueException
6728    {
6729              if (collSorderItemsRelatedByCustomerId == null)
6730        {
6731            if (isNew())
6732            {
6733               collSorderItemsRelatedByCustomerId = new ArrayList JavaDoc();
6734            }
6735            else
6736            {
6737                        criteria.add(SorderItemPeer.CUSTOMER_ID, getCustomerId() );
6738                        collSorderItemsRelatedByCustomerId = SorderItemPeer.doSelect(criteria);
6739            }
6740        }
6741        else
6742        {
6743            // criteria has no effect for a new object
6744
if (!isNew())
6745            {
6746                // the following code is to determine if a new query is
6747
// called for. If the criteria is the same as the last
6748
// one, just return the collection.
6749
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    /**
6762     * If this collection has already been initialized, returns
6763     * the collection. Otherwise returns the results of
6764     * getSorderItemsRelatedByCustomerId(new Criteria(),Connection)
6765     * This method takes in the Connection also as input so that
6766     * referenced objects can also be obtained using a Connection
6767     * that is taken as input
6768     */

6769    public List JavaDoc getSorderItemsRelatedByCustomerId(Connection JavaDoc con) throws TorqueException
6770    {
6771              if (collSorderItemsRelatedByCustomerId == null)
6772        {
6773            collSorderItemsRelatedByCustomerId = getSorderItemsRelatedByCustomerId(new Criteria(10), con);
6774        }
6775        return collSorderItemsRelatedByCustomerId;
6776          }
6777
6778    /**
6779     * If this collection has already been initialized with
6780     * an identical criteria, it returns the collection.
6781     * Otherwise if this Customer has previously
6782     * been saved, it will retrieve related SorderItemsRelatedByCustomerId from storage.
6783     * If this Customer is new, it will return
6784     * an empty collection or the current collection, the criteria
6785     * is ignored on a new object.
6786     * This method takes in the Connection also as input so that
6787     * referenced objects can also be obtained using a Connection
6788     * that is taken as input
6789     */

6790    public List JavaDoc getSorderItemsRelatedByCustomerId(Criteria criteria, Connection JavaDoc con)
6791            throws TorqueException
6792    {
6793              if (collSorderItemsRelatedByCustomerId == null)
6794        {
6795            if (isNew())
6796            {
6797               collSorderItemsRelatedByCustomerId = new ArrayList JavaDoc();
6798            }
6799            else
6800            {
6801                         criteria.add(SorderItemPeer.CUSTOMER_ID, getCustomerId());
6802                         collSorderItemsRelatedByCustomerId = SorderItemPeer.doSelect(criteria, con);
6803             }
6804         }
6805         else
6806         {
6807             // criteria has no effect for a new object
6808
if (!isNew())
6809             {
6810                 // the following code is to determine if a new query is
6811
// called for. If the criteria is the same as the last
6812
// one, just return the collection.
6813
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    /**
6836     * If this collection has already been initialized with
6837     * an identical criteria, it returns the collection.
6838     * Otherwise if this Customer is new, it will return
6839     * an empty collection; or if this Customer has previously
6840     * been saved, it will retrieve related SorderItemsRelatedByCustomerId from storage.
6841     *
6842     * This method is protected by default in order to keep the public
6843     * api reasonable. You can provide public methods for those you
6844     * actually need in Customer.
6845     */

6846    protected List JavaDoc getSorderItemsRelatedByCustomerIdJoinSorder(Criteria criteria)
6847        throws TorqueException
6848    {
6849                    if (collSorderItemsRelatedByCustomerId == null)
6850        {
6851            if (isNew())
6852            {
6853               collSorderItemsRelatedByCustomerId = new ArrayList JavaDoc();
6854            }
6855            else
6856            {
6857                              criteria.add(SorderItemPeer.CUSTOMER_ID, getCustomerId());
6858                              collSorderItemsRelatedByCustomerId = SorderItemPeer.doSelectJoinSorder(criteria);
6859            }
6860        }
6861        else
6862        {
6863            // the following code is to determine if a new query is
6864
// called for. If the criteria is the same as the last
6865
// one, just return the collection.
6866

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    /**
6887     * If this collection has already been initialized with
6888     * an identical criteria, it returns the collection.
6889     * Otherwise if this Customer is new, it will return
6890     * an empty collection; or if this Customer has previously
6891     * been saved, it will retrieve related SorderItemsRelatedByCustomerId from storage.
6892     *
6893     * This method is protected by default in order to keep the public
6894     * api reasonable. You can provide public methods for those you
6895     * actually need in Customer.
6896     */

6897    protected List JavaDoc getSorderItemsRelatedByCustomerIdJoinProduct(Criteria criteria)
6898        throws TorqueException
6899    {
6900                    if (collSorderItemsRelatedByCustomerId == null)
6901        {
6902            if (isNew())
6903            {
6904               collSorderItemsRelatedByCustomerId = new ArrayList JavaDoc();
6905            }
6906            else
6907            {
6908                              criteria.add(SorderItemPeer.CUSTOMER_ID, getCustomerId());
6909                              collSorderItemsRelatedByCustomerId = SorderItemPeer.doSelectJoinProduct(criteria);
6910            }
6911        }
6912        else
6913        {
6914            // the following code is to determine if a new query is
6915
// called for. If the criteria is the same as the last
6916
// one, just return the collection.
6917

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    /**
6946     * If this collection has already been initialized with
6947     * an identical criteria, it returns the collection.
6948     * Otherwise if this Customer is new, it will return
6949     * an empty collection; or if this Customer has previously
6950     * been saved, it will retrieve related SorderItemsRelatedByCustomerId from storage.
6951     *
6952     * This method is protected by default in order to keep the public
6953     * api reasonable. You can provide public methods for those you
6954     * actually need in Customer.
6955     */

6956    protected List JavaDoc getSorderItemsRelatedByCustomerIdJoinCustomerRelatedByRecipientId(Criteria criteria)
6957        throws TorqueException
6958    {
6959                    if (collSorderItemsRelatedByCustomerId == null)
6960        {
6961            if (isNew())
6962            {
6963               collSorderItemsRelatedByCustomerId = new ArrayList JavaDoc();
6964            }
6965            else
6966            {
6967                              criteria.add(SorderItemPeer.CUSTOMER_ID, getCustomerId());
6968                              collSorderItemsRelatedByCustomerId = SorderItemPeer.doSelectJoinCustomerRelatedByRecipientId(criteria);
6969            }
6970        }
6971        else
6972        {
6973            // the following code is to determine if a new query is
6974
// called for. If the criteria is the same as the last
6975
// one, just return the collection.
6976

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    /**
6997     * If this collection has already been initialized with
6998     * an identical criteria, it returns the collection.
6999     * Otherwise if this Customer is new, it will return
7000     * an empty collection; or if this Customer has previously
7001     * been saved, it will retrieve related SorderItemsRelatedByCustomerId from storage.
7002     *
7003     * This method is protected by default in order to keep the public
7004     * api reasonable. You can provide public methods for those you
7005     * actually need in Customer.
7006     */

7007    protected List JavaDoc getSorderItemsRelatedByCustomerIdJoinProject(Criteria criteria)
7008        throws TorqueException
7009    {
7010                    if (collSorderItemsRelatedByCustomerId == null)
7011        {
7012            if (isNew())
7013            {
7014               collSorderItemsRelatedByCustomerId = new ArrayList JavaDoc();
7015            }
7016            else
7017            {
7018                              criteria.add(SorderItemPeer.CUSTOMER_ID, getCustomerId());
7019                              collSorderItemsRelatedByCustomerId = SorderItemPeer.doSelectJoinProject(criteria);
7020            }
7021        }
7022        else
7023        {
7024            // the following code is to determine if a new query is
7025
// called for. If the criteria is the same as the last
7026
// one, just return the collection.
7027

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    /**
7048     * If this collection has already been initialized with
7049     * an identical criteria, it returns the collection.
7050     * Otherwise if this Customer is new, it will return
7051     * an empty collection; or if this Customer has previously
7052     * been saved, it will retrieve related SorderItemsRelatedByCustomerId from storage.
7053     *
7054     * This method is protected by default in order to keep the public
7055     * api reasonable. You can provide public methods for those you
7056     * actually need in Customer.
7057     */

7058    protected List JavaDoc getSorderItemsRelatedByCustomerIdJoinCurrency(Criteria criteria)
7059        throws TorqueException
7060    {
7061                    if (collSorderItemsRelatedByCustomerId == null)
7062        {
7063            if (isNew())
7064            {
7065               collSorderItemsRelatedByCustomerId = new ArrayList JavaDoc();
7066            }
7067            else
7068            {
7069                              criteria.add(SorderItemPeer.CUSTOMER_ID, getCustomerId());
7070                              collSorderItemsRelatedByCustomerId = SorderItemPeer.doSelectJoinCurrency(criteria);
7071            }
7072        }
7073        else
7074        {
7075            // the following code is to determine if a new query is
7076
// called for. If the criteria is the same as the last
7077
// one, just return the collection.
7078

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          /**
7095     * Collection to store aggregation of collSorderItemsRelatedByRecipientId
7096     */

7097    protected List JavaDoc collSorderItemsRelatedByRecipientId;
7098
7099    /**
7100     * Temporary storage of collSorderItemsRelatedByRecipientId to save a possible db hit in
7101     * the event objects are add to the collection, but the
7102     * complete collection is never requested.
7103     */

7104    protected void initSorderItemsRelatedByRecipientId()
7105    {
7106        if (collSorderItemsRelatedByRecipientId == null)
7107        {
7108            collSorderItemsRelatedByRecipientId = new ArrayList JavaDoc();
7109        }
7110    }
7111
7112    /**
7113     * Method called to associate a SorderItem object to this object
7114     * through the SorderItem foreign key attribute
7115     *
7116     * @param l SorderItem
7117     * @throws TorqueException
7118     */

7119    public void addSorderItemRelatedByRecipientId(SorderItem l) throws TorqueException
7120    {
7121        getSorderItemsRelatedByRecipientId().add(l);
7122        l.setCustomerRelatedByRecipientId((Customer) this);
7123    }
7124
7125    /**
7126     * The criteria used to select the current contents of collSorderItemsRelatedByRecipientId
7127     */

7128    private Criteria lastSorderItemsRelatedByRecipientIdCriteria = null;
7129      
7130    /**
7131     * If this collection has already been initialized, returns
7132     * the collection. Otherwise returns the results of
7133     * getSorderItemsRelatedByRecipientId(new Criteria())
7134     *
7135     * @throws TorqueException
7136     */

7137    public List JavaDoc getSorderItemsRelatedByRecipientId() throws TorqueException
7138    {
7139              if (collSorderItemsRelatedByRecipientId == null)
7140        {
7141            collSorderItemsRelatedByRecipientId = getSorderItemsRelatedByRecipientId(new Criteria(10));
7142        }
7143        return collSorderItemsRelatedByRecipientId;
7144          }
7145
7146    /**
7147     * If this collection has already been initialized with
7148     * an identical criteria, it returns the collection.
7149     * Otherwise if this Customer has previously
7150     * been saved, it will retrieve related SorderItemsRelatedByRecipientId from storage.
7151     * If this Customer is new, it will return
7152     * an empty collection or the current collection, the criteria
7153     * is ignored on a new object.
7154     *
7155     * @throws TorqueException
7156     */

7157    public List JavaDoc getSorderItemsRelatedByRecipientId(Criteria criteria) throws TorqueException
7158    {
7159              if (collSorderItemsRelatedByRecipientId == null)
7160        {
7161            if (isNew())
7162            {
7163               collSorderItemsRelatedByRecipientId = new ArrayList JavaDoc();
7164            }
7165            else
7166            {
7167                        criteria.add(SorderItemPeer.RECIPIENT_ID, getCustomerId() );
7168                        collSorderItemsRelatedByRecipientId = SorderItemPeer.doSelect(criteria);
7169            }
7170        }
7171        else
7172        {
7173            // criteria has no effect for a new object
7174
if (!isNew())
7175            {
7176                // the following code is to determine if a new query is
7177
// called for. If the criteria is the same as the last
7178
// one, just return the collection.
7179
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    /**
7192     * If this collection has already been initialized, returns
7193     * the collection. Otherwise returns the results of
7194     * getSorderItemsRelatedByRecipientId(new Criteria(),Connection)
7195     * This method takes in the Connection also as input so that
7196     * referenced objects can also be obtained using a Connection
7197     * that is taken as input
7198     */

7199    public List JavaDoc getSorderItemsRelatedByRecipientId(Connection JavaDoc con) throws TorqueException
7200    {
7201              if (collSorderItemsRelatedByRecipientId == null)
7202        {
7203            collSorderItemsRelatedByRecipientId = getSorderItemsRelatedByRecipientId(new Criteria(10), con);
7204        }
7205        return collSorderItemsRelatedByRecipientId;
7206          }
7207
7208    /**
7209     * If this collection has already been initialized with
7210     * an identical criteria, it returns the collection.
7211     * Otherwise if this Customer has previously
7212     * been saved, it will retrieve related SorderItemsRelatedByRecipientId from storage.
7213     * If this Customer is new, it will return
7214     * an empty collection or the current collection, the criteria
7215     * is ignored on a new object.
7216     * This method takes in the Connection also as input so that
7217     * referenced objects can also be obtained using a Connection
7218     * that is taken as input
7219     */

7220    public List JavaDoc getSorderItemsRelatedByRecipientId(Criteria criteria, Connection JavaDoc con)
7221            throws TorqueException
7222    {
7223              if (collSorderItemsRelatedByRecipientId == null)
7224        {
7225            if (isNew())
7226            {
7227               collSorderItemsRelatedByRecipientId = new ArrayList JavaDoc();
7228            }
7229            else
7230            {
7231                         criteria.add(SorderItemPeer.RECIPIENT_ID, getCustomerId());
7232                         collSorderItemsRelatedByRecipientId = SorderItemPeer.doSelect(criteria, con);
7233             }
7234         }
7235         else
7236         {
7237             // criteria has no effect for a new object
7238
if (!isNew())
7239             {
7240                 // the following code is to determine if a new query is
7241
// called for. If the criteria is the same as the last
7242
// one, just return the collection.
7243
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    /**
7266     * If this collection has already been initialized with
7267     * an identical criteria, it returns the collection.
7268     * Otherwise if this Customer is new, it will return
7269     * an empty collection; or if this Customer has previously
7270     * been saved, it will retrieve related SorderItemsRelatedByRecipientId from storage.
7271     *
7272     * This method is protected by default in order to keep the public
7273     * api reasonable. You can provide public methods for those you
7274     * actually need in Customer.
7275     */

7276    protected List JavaDoc getSorderItemsRelatedByRecipientIdJoinSorder(Criteria criteria)
7277        throws TorqueException
7278    {
7279                    if (collSorderItemsRelatedByRecipientId == null)
7280        {
7281            if (isNew())
7282            {
7283               collSorderItemsRelatedByRecipientId = new ArrayList JavaDoc();
7284            }
7285            else
7286            {
7287                              criteria.add(SorderItemPeer.RECIPIENT_ID, getCustomerId());
7288                              collSorderItemsRelatedByRecipientId = SorderItemPeer.doSelectJoinSorder(criteria);
7289            }
7290        }
7291        else
7292        {
7293            // the following code is to determine if a new query is
7294
// called for. If the criteria is the same as the last
7295
// one, just return the collection.
7296

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    /**
7317     * If this collection has already been initialized with
7318     * an identical criteria, it returns the collection.
7319     * Otherwise if this Customer is new, it will return
7320     * an empty collection; or if this Customer has previously
7321     * been saved, it will retrieve related SorderItemsRelatedByRecipientId from storage.
7322     *
7323     * This method is protected by default in order to keep the public
7324     * api reasonable. You can provide public methods for those you
7325     * actually need in Customer.
7326     */

7327    protected List JavaDoc getSorderItemsRelatedByRecipientIdJoinProduct(Criteria criteria)
7328        throws TorqueException
7329    {
7330                    if (collSorderItemsRelatedByRecipientId == null)
7331        {
7332            if (isNew())
7333            {
7334               collSorderItemsRelatedByRecipientId = new ArrayList JavaDoc();
7335            }
7336            else
7337            {
7338                              criteria.add(SorderItemPeer.RECIPIENT_ID, getCustomerId());
7339                              collSorderItemsRelatedByRecipientId = SorderItemPeer.doSelectJoinProduct(criteria);
7340            }
7341        }
7342        else
7343        {
7344            // the following code is to determine if a new query is
7345
// called for. If the criteria is the same as the last
7346
// one, just return the collection.
7347

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    /**
7368     * If this collection has already been initialized with
7369     * an identical criteria, it returns the collection.
7370     * Otherwise if this Customer is new, it will return
7371     * an empty collection; or if this Customer has previously
7372     * been saved, it will retrieve related SorderItemsRelatedByRecipientId from storage.
7373     *
7374     * This method is protected by default in order to keep the public
7375     * api reasonable. You can provide public methods for those you
7376     * actually need in Customer.
7377     */

7378    protected List JavaDoc getSorderItemsRelatedByRecipientIdJoinCustomerRelatedByCustomerId(Criteria criteria)
7379        throws TorqueException
7380    {
7381                    if (collSorderItemsRelatedByRecipientId == null)
7382        {
7383            if (isNew())
7384            {
7385               collSorderItemsRelatedByRecipientId = new ArrayList JavaDoc();
7386            }
7387            else
7388            {
7389                              criteria.add(SorderItemPeer.RECIPIENT_ID, getCustomerId());
7390                              collSorderItemsRelatedByRecipientId = SorderItemPeer.doSelectJoinCustomerRelatedByCustomerId(criteria);
7391            }
7392        }
7393        else
7394        {
7395            // the following code is to determine if a new query is
7396
// called for. If the criteria is the same as the last
7397
// one, just return the collection.
7398

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    /**
7427     * If this collection has already been initialized with
7428     * an identical criteria, it returns the collection.
7429     * Otherwise if this Customer is new, it will return
7430     * an empty collection; or if this Customer has previously
7431     * been saved, it will retrieve related SorderItemsRelatedByRecipientId from storage.
7432     *
7433     * This method is protected by default in order to keep the public
7434     * api reasonable. You can provide public methods for those you
7435     * actually need in Customer.
7436     */

7437    protected List JavaDoc getSorderItemsRelatedByRecipientIdJoinProject(Criteria criteria)
7438        throws TorqueException
7439    {
7440                    if (collSorderItemsRelatedByRecipientId == null)
7441        {
7442            if (isNew())
7443            {
7444               collSorderItemsRelatedByRecipientId = new ArrayList JavaDoc();
7445            }
7446            else
7447            {
7448                              criteria.add(SorderItemPeer.RECIPIENT_ID, getCustomerId());
7449                              collSorderItemsRelatedByRecipientId = SorderItemPeer.doSelectJoinProject(criteria);
7450            }
7451        }
7452        else
7453        {
7454            // the following code is to determine if a new query is
7455
// called for. If the criteria is the same as the last
7456
// one, just return the collection.
7457

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    /**
7478     * If this collection has already been initialized with
7479     * an identical criteria, it returns the collection.
7480     * Otherwise if this Customer is new, it will return
7481     * an empty collection; or if this Customer has previously
7482     * been saved, it will retrieve related SorderItemsRelatedByRecipientId from storage.
7483     *
7484     * This method is protected by default in order to keep the public
7485     * api reasonable. You can provide public methods for those you
7486     * actually need in Customer.
7487     */

7488    protected List JavaDoc getSorderItemsRelatedByRecipientIdJoinCurrency(Criteria criteria)
7489        throws TorqueException
7490    {
7491                    if (collSorderItemsRelatedByRecipientId == null)
7492        {
7493            if (isNew())
7494            {
7495               collSorderItemsRelatedByRecipientId = new ArrayList JavaDoc();
7496            }
7497            else
7498            {
7499                              criteria.add(SorderItemPeer.RECIPIENT_ID, getCustomerId());
7500                              collSorderItemsRelatedByRecipientId = SorderItemPeer.doSelectJoinCurrency(criteria);
7501            }
7502        }
7503        else
7504        {
7505            // the following code is to determine if a new query is
7506
// called for. If the criteria is the same as the last
7507
// one, just return the collection.
7508

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          /**
7525     * Collection to store aggregation of collPaymentItems
7526     */

7527    protected List JavaDoc collPaymentItems;
7528
7529    /**
7530     * Temporary storage of collPaymentItems to save a possible db hit in
7531     * the event objects are add to the collection, but the
7532     * complete collection is never requested.
7533     */

7534    protected void initPaymentItems()
7535    {
7536        if (collPaymentItems == null)
7537        {
7538            collPaymentItems = new ArrayList JavaDoc();
7539        }
7540    }
7541
7542    /**
7543     * Method called to associate a PaymentItem object to this object
7544     * through the PaymentItem foreign key attribute
7545     *
7546     * @param l PaymentItem
7547     * @throws TorqueException
7548     */

7549    public void addPaymentItem(PaymentItem l) throws TorqueException
7550    {
7551        getPaymentItems().add(l);
7552        l.setCustomer((Customer) this);
7553    }
7554
7555    /**
7556     * The criteria used to select the current contents of collPaymentItems
7557     */

7558    private Criteria lastPaymentItemsCriteria = null;
7559      
7560    /**
7561     * If this collection has already been initialized, returns
7562     * the collection. Otherwise returns the results of
7563     * getPaymentItems(new Criteria())
7564     *
7565     * @throws TorqueException
7566     */

7567    public List JavaDoc getPaymentItems() throws TorqueException
7568    {
7569              if (collPaymentItems == null)
7570        {
7571            collPaymentItems = getPaymentItems(new Criteria(10));
7572        }
7573        return collPaymentItems;
7574          }
7575
7576    /**
7577     * If this collection has already been initialized with
7578     * an identical criteria, it returns the collection.
7579     * Otherwise if this Customer has previously
7580     * been saved, it will retrieve related PaymentItems from storage.
7581     * If this Customer is new, it will return
7582     * an empty collection or the current collection, the criteria
7583     * is ignored on a new object.
7584     *
7585     * @throws TorqueException
7586     */

7587    public List JavaDoc getPaymentItems(Criteria criteria) throws TorqueException
7588    {
7589              if (collPaymentItems == null)
7590        {
7591            if (isNew())
7592            {
7593               collPaymentItems = new ArrayList JavaDoc();
7594            }
7595            else
7596            {
7597                        criteria.add(PaymentItemPeer.CUSTOMER_ID, getCustomerId() );
7598                        collPaymentItems = PaymentItemPeer.doSelect(criteria);
7599            }
7600        }
7601        else
7602        {
7603            // criteria has no effect for a new object
7604
if (!isNew())
7605            {
7606                // the following code is to determine if a new query is
7607
// called for. If the criteria is the same as the last
7608
// one, just return the collection.
7609
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    /**
7622     * If this collection has already been initialized, returns
7623     * the collection. Otherwise returns the results of
7624     * getPaymentItems(new Criteria(),Connection)
7625     * This method takes in the Connection also as input so that
7626     * referenced objects can also be obtained using a Connection
7627     * that is taken as input
7628     */

7629    public List JavaDoc getPaymentItems(Connection JavaDoc con) throws TorqueException
7630    {
7631              if (collPaymentItems == null)
7632        {
7633            collPaymentItems = getPaymentItems(new Criteria(10), con);
7634        }
7635        return collPaymentItems;
7636          }
7637
7638    /**
7639     * If this collection has already been initialized with
7640     * an identical criteria, it returns the collection.
7641     * Otherwise if this Customer has previously
7642     * been saved, it will retrieve related PaymentItems from storage.
7643     * If this Customer is new, it will return
7644     * an empty collection or the current collection, the criteria
7645     * is ignored on a new object.
7646     * This method takes in the Connection also as input so that
7647     * referenced objects can also be obtained using a Connection
7648     * that is taken as input
7649     */

7650    public List JavaDoc getPaymentItems(Criteria criteria, Connection JavaDoc con)
7651            throws TorqueException
7652    {
7653              if (collPaymentItems == null)
7654        {
7655            if (isNew())
7656            {
7657               collPaymentItems = new ArrayList JavaDoc();
7658            }
7659            else
7660            {
7661                         criteria.add(PaymentItemPeer.CUSTOMER_ID, getCustomerId());
7662                         collPaymentItems = PaymentItemPeer.doSelect(criteria, con);
7663             }
7664         }
7665         else
7666         {
7667             // criteria has no effect for a new object
7668
if (!isNew())
7669             {
7670                 // the following code is to determine if a new query is
7671
// called for. If the criteria is the same as the last
7672
// one, just return the collection.
7673
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    /**
7696     * If this collection has already been initialized with
7697     * an identical criteria, it returns the collection.
7698     * Otherwise if this Customer is new, it will return
7699     * an empty collection; or if this Customer has previously
7700     * been saved, it will retrieve related PaymentItems from storage.
7701     *
7702     * This method is protected by default in order to keep the public
7703     * api reasonable. You can provide public methods for those you
7704     * actually need in Customer.
7705     */

7706    protected List JavaDoc getPaymentItemsJoinPayment(Criteria criteria)
7707        throws TorqueException
7708    {
7709                    if (collPaymentItems == null)
7710        {
7711            if (isNew())
7712            {
7713               collPaymentItems = new ArrayList JavaDoc();
7714            }
7715            else
7716            {
7717                              criteria.add(PaymentItemPeer.CUSTOMER_ID, getCustomerId());
7718                              collPaymentItems = PaymentItemPeer.doSelectJoinPayment(criteria);
7719            }
7720        }
7721        else
7722        {
7723            // the following code is to determine if a new query is
7724
// called for. If the criteria is the same as the last
7725
// one, just return the collection.
7726

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    /**
7747     * If this collection has already been initialized with
7748     * an identical criteria, it returns the collection.
7749     * Otherwise if this Customer is new, it will return
7750     * an empty collection; or if this Customer has previously
7751     * been saved, it will retrieve related PaymentItems from storage.
7752     *
7753     * This method is protected by default in order to keep the public
7754     * api reasonable. You can provide public methods for those you
7755     * actually need in Customer.
7756     */

7757    protected List JavaDoc getPaymentItemsJoinSorder(Criteria criteria)
7758        throws TorqueException
7759    {
7760                    if (collPaymentItems == null)
7761        {
7762            if (isNew())
7763            {
7764               collPaymentItems = new ArrayList JavaDoc();
7765            }
7766            else
7767            {
7768                              criteria.add(PaymentItemPeer.CUSTOMER_ID, getCustomerId());
7769                              collPaymentItems = PaymentItemPeer.doSelectJoinSorder(criteria);
7770            }
7771        }
7772        else
7773        {
7774            // the following code is to determine if a new query is
7775
// called for. If the criteria is the same as the last
7776
// one, just return the collection.
7777

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    /**
7798     * If this collection has already been initialized with
7799     * an identical criteria, it returns the collection.
7800     * Otherwise if this Customer is new, it will return
7801     * an empty collection; or if this Customer has previously
7802     * been saved, it will retrieve related PaymentItems from storage.
7803     *
7804     * This method is protected by default in order to keep the public
7805     * api reasonable. You can provide public methods for those you
7806     * actually need in Customer.
7807     */

7808    protected List JavaDoc getPaymentItemsJoinProduct(Criteria criteria)
7809        throws TorqueException
7810    {
7811                    if (collPaymentItems == null)
7812        {
7813            if (isNew())
7814            {
7815               collPaymentItems = new ArrayList JavaDoc();
7816            }
7817            else
7818            {
7819                              criteria.add(PaymentItemPeer.CUSTOMER_ID, getCustomerId());
7820                              collPaymentItems = PaymentItemPeer.doSelectJoinProduct(criteria);
7821            }
7822        }
7823        else
7824        {
7825            // the following code is to determine if a new query is
7826
// called for. If the criteria is the same as the last
7827
// one, just return the collection.
7828

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    /**
7849     * If this collection has already been initialized with
7850     * an identical criteria, it returns the collection.
7851     * Otherwise if this Customer is new, it will return
7852     * an empty collection; or if this Customer has previously
7853     * been saved, it will retrieve related PaymentItems from storage.
7854     *
7855     * This method is protected by default in order to keep the public
7856     * api reasonable. You can provide public methods for those you
7857     * actually need in Customer.
7858     */

7859    protected List JavaDoc getPaymentItemsJoinCurrency(Criteria criteria)
7860        throws TorqueException
7861    {
7862                    if (collPaymentItems == null)
7863        {
7864            if (isNew())
7865            {
7866               collPaymentItems = new ArrayList JavaDoc();
7867            }
7868            else
7869            {
7870                              criteria.add(PaymentItemPeer.CUSTOMER_ID, getCustomerId());
7871                              collPaymentItems = PaymentItemPeer.doSelectJoinCurrency(criteria);
7872            }
7873        }
7874        else
7875        {
7876            // the following code is to determine if a new query is
7877
// called for. If the criteria is the same as the last
7878
// one, just return the collection.
7879

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    /**
7900     * If this collection has already been initialized with
7901     * an identical criteria, it returns the collection.
7902     * Otherwise if this Customer is new, it will return
7903     * an empty collection; or if this Customer has previously
7904     * been saved, it will retrieve related PaymentItems from storage.
7905     *
7906     * This method is protected by default in order to keep the public
7907     * api reasonable. You can provide public methods for those you
7908     * actually need in Customer.
7909     */

7910    protected List JavaDoc getPaymentItemsJoinCustomer(Criteria criteria)
7911        throws TorqueException
7912    {
7913                    if (collPaymentItems == null)
7914        {
7915            if (isNew())
7916            {
7917               collPaymentItems = new ArrayList JavaDoc();
7918            }
7919            else
7920            {
7921                              criteria.add(PaymentItemPeer.CUSTOMER_ID, getCustomerId());
7922                              collPaymentItems = PaymentItemPeer.doSelectJoinCustomer(criteria);
7923            }
7924        }
7925        else
7926        {
7927            // the following code is to determine if a new query is
7928
// called for. If the criteria is the same as the last
7929
// one, just return the collection.
7930

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    /**
7951     * If this collection has already been initialized with
7952     * an identical criteria, it returns the collection.
7953     * Otherwise if this Customer is new, it will return
7954     * an empty collection; or if this Customer has previously
7955     * been saved, it will retrieve related PaymentItems from storage.
7956     *
7957     * This method is protected by default in order to keep the public
7958     * api reasonable. You can provide public methods for those you
7959     * actually need in Customer.
7960     */

7961    protected List JavaDoc getPaymentItemsJoinProject(Criteria criteria)
7962        throws TorqueException
7963    {
7964                    if (collPaymentItems == null)
7965        {
7966            if (isNew())
7967            {
7968               collPaymentItems = new ArrayList JavaDoc();
7969            }
7970            else
7971            {
7972                              criteria.add(PaymentItemPeer.CUSTOMER_ID, getCustomerId());
7973                              collPaymentItems = PaymentItemPeer.doSelectJoinProject(criteria);
7974            }
7975        }
7976        else
7977        {
7978            // the following code is to determine if a new query is
7979
// called for. If the criteria is the same as the last
7980
// one, just return the collection.
7981

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          /**
7998     * Collection to store aggregation of collShipmentItemsRelatedByCustomerId
7999     */

8000    protected List JavaDoc collShipmentItemsRelatedByCustomerId;
8001
8002    /**
8003     * Temporary storage of collShipmentItemsRelatedByCustomerId to save a possible db hit in
8004     * the event objects are add to the collection, but the
8005     * complete collection is never requested.
8006     */

8007    protected void initShipmentItemsRelatedByCustomerId()
8008    {
8009        if (collShipmentItemsRelatedByCustomerId == null)
8010        {
8011            collShipmentItemsRelatedByCustomerId = new ArrayList JavaDoc();
8012        }
8013    }
8014
8015    /**
8016     * Method called to associate a ShipmentItem object to this object
8017     * through the ShipmentItem foreign key attribute
8018     *
8019     * @param l ShipmentItem
8020     * @throws TorqueException
8021     */

8022    public void addShipmentItemRelatedByCustomerId(ShipmentItem l) throws TorqueException
8023    {
8024        getShipmentItemsRelatedByCustomerId().add(l);
8025        l.setCustomerRelatedByCustomerId((Customer) this);
8026    }
8027
8028    /**
8029     * The criteria used to select the current contents of collShipmentItemsRelatedByCustomerId
8030     */

8031    private Criteria lastShipmentItemsRelatedByCustomerIdCriteria = null;
8032      
8033    /**
8034     * If this collection has already been initialized, returns
8035     * the collection. Otherwise returns the results of
8036     * getShipmentItemsRelatedByCustomerId(new Criteria())
8037     *
8038     * @throws TorqueException
8039     */

8040    public List JavaDoc getShipmentItemsRelatedByCustomerId() throws TorqueException
8041    {
8042              if (collShipmentItemsRelatedByCustomerId == null)
8043        {
8044            collShipmentItemsRelatedByCustomerId = getShipmentItemsRelatedByCustomerId(new Criteria(10));
8045        }
8046        return collShipmentItemsRelatedByCustomerId;
8047          }
8048
8049    /**
8050     * If this collection has already been initialized with
8051     * an identical criteria, it returns the collection.
8052     * Otherwise if this Customer has previously
8053     * been saved, it will retrieve related ShipmentItemsRelatedByCustomerId from storage.
8054     * If this Customer is new, it will return
8055     * an empty collection or the current collection, the criteria
8056     * is ignored on a new object.
8057     *
8058     * @throws TorqueException
8059     */

8060    public List JavaDoc getShipmentItemsRelatedByCustomerId(Criteria criteria) throws TorqueException
8061    {
8062              if (collShipmentItemsRelatedByCustomerId == null)
8063        {
8064            if (isNew())
8065            {
8066               collShipmentItemsRelatedByCustomerId = new ArrayList JavaDoc();
8067            }
8068            else
8069            {
8070                        criteria.add(ShipmentItemPeer.CUSTOMER_ID, getCustomerId() );
8071                        collShipmentItemsRelatedByCustomerId = ShipmentItemPeer.doSelect(criteria);
8072            }
8073        }
8074        else
8075        {
8076            // criteria has no effect for a new object
8077
if (!isNew())
8078            {
8079                // the following code is to determine if a new query is
8080
// called for. If the criteria is the same as the last
8081
// one, just return the collection.
8082
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    /**
8095     * If this collection has already been initialized, returns
8096     * the collection. Otherwise returns the results of
8097     * getShipmentItemsRelatedByCustomerId(new Criteria(),Connection)
8098     * This method takes in the Connection also as input so that
8099     * referenced objects can also be obtained using a Connection
8100     * that is taken as input
8101     */

8102    public List JavaDoc getShipmentItemsRelatedByCustomerId(Connection JavaDoc con) throws TorqueException
8103    {
8104              if (collShipmentItemsRelatedByCustomerId == null)
8105        {
8106            collShipmentItemsRelatedByCustomerId = getShipmentItemsRelatedByCustomerId(new Criteria(10), con);
8107        }
8108        return collShipmentItemsRelatedByCustomerId;
8109          }
8110
8111    /**
8112     * If this collection has already been initialized with
8113     * an identical criteria, it returns the collection.
8114     * Otherwise if this Customer has previously
8115     * been saved, it will retrieve related ShipmentItemsRelatedByCustomerId from storage.
8116     * If this Customer is new, it will return
8117     * an empty collection or the current collection, the criteria
8118     * is ignored on a new object.
8119     * This method takes in the Connection also as input so that
8120     * referenced objects can also be obtained using a Connection
8121     * that is taken as input
8122     */

8123    public List JavaDoc getShipmentItemsRelatedByCustomerId(Criteria criteria, Connection JavaDoc con)
8124            throws TorqueException
8125    {
8126              if (collShipmentItemsRelatedByCustomerId == null)
8127        {
8128            if (isNew())
8129            {
8130               collShipmentItemsRelatedByCustomerId = new ArrayList JavaDoc();
8131            }
8132            else
8133            {
8134                         criteria.add(ShipmentItemPeer.CUSTOMER_ID, getCustomerId());
8135                         collShipmentItemsRelatedByCustomerId = ShipmentItemPeer.doSelect(criteria, con);
8136             }
8137         }
8138         else
8139         {
8140             // criteria has no effect for a new object
8141
if (!isNew())
8142             {
8143                 // the following code is to determine if a new query is
8144
// called for. If the criteria is the same as the last
8145
// one, just return the collection.
8146
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    /**
8169     * If this collection has already been initialized with
8170     * an identical criteria, it returns the collection.
8171     * Otherwise if this Customer is new, it will return
8172     * an empty collection; or if this Customer has previously
8173     * been saved, it will retrieve related ShipmentItemsRelatedByCustomerId from storage.
8174     *
8175     * This method is protected by default in order to keep the public
8176     * api reasonable. You can provide public methods for those you
8177     * actually need in Customer.
8178     */

8179    protected List JavaDoc getShipmentItemsRelatedByCustomerIdJoinShipment(Criteria criteria)
8180        throws TorqueException
8181    {
8182                    if (collShipmentItemsRelatedByCustomerId == null)
8183        {
8184            if (isNew())
8185            {
8186               collShipmentItemsRelatedByCustomerId = new ArrayList JavaDoc();
8187            }
8188            else
8189            {
8190                              criteria.add(ShipmentItemPeer.CUSTOMER_ID, getCustomerId());
8191                              collShipmentItemsRelatedByCustomerId = ShipmentItemPeer.doSelectJoinShipment(criteria);
8192            }
8193        }
8194        else
8195        {
8196            // the following code is to determine if a new query is
8197
// called for. If the criteria is the same as the last
8198
// one, just return the collection.
8199

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    /**
8220     * If this collection has already been initialized with
8221     * an identical criteria, it returns the collection.
8222     * Otherwise if this Customer is new, it will return
8223     * an empty collection; or if this Customer has previously
8224     * been saved, it will retrieve related ShipmentItemsRelatedByCustomerId from storage.
8225     *
8226     * This method is protected by default in order to keep the public
8227     * api reasonable. You can provide public methods for those you
8228     * actually need in Customer.
8229     */

8230    protected List JavaDoc getShipmentItemsRelatedByCustomerIdJoinSorder(Criteria criteria)
8231        throws TorqueException
8232    {
8233                    if (collShipmentItemsRelatedByCustomerId == null)
8234        {
8235            if (isNew())
8236            {
8237               collShipmentItemsRelatedByCustomerId = new ArrayList JavaDoc();
8238            }
8239            else
8240            {
8241                              criteria.add(ShipmentItemPeer.CUSTOMER_ID, getCustomerId());
8242                              collShipmentItemsRelatedByCustomerId = ShipmentItemPeer.doSelectJoinSorder(criteria);
8243            }
8244        }
8245        else
8246        {
8247            // the following code is to determine if a new query is
8248
// called for. If the criteria is the same as the last
8249
// one, just return the collection.
8250

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    /**
8271     * If this collection has already been initialized with
8272     * an identical criteria, it returns the collection.
8273     * Otherwise if this Customer is new, it will return
8274     * an empty collection; or if this Customer has previously
8275     * been saved, it will retrieve related ShipmentItemsRelatedByCustomerId from storage.
8276     *
8277     * This method is protected by default in order to keep the public
8278     * api reasonable. You can provide public methods for those you
8279     * actually need in Customer.
8280     */

8281    protected List JavaDoc getShipmentItemsRelatedByCustomerIdJoinProduct(Criteria criteria)
8282        throws TorqueException
8283    {
8284                    if (collShipmentItemsRelatedByCustomerId == null)
8285        {
8286            if (isNew())
8287            {
8288               collShipmentItemsRelatedByCustomerId = new ArrayList JavaDoc();
8289            }
8290            else
8291            {
8292                              criteria.add(ShipmentItemPeer.CUSTOMER_ID, getCustomerId());
8293                              collShipmentItemsRelatedByCustomerId = ShipmentItemPeer.doSelectJoinProduct(criteria);
8294            }
8295        }
8296        else
8297        {
8298            // the following code is to determine if a new query is
8299
// called for. If the criteria is the same as the last
8300
// one, just return the collection.
8301

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    /**
8330     * If this collection has already been initialized with
8331     * an identical criteria, it returns the collection.
8332     * Otherwise if this Customer is new, it will return
8333     * an empty collection; or if this Customer has previously
8334     * been saved, it will retrieve related ShipmentItemsRelatedByCustomerId from storage.
8335     *
8336     * This method is protected by default in order to keep the public
8337     * api reasonable. You can provide public methods for those you
8338     * actually need in Customer.
8339     */

8340    protected List JavaDoc getShipmentItemsRelatedByCustomerIdJoinCustomerRelatedByRecipientId(Criteria criteria)
8341        throws TorqueException
8342    {
8343                    if (collShipmentItemsRelatedByCustomerId == null)
8344        {
8345            if (isNew())
8346            {
8347               collShipmentItemsRelatedByCustomerId = new ArrayList JavaDoc();
8348            }
8349            else
8350            {
8351                              criteria.add(ShipmentItemPeer.CUSTOMER_ID, getCustomerId());
8352                              collShipmentItemsRelatedByCustomerId = ShipmentItemPeer.doSelectJoinCustomerRelatedByRecipientId(criteria);
8353            }
8354        }
8355        else
8356        {
8357            // the following code is to determine if a new query is
8358
// called for. If the criteria is the same as the last
8359
// one, just return the collection.
8360

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    /**
8381     * If this collection has already been initialized with
8382     * an identical criteria, it returns the collection.
8383     * Otherwise if this Customer is new, it will return
8384     * an empty collection; or if this Customer has previously
8385     * been saved, it will retrieve related ShipmentItemsRelatedByCustomerId from storage.
8386     *
8387     * This method is protected by default in order to keep the public
8388     * api reasonable. You can provide public methods for those you
8389     * actually need in Customer.
8390     */

8391    protected List JavaDoc getShipmentItemsRelatedByCustomerIdJoinProject(Criteria criteria)
8392        throws TorqueException
8393    {
8394                    if (collShipmentItemsRelatedByCustomerId == null)
8395        {
8396            if (isNew())
8397            {
8398               collShipmentItemsRelatedByCustomerId = new ArrayList JavaDoc();
8399            }
8400            else
8401            {
8402                              criteria.add(ShipmentItemPeer.CUSTOMER_ID, getCustomerId());
8403                              collShipmentItemsRelatedByCustomerId = ShipmentItemPeer.doSelectJoinProject(criteria);
8404            }
8405        }
8406        else
8407        {
8408            // the following code is to determine if a new query is
8409
// called for. If the criteria is the same as the last
8410
// one, just return the collection.
8411

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          /**
8428     * Collection to store aggregation of collShipmentItemsRelatedByRecipientId
8429     */

8430    protected List JavaDoc collShipmentItemsRelatedByRecipientId;
8431
8432    /**
8433     * Temporary storage of collShipmentItemsRelatedByRecipientId to save a possible db hit in
8434     * the event objects are add to the collection, but the
8435     * complete collection is never requested.
8436     */

8437    protected void initShipmentItemsRelatedByRecipientId()
8438    {
8439        if (collShipmentItemsRelatedByRecipientId == null)
8440        {
8441            collShipmentItemsRelatedByRecipientId = new ArrayList JavaDoc();
8442        }
8443    }
8444
8445    /**
8446     * Method called to associate a ShipmentItem object to this object
8447     * through the ShipmentItem foreign key attribute
8448     *
8449     * @param l ShipmentItem
8450     * @throws TorqueException
8451     */

8452    public void addShipmentItemRelatedByRecipientId(ShipmentItem l) throws TorqueException
8453    {
8454        getShipmentItemsRelatedByRecipientId().add(l);
8455        l.setCustomerRelatedByRecipientId((Customer) this);
8456    }
8457
8458    /**
8459     * The criteria used to select the current contents of collShipmentItemsRelatedByRecipientId
8460     */

8461    private Criteria lastShipmentItemsRelatedByRecipientIdCriteria = null;
8462      
8463    /**
8464     * If this collection has already been initialized, returns
8465     * the collection. Otherwise returns the results of
8466     * getShipmentItemsRelatedByRecipientId(new Criteria())
8467     *
8468     * @throws TorqueException
8469     */

8470    public List JavaDoc getShipmentItemsRelatedByRecipientId() throws TorqueException
8471    {
8472              if (collShipmentItemsRelatedByRecipientId == null)
8473        {
8474            collShipmentItemsRelatedByRecipientId = getShipmentItemsRelatedByRecipientId(new Criteria(10));
8475        }
8476        return collShipmentItemsRelatedByRecipientId;
8477          }
8478
8479    /**
8480     * If this collection has already been initialized with
8481     * an identical criteria, it returns the collection.
8482     * Otherwise if this Customer has previously
8483     * been saved, it will retrieve related ShipmentItemsRelatedByRecipientId from storage.
8484     * If this Customer is new, it will return
8485     * an empty collection or the current collection, the criteria
8486     * is ignored on a new object.
8487     *
8488     * @throws TorqueException
8489     */

8490    public List JavaDoc getShipmentItemsRelatedByRecipientId(Criteria criteria) throws TorqueException
8491    {
8492              if (collShipmentItemsRelatedByRecipientId == null)
8493        {
8494            if (isNew())
8495            {
8496               collShipmentItemsRelatedByRecipientId = new ArrayList JavaDoc();
8497            }
8498            else
8499            {
8500                        criteria.add(ShipmentItemPeer.RECIPIENT_ID, getCustomerId() );
8501                        collShipmentItemsRelatedByRecipientId = ShipmentItemPeer.doSelect(criteria);
8502            }
8503        }
8504        else
8505        {
8506            // criteria has no effect for a new object
8507
if (!isNew())
8508            {
8509                // the following code is to determine if a new query is
8510
// called for. If the criteria is the same as the last
8511
// one, just return the collection.
8512
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    /**
8525     * If this collection has already been initialized, returns
8526     * the collection. Otherwise returns the results of
8527     * getShipmentItemsRelatedByRecipientId(new Criteria(),Connection)
8528     * This method takes in the Connection also as input so that
8529     * referenced objects can also be obtained using a Connection
8530     * that is taken as input
8531     */

8532    public List JavaDoc getShipmentItemsRelatedByRecipientId(Connection JavaDoc con) throws TorqueException
8533    {
8534              if (collShipmentItemsRelatedByRecipientId == null)
8535        {
8536            collShipmentItemsRelatedByRecipientId = getShipmentItemsRelatedByRecipientId(new Criteria(10), con);
8537        }
8538        return collShipmentItemsRelatedByRecipientId;
8539          }
8540
8541    /**
8542     * If this collection has already been initialized with
8543     * an identical criteria, it returns the collection.
8544     * Otherwise if this Customer has previously
8545     * been saved, it will retrieve related ShipmentItemsRelatedByRecipientId from storage.
8546     * If this Customer is new, it will return
8547     * an empty collection or the current collection, the criteria
8548     * is ignored on a new object.
8549     * This method takes in the Connection also as input so that
8550     * referenced objects can also be obtained using a Connection
8551     * that is taken as input
8552     */

8553    public List JavaDoc getShipmentItemsRelatedByRecipientId(Criteria criteria, Connection JavaDoc con)
8554            throws TorqueException
8555    {
8556              if (collShipmentItemsRelatedByRecipientId == null)
8557        {
8558            if (isNew())
8559            {
8560               collShipmentItemsRelatedByRecipientId = new ArrayList JavaDoc();
8561            }
8562            else
8563            {
8564                         criteria.add(ShipmentItemPeer.RECIPIENT_ID, getCustomerId());
8565                         collShipmentItemsRelatedByRecipientId = ShipmentItemPeer.doSelect(criteria, con);
8566             }
8567         }
8568         else
8569         {
8570             // criteria has no effect for a new object
8571
if (!isNew())
8572             {
8573                 // the following code is to determine if a new query is
8574
// called for. If the criteria is the same as the last
8575
// one, just return the collection.
8576
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    /**
8599     * If this collection has already been initialized with
8600     * an identical criteria, it returns the collection.
8601     * Otherwise if this Customer is new, it will return
8602     * an empty collection; or if this Customer has previously
8603     * been saved, it will retrieve related ShipmentItemsRelatedByRecipientId from storage.
8604     *
8605     * This method is protected by default in order to keep the public
8606     * api reasonable. You can provide public methods for those you
8607     * actually need in Customer.
8608     */

8609    protected List JavaDoc getShipmentItemsRelatedByRecipientIdJoinShipment(Criteria criteria)
8610        throws TorqueException
8611    {
8612                    if (collShipmentItemsRelatedByRecipientId == null)
8613        {
8614            if (isNew())
8615            {
8616               collShipmentItemsRelatedByRecipientId = new ArrayList JavaDoc();
8617            }
8618            else
8619            {
8620                              criteria.add(ShipmentItemPeer.RECIPIENT_ID, getCustomerId());
8621                              collShipmentItemsRelatedByRecipientId = ShipmentItemPeer.doSelectJoinShipment(criteria);
8622            }
8623        }
8624        else
8625        {
8626            // the following code is to determine if a new query is
8627
// called for. If the criteria is the same as the last
8628
// one, just return the collection.
8629

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    /**
8650     * If this collection has already been initialized with
8651     * an identical criteria, it returns the collection.
8652     * Otherwise if this Customer is new, it will return
8653     * an empty collection; or if this Customer has previously
8654     * been saved, it will retrieve related ShipmentItemsRelatedByRecipientId from storage.
8655     *
8656     * This method is protected by default in order to keep the public
8657     * api reasonable. You can provide public methods for those you
8658     * actually need in Customer.
8659     */

8660    protected List JavaDoc getShipmentItemsRelatedByRecipientIdJoinSorder(Criteria criteria)
8661        throws TorqueException
8662    {
8663                    if (collShipmentItemsRelatedByRecipientId == null)
8664        {
8665            if (isNew())
8666            {
8667               collShipmentItemsRelatedByRecipientId = new ArrayList JavaDoc();
8668            }
8669            else
8670            {
8671                              criteria.add(ShipmentItemPeer.RECIPIENT_ID, getCustomerId());
8672                              collShipmentItemsRelatedByRecipientId = ShipmentItemPeer.doSelectJoinSorder(criteria);
8673            }
8674        }
8675        else
8676        {
8677            // the following code is to determine if a new query is
8678
// called for. If the criteria is the same as the last
8679
// one, just return the collection.
8680

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    /**
8701     * If this collection has already been initialized with
8702     * an identical criteria, it returns the collection.
8703     * Otherwise if this Customer is new, it will return
8704     * an empty collection; or if this Customer has previously
8705     * been saved, it will retrieve related ShipmentItemsRelatedByRecipientId from storage.
8706     *
8707     * This method is protected by default in order to keep the public
8708     * api reasonable. You can provide public methods for those you
8709     * actually need in Customer.
8710     */

8711    protected List JavaDoc getShipmentItemsRelatedByRecipientIdJoinProduct(Criteria criteria)
8712        throws TorqueException
8713    {
8714                    if (collShipmentItemsRelatedByRecipientId == null)
8715        {
8716            if (isNew())
8717            {
8718               collShipmentItemsRelatedByRecipientId = new ArrayList JavaDoc();
8719            }
8720            else
8721            {
8722                              criteria.add(ShipmentItemPeer.RECIPIENT_ID, getCustomerId());
8723                              collShipmentItemsRelatedByRecipientId = ShipmentItemPeer.doSelectJoinProduct(criteria);
8724            }
8725        }
8726        else
8727        {
8728            // the following code is to determine if a new query is
8729
// called for. If the criteria is the same as the last
8730
// one, just return the collection.
8731

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    /**
8752     * If this collection has already been initialized with
8753     * an identical criteria, it returns the collection.
8754     * Otherwise if this Customer is new, it will return
8755     * an empty collection; or if this Customer has previously
8756     * been saved, it will retrieve related ShipmentItemsRelatedByRecipientId from storage.
8757     *
8758     * This method is protected by default in order to keep the public
8759     * api reasonable. You can provide public methods for those you
8760     * actually need in Customer.
8761     */

8762    protected List JavaDoc getShipmentItemsRelatedByRecipientIdJoinCustomerRelatedByCustomerId(Criteria criteria)
8763        throws TorqueException
8764    {
8765                    if (collShipmentItemsRelatedByRecipientId == null)
8766        {
8767            if (isNew())
8768            {
8769               collShipmentItemsRelatedByRecipientId = new ArrayList JavaDoc();
8770            }
8771            else
8772            {
8773                              criteria.add(ShipmentItemPeer.RECIPIENT_ID, getCustomerId());
8774                              collShipmentItemsRelatedByRecipientId = ShipmentItemPeer.doSelectJoinCustomerRelatedByCustomerId(criteria);
8775            }
8776        }
8777        else
8778        {
8779            // the following code is to determine if a new query is
8780
// called for. If the criteria is the same as the last
8781
// one, just return the collection.
8782

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    /**
8811     * If this collection has already been initialized with
8812     * an identical criteria, it returns the collection.
8813     * Otherwise if this Customer is new, it will return
8814     * an empty collection; or if this Customer has previously
8815     * been saved, it will retrieve related ShipmentItemsRelatedByRecipientId from storage.
8816     *
8817     * This method is protected by default in order to keep the public
8818     * api reasonable. You can provide public methods for those you
8819     * actually need in Customer.
8820     */

8821    protected List JavaDoc getShipmentItemsRelatedByRecipientIdJoinProject(Criteria criteria)
8822        throws TorqueException
8823    {
8824                    if (collShipmentItemsRelatedByRecipientId == null)
8825        {
8826            if (isNew())
8827            {
8828               collShipmentItemsRelatedByRecipientId = new ArrayList JavaDoc();
8829            }
8830            else
8831            {
8832                              criteria.add(ShipmentItemPeer.RECIPIENT_ID, getCustomerId());
8833                              collShipmentItemsRelatedByRecipientId = ShipmentItemPeer.doSelectJoinProject(criteria);
8834            }
8835        }
8836        else
8837        {
8838            // the following code is to determine if a new query is
8839
// called for. If the criteria is the same as the last
8840
// one, just return the collection.
8841

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          /**
8858     * Collection to store aggregation of collServiceItemsRelatedByCustomerId
8859     */

8860    protected List JavaDoc collServiceItemsRelatedByCustomerId;
8861
8862    /**
8863     * Temporary storage of collServiceItemsRelatedByCustomerId to save a possible db hit in
8864     * the event objects are add to the collection, but the
8865     * complete collection is never requested.
8866     */

8867    protected void initServiceItemsRelatedByCustomerId()
8868    {
8869        if (collServiceItemsRelatedByCustomerId == null)
8870        {
8871            collServiceItemsRelatedByCustomerId = new ArrayList JavaDoc();
8872        }
8873    }
8874
8875    /**
8876     * Method called to associate a ServiceItem object to this object
8877     * through the ServiceItem foreign key attribute
8878     *
8879     * @param l ServiceItem
8880     * @throws TorqueException
8881     */

8882    public void addServiceItemRelatedByCustomerId(ServiceItem l) throws TorqueException
8883    {
8884        getServiceItemsRelatedByCustomerId().add(l);
8885        l.setCustomerRelatedByCustomerId((Customer) this);
8886    }
8887
8888    /**
8889     * The criteria used to select the current contents of collServiceItemsRelatedByCustomerId
8890     */

8891    private Criteria lastServiceItemsRelatedByCustomerIdCriteria = null;
8892      
8893    /**
8894     * If this collection has already been initialized, returns
8895     * the collection. Otherwise returns the results of
8896     * getServiceItemsRelatedByCustomerId(new Criteria())
8897     *
8898     * @throws TorqueException
8899     */

8900    public List JavaDoc getServiceItemsRelatedByCustomerId() throws TorqueException
8901    {
8902              if (collServiceItemsRelatedByCustomerId == null)
8903        {
8904            collServiceItemsRelatedByCustomerId = getServiceItemsRelatedByCustomerId(new Criteria(10));
8905        }
8906        return collServiceItemsRelatedByCustomerId;
8907          }
8908
8909    /**
8910     * If this collection has already been initialized with
8911     * an identical criteria, it returns the collection.
8912     * Otherwise if this Customer has previously
8913     * been saved, it will retrieve related ServiceItemsRelatedByCustomerId from storage.
8914     * If this Customer is new, it will return
8915     * an empty collection or the current collection, the criteria
8916     * is ignored on a new object.
8917     *
8918     * @throws TorqueException
8919     */

8920    public List JavaDoc getServiceItemsRelatedByCustomerId(Criteria criteria) throws TorqueException
8921    {
8922              if (collServiceItemsRelatedByCustomerId == null)
8923        {
8924            if (isNew())
8925            {
8926               collServiceItemsRelatedByCustomerId = new ArrayList JavaDoc();
8927            }
8928            else
8929            {
8930                        criteria.add(ServiceItemPeer.CUSTOMER_ID, getCustomerId() );
8931                        collServiceItemsRelatedByCustomerId = ServiceItemPeer.doSelect(criteria);
8932            }
8933        }
8934        else
8935        {
8936            // criteria has no effect for a new object
8937
if (!isNew())
8938            {
8939                // the following code is to determine if a new query is
8940
// called for. If the criteria is the same as the last
8941
// one, just return the collection.
8942
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    /**
8955     * If this collection has already been initialized, returns
8956     * the collection. Otherwise returns the results of
8957     * getServiceItemsRelatedByCustomerId(new Criteria(),Connection)
8958     * This method takes in the Connection also as input so that
8959     * referenced objects can also be obtained using a Connection
8960     * that is taken as input
8961     */

8962    public List JavaDoc getServiceItemsRelatedByCustomerId(Connection JavaDoc con) throws TorqueException
8963    {
8964              if (collServiceItemsRelatedByCustomerId == null)
8965        {
8966            collServiceItemsRelatedByCustomerId = getServiceItemsRelatedByCustomerId(new Criteria(10), con);
8967        }
8968        return collServiceItemsRelatedByCustomerId;
8969          }
8970
8971    /**
8972     * If this collection has already been initialized with
8973     * an identical criteria, it returns the collection.
8974     * Otherwise if this Customer has previously
8975     * been saved, it will retrieve related ServiceItemsRelatedByCustomerId from storage.
8976     * If this Customer is new, it will return
8977     * an empty collection or the current collection, the criteria
8978     * is ignored on a new object.
8979     * This method takes in the Connection also as input so that
8980     * referenced objects can also be obtained using a Connection
8981     * that is taken as input
8982     */

8983    public List JavaDoc getServiceItemsRelatedByCustomerId(Criteria criteria, Connection JavaDoc con)
8984            throws TorqueException
8985    {
8986              if (collServiceItemsRelatedByCustomerId == null)
8987        {
8988            if (isNew())
8989            {
8990               collServiceItemsRelatedByCustomerId = new ArrayList JavaDoc();
8991            }
8992            else
8993            {
8994                         criteria.add(ServiceItemPeer.CUSTOMER_ID, getCustomerId());
8995                         collServiceItemsRelatedByCustomerId = ServiceItemPeer.doSelect(criteria, con);
8996             }
8997         }
8998         else
8999         {
9000             // criteria has no effect for a new object
9001
if (!isNew())
9002             {
9003                 // the following code is to determine if a new query is
9004
// called for. If the criteria is the same as the last
9005
// one, just return the collection.
9006
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    /**
9029     * If this collection has already been initialized with
9030     * an identical criteria, it returns the collection.
9031     * Otherwise if this Customer is new, it will return
9032     * an empty collection; or if this Customer has previously
9033     * been saved, it will retrieve related ServiceItemsRelatedByCustomerId from storage.
9034     *
9035     * This method is protected by default in order to keep the public
9036     * api reasonable. You can provide public methods for those you
9037     * actually need in Customer.
9038     */

9039    protected List JavaDoc getServiceItemsRelatedByCustomerIdJoinService(Criteria criteria)
9040        throws TorqueException
9041    {
9042                    if (collServiceItemsRelatedByCustomerId == null)
9043        {
9044            if (isNew())
9045            {
9046               collServiceItemsRelatedByCustomerId = new ArrayList JavaDoc();
9047            }
9048            else
9049            {
9050                              criteria.add(ServiceItemPeer.CUSTOMER_ID, getCustomerId());
9051                              collServiceItemsRelatedByCustomerId = ServiceItemPeer.doSelectJoinService(criteria);
9052            }
9053        }
9054        else
9055        {
9056            // the following code is to determine if a new query is
9057
// called for. If the criteria is the same as the last
9058
// one, just return the collection.
9059

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    /**
9080     * If this collection has already been initialized with
9081     * an identical criteria, it returns the collection.
9082     * Otherwise if this Customer is new, it will return
9083     * an empty collection; or if this Customer has previously
9084     * been saved, it will retrieve related ServiceItemsRelatedByCustomerId from storage.
9085     *
9086     * This method is protected by default in order to keep the public
9087     * api reasonable. You can provide public methods for those you
9088     * actually need in Customer.
9089     */

9090    protected List JavaDoc getServiceItemsRelatedByCustomerIdJoinSorder(Criteria criteria)
9091        throws TorqueException
9092    {
9093                    if (collServiceItemsRelatedByCustomerId == null)
9094        {
9095            if (isNew())
9096            {
9097               collServiceItemsRelatedByCustomerId = new ArrayList JavaDoc();
9098            }
9099            else
9100            {
9101                              criteria.add(ServiceItemPeer.CUSTOMER_ID, getCustomerId());
9102                              collServiceItemsRelatedByCustomerId = ServiceItemPeer.doSelectJoinSorder(criteria);
9103            }
9104        }
9105        else
9106        {
9107            // the following code is to determine if a new query is
9108
// called for. If the criteria is the same as the last
9109
// one, just return the collection.
9110

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    /**
9131     * If this collection has already been initialized with
9132     * an identical criteria, it returns the collection.
9133     * Otherwise if this Customer is new, it will return
9134     * an empty collection; or if this Customer has previously
9135     * been saved, it will retrieve related ServiceItemsRelatedByCustomerId from storage.
9136     *
9137     * This method is protected by default in order to keep the public
9138     * api reasonable. You can provide public methods for those you
9139     * actually need in Customer.
9140     */

9141    protected List JavaDoc getServiceItemsRelatedByCustomerIdJoinProduct(Criteria criteria)
9142        throws TorqueException
9143    {
9144                    if (collServiceItemsRelatedByCustomerId == null)
9145        {
9146            if (isNew())
9147            {
9148               collServiceItemsRelatedByCustomerId = new ArrayList JavaDoc();
9149            }
9150            else
9151            {
9152                              criteria.add(ServiceItemPeer.CUSTOMER_ID, getCustomerId());
9153                              collServiceItemsRelatedByCustomerId = ServiceItemPeer.doSelectJoinProduct(criteria);
9154            }
9155        }
9156        else
9157        {
9158            // the following code is to determine if a new query is
9159
// called for. If the criteria is the same as the last
9160
// one, just return the collection.
9161

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    /**
9190     * If this collection has already been initialized with
9191     * an identical criteria, it returns the collection.
9192     * Otherwise if this Customer is new, it will return
9193     * an empty collection; or if this Customer has previously
9194     * been saved, it will retrieve related ServiceItemsRelatedByCustomerId from storage.
9195     *
9196     * This method is protected by default in order to keep the public
9197     * api reasonable. You can provide public methods for those you
9198     * actually need in Customer.
9199     */

9200    protected List JavaDoc getServiceItemsRelatedByCustomerIdJoinCustomerRelatedByRecipientId(Criteria criteria)
9201        throws TorqueException
9202    {
9203                    if (collServiceItemsRelatedByCustomerId == null)
9204        {
9205            if (isNew())
9206            {
9207               collServiceItemsRelatedByCustomerId = new ArrayList JavaDoc();
9208            }
9209            else
9210            {
9211                              criteria.add(ServiceItemPeer.CUSTOMER_ID, getCustomerId());
9212                              collServiceItemsRelatedByCustomerId = ServiceItemPeer.doSelectJoinCustomerRelatedByRecipientId(criteria);
9213            }
9214        }
9215        else
9216        {
9217            // the following code is to determine if a new query is
9218
// called for. If the criteria is the same as the last
9219
// one, just return the collection.
9220

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    /**
9241     * If this collection has already been initialized with
9242     * an identical criteria, it returns the collection.
9243     * Otherwise if this Customer is new, it will return
9244     * an empty collection; or if this Customer has previously
9245     * been saved, it will retrieve related ServiceItemsRelatedByCustomerId from storage.
9246     *
9247     * This method is protected by default in order to keep the public
9248     * api reasonable. You can provide public methods for those you
9249     * actually need in Customer.
9250     */

9251    protected List JavaDoc getServiceItemsRelatedByCustomerIdJoinProject(Criteria criteria)
9252        throws TorqueException
9253    {
9254                    if (collServiceItemsRelatedByCustomerId == null)
9255        {
9256            if (isNew())
9257            {
9258               collServiceItemsRelatedByCustomerId = new ArrayList JavaDoc();
9259            }
9260            else
9261            {
9262                              criteria.add(ServiceItemPeer.CUSTOMER_ID, getCustomerId());
9263                              collServiceItemsRelatedByCustomerId = ServiceItemPeer.doSelectJoinProject(criteria);
9264            }
9265        }
9266        else
9267        {
9268            // the following code is to determine if a new query is
9269
// called for. If the criteria is the same as the last
9270
// one, just return the collection.
9271

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          /**
9288     * Collection to store aggregation of collServiceItemsRelatedByRecipientId
9289     */

9290    protected List JavaDoc collServiceItemsRelatedByRecipientId;
9291
9292    /**
9293     * Temporary storage of collServiceItemsRelatedByRecipientId to save a possible db hit in
9294     * the event objects are add to the collection, but the
9295     * complete collection is never requested.
9296     */

9297    protected void initServiceItemsRelatedByRecipientId()
9298    {
9299        if (collServiceItemsRelatedByRecipientId == null)
9300        {
9301            collServiceItemsRelatedByRecipientId = new ArrayList JavaDoc();
9302        }
9303    }
9304
9305    /**
9306     * Method called to associate a ServiceItem object to this object
9307     * through the ServiceItem foreign key attribute
9308     *
9309     * @param l ServiceItem
9310     * @throws TorqueException
9311     */

9312    public void addServiceItemRelatedByRecipientId(ServiceItem l) throws TorqueException
9313    {
9314        getServiceItemsRelatedByRecipientId().add(l);
9315        l.setCustomerRelatedByRecipientId((Customer) this);
9316    }
9317
9318    /**
9319     * The criteria used to select the current contents of collServiceItemsRelatedByRecipientId
9320     */

9321    private Criteria lastServiceItemsRelatedByRecipientIdCriteria = null;
9322      
9323    /**
9324     * If this collection has already been initialized, returns
9325     * the collection. Otherwise returns the results of
9326     * getServiceItemsRelatedByRecipientId(new Criteria())
9327     *
9328     * @throws TorqueException
9329     */

9330    public List JavaDoc getServiceItemsRelatedByRecipientId() throws TorqueException
9331    {
9332              if (collServiceItemsRelatedByRecipientId == null)
9333        {
9334            collServiceItemsRelatedByRecipientId = getServiceItemsRelatedByRecipientId(new Criteria(10));
9335        }
9336        return collServiceItemsRelatedByRecipientId;
9337          }
9338
9339    /**
9340     * If this collection has already been initialized with
9341     * an identical criteria, it returns the collection.
9342     * Otherwise if this Customer has previously
9343     * been saved, it will retrieve related ServiceItemsRelatedByRecipientId from storage.
9344     * If this Customer is new, it will return
9345     * an empty collection or the current collection, the criteria
9346     * is ignored on a new object.
9347     *
9348     * @throws TorqueException
9349     */

9350    public List JavaDoc getServiceItemsRelatedByRecipientId(Criteria criteria) throws TorqueException
9351    {
9352              if (collServiceItemsRelatedByRecipientId == null)
9353        {
9354            if (isNew())
9355            {
9356               collServiceItemsRelatedByRecipientId = new ArrayList JavaDoc();
9357            }
9358            else
9359            {
9360                        criteria.add(ServiceItemPeer.RECIPIENT_ID, getCustomerId() );
9361                        collServiceItemsRelatedByRecipientId = ServiceItemPeer.doSelect(criteria);
9362            }
9363        }
9364        else
9365        {
9366            // criteria has no effect for a new object
9367
if (!isNew())
9368            {
9369                // the following code is to determine if a new query is
9370
// called for. If the criteria is the same as the last
9371
// one, just return the collection.
9372
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    /**
9385     * If this collection has already been initialized, returns
9386     * the collection. Otherwise returns the results of
9387     * getServiceItemsRelatedByRecipientId(new Criteria(),Connection)
9388     * This method takes in the Connection also as input so that
9389     * referenced objects can also be obtained using a Connection
9390     * that is taken as input
9391     */

9392    public List JavaDoc getServiceItemsRelatedByRecipientId(Connection JavaDoc con) throws TorqueException
9393    {
9394              if (collServiceItemsRelatedByRecipientId == null)
9395        {
9396            collServiceItemsRelatedByRecipientId = getServiceItemsRelatedByRecipientId(new Criteria(10), con);
9397        }
9398        return collServiceItemsRelatedByRecipientId;
9399          }
9400
9401    /**
9402     * If this collection has already been initialized with
9403     * an identical criteria, it returns the collection.
9404     * Otherwise if this Customer has previously
9405     * been saved, it will retrieve related ServiceItemsRelatedByRecipientId from storage.
9406     * If this Customer is new, it will return
9407     * an empty collection or the current collection, the criteria
9408     * is ignored on a new object.
9409     * This method takes in the Connection also as input so that
9410     * referenced objects can also be obtained using a Connection
9411     * that is taken as input
9412     */

9413    public List JavaDoc getServiceItemsRelatedByRecipientId(Criteria criteria, Connection JavaDoc con)
9414            throws TorqueException
9415    {
9416              if (collServiceItemsRelatedByRecipientId == null)
9417        {
9418            if (isNew())
9419            {
9420               collServiceItemsRelatedByRecipientId = new ArrayList JavaDoc();
9421            }
9422            else
9423            {
9424                         criteria.add(ServiceItemPeer.RECIPIENT_ID, getCustomerId());
9425                         collServiceItemsRelatedByRecipientId = ServiceItemPeer.doSelect(criteria, con);
9426             }
9427         }
9428         else
9429         {
9430             // criteria has no effect for a new object
9431
if (!isNew())
9432             {
9433                 // the following code is to determine if a new query is
9434
// called for. If the criteria is the same as the last
9435
// one, just return the collection.
9436
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    /**
9459     * If this collection has already been initialized with
9460     * an identical criteria, it returns the collection.
9461     * Otherwise if this Customer is new, it will return
9462     * an empty collection; or if this Customer has previously
9463     * been saved, it will retrieve related ServiceItemsRelatedByRecipientId from storage.
9464     *
9465     * This method is protected by default in order to keep the public
9466     * api reasonable. You can provide public methods for those you
9467     * actually need in Customer.
9468     */

9469    protected List JavaDoc getServiceItemsRelatedByRecipientIdJoinService(Criteria criteria)
9470        throws TorqueException
9471    {
9472                    if (collServiceItemsRelatedByRecipientId == null)
9473        {
9474            if (isNew())
9475            {
9476               collServiceItemsRelatedByRecipientId = new ArrayList JavaDoc();
9477            }
9478            else
9479            {
9480                              criteria.add(ServiceItemPeer.RECIPIENT_ID, getCustomerId());
9481                              collServiceItemsRelatedByRecipientId = ServiceItemPeer.doSelectJoinService(criteria);
9482            }
9483        }
9484        else
9485        {
9486            // the following code is to determine if a new query is
9487
// called for. If the criteria is the same as the last
9488
// one, just return the collection.
9489

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    /**
9510     * If this collection has already been initialized with
9511     * an identical criteria, it returns the collection.
9512     * Otherwise if this Customer is new, it will return
9513     * an empty collection; or if this Customer has previously
9514     * been saved, it will retrieve related ServiceItemsRelatedByRecipientId from storage.
9515     *
9516     * This method is protected by default in order to keep the public
9517     * api reasonable. You can provide public methods for those you
9518     * actually need in Customer.
9519     */

9520    protected List JavaDoc getServiceItemsRelatedByRecipientIdJoinSorder(Criteria criteria)
9521        throws TorqueException
9522    {
9523                    if (collServiceItemsRelatedByRecipientId == null)
9524        {
9525            if (isNew())
9526            {
9527               collServiceItemsRelatedByRecipientId = new ArrayList JavaDoc();
9528            }
9529            else
9530            {
9531                              criteria.add(ServiceItemPeer.RECIPIENT_ID, getCustomerId());
9532                              collServiceItemsRelatedByRecipientId = ServiceItemPeer.doSelectJoinSorder(criteria);
9533            }
9534        }
9535        else
9536        {
9537            // the following code is to determine if a new query is
9538
// called for. If the criteria is the same as the last
9539
// one, just return the collection.
9540

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    /**
9561     * If this collection has already been initialized with
9562     * an identical criteria, it returns the collection.
9563     * Otherwise if this Customer is new, it will return
9564     * an empty collection; or if this Customer has previously
9565     * been saved, it will retrieve related ServiceItemsRelatedByRecipientId from storage.
9566     *
9567     * This method is protected by default in order to keep the public
9568     * api reasonable. You can provide public methods for those you
9569     * actually need in Customer.
9570     */

9571    protected List JavaDoc getServiceItemsRelatedByRecipientIdJoinProduct(Criteria criteria)
9572        throws TorqueException
9573    {
9574                    if (collServiceItemsRelatedByRecipientId == null)
9575        {
9576            if (isNew())
9577            {
9578               collServiceItemsRelatedByRecipientId = new ArrayList JavaDoc();
9579            }
9580            else
9581            {
9582                              criteria.add(ServiceItemPeer.RECIPIENT_ID, getCustomerId());
9583                              collServiceItemsRelatedByRecipientId = ServiceItemPeer.doSelectJoinProduct(criteria);
9584            }
9585        }
9586        else
9587        {
9588            // the following code is to determine if a new query is
9589
// called for. If the criteria is the same as the last
9590
// one, just return the collection.
9591

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    /**
9612     * If this collection has already been initialized with
9613     * an identical criteria, it returns the collection.
9614     * Otherwise if this Customer is new, it will return
9615     * an empty collection; or if this Customer has previously
9616     * been saved, it will retrieve related ServiceItemsRelatedByRecipientId from storage.
9617     *
9618     * This method is protected by default in order to keep the public
9619     * api reasonable. You can provide public methods for those you
9620     * actually need in Customer.
9621     */

9622    protected List JavaDoc getServiceItemsRelatedByRecipientIdJoinCustomerRelatedByCustomerId(Criteria criteria)
9623        throws TorqueException
9624    {
9625                    if (collServiceItemsRelatedByRecipientId == null)
9626        {
9627            if (isNew())
9628            {
9629               collServiceItemsRelatedByRecipientId = new ArrayList JavaDoc();
9630            }
9631            else
9632            {
9633                              criteria.add(ServiceItemPeer.RECIPIENT_ID, getCustomerId());
9634                              collServiceItemsRelatedByRecipientId = ServiceItemPeer.doSelectJoinCustomerRelatedByCustomerId(criteria);
9635            }
9636        }
9637        else
9638        {
9639            // the following code is to determine if a new query is
9640
// called for. If the criteria is the same as the last
9641
// one, just return the collection.
9642

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    /**
9671     * If this collection has already been initialized with
9672     * an identical criteria, it returns the collection.
9673     * Otherwise if this Customer is new, it will return
9674     * an empty collection; or if this Customer has previously
9675     * been saved, it will retrieve related ServiceItemsRelatedByRecipientId from storage.
9676     *
9677     * This method is protected by default in order to keep the public
9678     * api reasonable. You can provide public methods for those you
9679     * actually need in Customer.
9680     */

9681    protected List JavaDoc getServiceItemsRelatedByRecipientIdJoinProject(Criteria criteria)
9682        throws TorqueException
9683    {
9684                    if (collServiceItemsRelatedByRecipientId == null)
9685        {
9686            if (isNew())
9687            {
9688               collServiceItemsRelatedByRecipientId = new ArrayList JavaDoc();
9689            }
9690            else
9691            {
9692                              criteria.add(ServiceItemPeer.RECIPIENT_ID, getCustomerId());
9693                              collServiceItemsRelatedByRecipientId = ServiceItemPeer.doSelectJoinProject(criteria);
9694            }
9695        }
9696        else
9697        {
9698            // the following code is to determine if a new query is
9699
// called for. If the criteria is the same as the last
9700
// one, just return the collection.
9701

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 JavaDoc fieldNames = null;
9717
9718    /**
9719     * Generate a list of field names.
9720     *
9721     * @return a list of field names
9722     */

9723    public static synchronized List JavaDoc getFieldNames()
9724    {
9725        if (fieldNames == null)
9726        {
9727            fieldNames = new ArrayList JavaDoc();
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    /**
9773     * Retrieves a field from the object by name passed in as a String.
9774     *
9775     * @param name field name
9776     * @return value
9777     */

9778    public Object JavaDoc getByName(String JavaDoc name)
9779    {
9780          if (name.equals("CustomerId"))
9781        {
9782                return new Integer JavaDoc(getCustomerId());
9783            }
9784          if (name.equals("CustomerCode"))
9785        {
9786                return getCustomerCode();
9787            }
9788          if (name.equals("Status"))
9789        {
9790                return new Integer JavaDoc(getStatus());
9791            }
9792          if (name.equals("Priority"))
9793        {
9794                return new Integer JavaDoc(getPriority());
9795            }
9796          if (name.equals("CustomerType"))
9797        {
9798                return new Integer JavaDoc(getCustomerType());
9799            }
9800          if (name.equals("CustomerCatId"))
9801        {
9802                return new Integer JavaDoc(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 JavaDoc(getCountryId());
9843            }
9844          if (name.equals("RegionId"))
9845        {
9846                return new Integer JavaDoc(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 JavaDoc(getEmailFormat());
9867            }
9868          if (name.equals("SendNews"))
9869        {
9870                return new Integer JavaDoc(getSendNews());
9871            }
9872          if (name.equals("WebUrl"))
9873        {
9874                return getWebUrl();
9875            }
9876          if (name.equals("LanguageId"))
9877        {
9878                return new Integer JavaDoc(getLanguageId());
9879            }
9880          if (name.equals("Gender"))
9881        {
9882                return new Integer JavaDoc(getGender());
9883            }
9884          if (name.equals("EducationCatId"))
9885        {
9886                return new Integer JavaDoc(getEducationCatId());
9887            }
9888          if (name.equals("HouseholdCatId"))
9889        {
9890                return new Integer JavaDoc(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    /**
9940     * Retrieves a field from the object by name passed in
9941     * as a String. The String must be one of the static
9942     * Strings defined in this Class' Peer.
9943     *
9944     * @param name peer name
9945     * @return value
9946     */

9947    public Object JavaDoc getByPeerName(String JavaDoc name)
9948    {
9949          if (name.equals(CustomerPeer.CUSTOMER_ID))
9950        {
9951                return new Integer JavaDoc(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 JavaDoc(getStatus());
9960            }
9961          if (name.equals(CustomerPeer.PRIORITY))
9962        {
9963                return new Integer JavaDoc(getPriority());
9964            }
9965          if (name.equals(CustomerPeer.CUSTOMER_TYPE))
9966        {
9967                return new Integer JavaDoc(getCustomerType());
9968            }
9969          if (name.equals(CustomerPeer.CUSTOMER_CAT_ID))
9970        {
9971                return new Integer JavaDoc(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 JavaDoc(getCountryId());
0012            }
0013          if (name.equals(CustomerPeer.REGION_ID))
0014        {
0015                return new Integer JavaDoc(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 JavaDoc(getEmailFormat());
0036            }
0037          if (name.equals(CustomerPeer.SEND_NEWS))
0038        {
0039                return new Integer JavaDoc(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 JavaDoc(getLanguageId());
0048            }
0049          if (name.equals(CustomerPeer.GENDER))
0050        {
0051                return new Integer JavaDoc(getGender());
0052            }
0053          if (name.equals(CustomerPeer.EDUCATION_CAT_ID))
0054        {
0055                return new Integer JavaDoc(getEducationCatId());
0056            }
0057          if (name.equals(CustomerPeer.HOUSEHOLD_CAT_ID))
0058        {
0059                return new Integer JavaDoc(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    /**
0109     * Retrieves a field from the object by Position as specified
0110     * in the xml schema. Zero-based.
0111     *
0112     * @param pos position in xml schema
0113     * @return value
0114     */

0115    public Object JavaDoc getByPosition(int pos)
0116    {
0117            if (pos == 0)
0118        {
0119                return new Integer JavaDoc(getCustomerId());
0120            }
0121              if (pos == 1)
0122        {
0123                return getCustomerCode();
0124            }
0125              if (pos == 2)
0126        {
0127                return new Integer JavaDoc(getStatus());
0128            }
0129              if (pos == 3)
0130        {
0131                return new Integer JavaDoc(getPriority());
0132            }
0133              if (pos == 4)
0134        {
0135                return new Integer JavaDoc(getCustomerType());
0136            }
0137              if (pos == 5)
0138        {
0139                return new Integer JavaDoc(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 JavaDoc(getCountryId());
0180            }
0181              if (pos == 16)
0182        {
0183                return new Integer JavaDoc(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 JavaDoc(getEmailFormat());
0204            }
0205              if (pos == 22)
0206        {
0207                return new Integer JavaDoc(getSendNews());
0208            }
0209              if (pos == 23)
0210        {
0211                return getWebUrl();
0212            }
0213              if (pos == 24)
0214        {
0215                return new Integer JavaDoc(getLanguageId());
0216            }
0217              if (pos == 25)
0218        {
0219                return new Integer JavaDoc(getGender());
0220            }
0221              if (pos == 26)
0222        {
0223                return new Integer JavaDoc(getEducationCatId());
0224            }
0225              if (pos == 27)
0226        {
0227                return new Integer JavaDoc(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    /**
0277     * Stores the object in the database. If the object is new,
0278     * it inserts it; otherwise an update is performed.
0279     *
0280     * @throws Exception
0281     */

0282    public void save() throws Exception JavaDoc
0283    {
0284          save(CustomerPeer.getMapBuilder()
0285                .getDatabaseMap().getName());
0286      }
0287
0288    /**
0289     * Stores the object in the database. If the object is new,
0290     * it inserts it; otherwise an update is performed.
0291       * Note: this code is here because the method body is
0292     * auto-generated conditionally and therefore needs to be
0293     * in this file instead of in the super class, BaseObject.
0294       *
0295     * @param dbName
0296     * @throws TorqueException
0297     */

0298    public void save(String JavaDoc dbName) throws TorqueException
0299    {
0300        Connection JavaDoc 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      /** flag to prevent endless save loop, if this object is referenced
0315        by another object which falls in this transaction. */

0316    private boolean alreadyInSave = false;
0317      /**
0318     * Stores the object in the database. If the object is new,
0319     * it inserts it; otherwise an update is performed. This method
0320     * is meant to be used as part of a transaction, otherwise use
0321     * the save() method and the connection details will be handled
0322     * internally
0323     *
0324     * @param con
0325     * @throws TorqueException
0326     */

0327    public void save(Connection JavaDoc con) throws TorqueException
0328    {
0329          if (!alreadyInSave)
0330        {
0331            alreadyInSave = true;
0332
0333
0334  
0335            // If this object has been modified, then save it to the database.
0336
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      /**
0535     * Set the PrimaryKey using ObjectKey.
0536     *
0537     * @param key customerId ObjectKey
0538     */

0539    public void setPrimaryKey(ObjectKey key)
0540        throws TorqueException
0541    {
0542            setCustomerId(((NumberKey) key).intValue());
0543        }
0544
0545    /**
0546     * Set the PrimaryKey using a String.
0547     *
0548     * @param key
0549     */

0550    public void setPrimaryKey(String JavaDoc key) throws TorqueException
0551    {
0552            setCustomerId(Integer.parseInt(key));
0553        }
0554
0555  
0556    /**
0557     * returns an id that differentiates this object from others
0558     * of its class.
0559     */

0560    public ObjectKey getPrimaryKey()
0561    {
0562          return SimpleKey.keyFor(getCustomerId());
0563      }
0564 
0565    /**
0566     * get an id that differentiates this object from others
0567     * of its class.
0568     */

0569    public String JavaDoc getQueryKey()
0570    {
0571        if (getPrimaryKey() == null)
0572        {
0573            return "";
0574        }
0575        else
0576        {
0577            return getPrimaryKey().toString();
0578        }
0579    }
0580
0581    /**
0582     * set an id that differentiates this object from others
0583     * of its class.
0584     */

0585    public void setQueryKey(String JavaDoc key)
0586        throws TorqueException
0587    {
0588        setPrimaryKey(key);
0589    }
0590
0591    /**
0592     * Makes a copy of this object.
0593     * It creates a new object filling in the simple attributes.
0594       * It then fills all the association collections and sets the
0595     * related objects to isNew=true.
0596       */

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 JavaDoc 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    /**
0810     * returns a peer instance associated with this om. Since Peer classes
0811     * are not to have any instance attributes, this method returns the
0812     * same instance for all member of this class. The method could therefore
0813     * be static, but this would prevent one from overriding the behavior.
0814     */

0815    public CustomerPeer getPeer()
0816    {
0817        return peer;
0818    }
0819
0820    public String JavaDoc toString()
0821    {
0822        StringBuffer JavaDoc str = new StringBuffer JavaDoc();
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