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(<