KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > tigris > scarab > om > BaseScarabModule


1 package org.tigris.scarab.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.fulcrum.intake.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  * You should not use this class directly. It should not even be
31  * extended all references should be to ScarabModule
32  */

33 public abstract class BaseScarabModule extends org.tigris.scarab.om.AbstractScarabModule
34     implements org.apache.fulcrum.intake.Retrievable
35 {
36     /** The Peer class */
37     private static final ScarabModulePeer peer =
38         new ScarabModulePeer();
39
40         
41     /** The value for the moduleId field */
42     private Integer JavaDoc moduleId;
43       
44     /** The value for the realName field */
45     private String JavaDoc realName;
46       
47     /** The value for the domain field */
48     private String JavaDoc domain;
49       
50     /** The value for the code field */
51     private String JavaDoc code;
52       
53     /** The value for the description field */
54     private String JavaDoc description;
55       
56     /** The value for the url field */
57     private String JavaDoc url;
58       
59     /** The value for the archiveEmail field */
60     private String JavaDoc archiveEmail;
61       
62     /** The value for the parentId field */
63     private Integer JavaDoc parentId;
64       
65     /** The value for the ownerId field */
66     private Integer JavaDoc ownerId;
67       
68     /** The value for the qaContactId field */
69     private Integer JavaDoc qaContactId;
70                                                                 
71     /** The value for the deleted field */
72     private boolean deleted = false;
73                                                                 
74     /** The value for the locked field */
75     private boolean locked = false;
76       
77     /** The value for the classKey field */
78     private int classKey;
79   
80     
81     /**
82      * Get the ModuleId
83      *
84      * @return Integer
85      */

86     public Integer JavaDoc getModuleId()
87     {
88         return moduleId;
89     }
90
91                                               
92     /**
93      * Set the value of ModuleId
94      *
95      * @param v new value
96      */

97     public void setModuleId(Integer JavaDoc v) throws TorqueException
98     {
99     
100                   if (!ObjectUtils.equals(this.moduleId, v))
101               {
102             this.moduleId = v;
103             setModified(true);
104         }
105     
106           
107                                   
108         // update associated AttributeGroup
109
if (collAttributeGroups != null)
110         {
111             for (int i = 0; i < collAttributeGroups.size(); i++)
112             {
113                 ((AttributeGroup) collAttributeGroups.get(i))
114                         .setModuleId(v);
115             }
116         }
117                                           
118         // update associated Issue
119
if (collIssues != null)
120         {
121             for (int i = 0; i < collIssues.size(); i++)
122             {
123                 ((Issue) collIssues.get(i))
124                         .setModuleId(v);
125             }
126         }
127                                           
128         // update associated RModuleIssueType
129
if (collRModuleIssueTypes != null)
130         {
131             for (int i = 0; i < collRModuleIssueTypes.size(); i++)
132             {
133                 ((RModuleIssueType) collRModuleIssueTypes.get(i))
134                         .setModuleId(v);
135             }
136         }
137                                           
138         // update associated MITListItem
139
if (collMITListItems != null)
140         {
141             for (int i = 0; i < collMITListItems.size(); i++)
142             {
143                 ((MITListItem) collMITListItems.get(i))
144                         .setModuleId(v);
145             }
146         }
147                                                         
148         // update associated RModuleAttribute
149
if (collRModuleAttributes != null)
150         {
151             for (int i = 0; i < collRModuleAttributes.size(); i++)
152             {
153                 ((RModuleAttribute) collRModuleAttributes.get(i))
154                         .setModuleId(v);
155             }
156         }
157                                           
158         // update associated RModuleOption
159
if (collRModuleOptions != null)
160         {
161             for (int i = 0; i < collRModuleOptions.size(); i++)
162             {
163                 ((RModuleOption) collRModuleOptions.get(i))
164                         .setModuleId(v);
165             }
166         }
167                                           
168         // update associated RModuleUserAttribute
169
if (collRModuleUserAttributes != null)
170         {
171             for (int i = 0; i < collRModuleUserAttributes.size(); i++)
172             {
173                 ((RModuleUserAttribute) collRModuleUserAttributes.get(i))
174                         .setModuleId(v);
175             }
176         }
177                                           
178         // update associated UserVote
179
if (collUserVotes != null)
180         {
181             for (int i = 0; i < collUserVotes.size(); i++)
182             {
183                 ((UserVote) collUserVotes.get(i))
184                         .setModuleId(v);
185             }
186         }
187                                           
188         // update associated Query
189
if (collQuerys != null)
190         {
191             for (int i = 0; i < collQuerys.size(); i++)
192             {
193                 ((Query) collQuerys.get(i))
194                         .setModuleId(v);
195             }
196         }
197                                           
198         // update associated Report
199
if (collReports != null)
200         {
201             for (int i = 0; i < collReports.size(); i++)
202             {
203                 ((Report) collReports.get(i))
204                         .setModuleId(v);
205             }
206         }
207                                           
208         // update associated PendingGroupUserRole
209
if (collPendingGroupUserRoles != null)
210         {
211             for (int i = 0; i < collPendingGroupUserRoles.size(); i++)
212             {
213                 ((PendingGroupUserRole) collPendingGroupUserRoles.get(i))
214                         .setGroupId(v);
215             }
216         }
217                                           
218         // update associated GlobalParameter
219
if (collGlobalParameters != null)
220         {
221             for (int i = 0; i < collGlobalParameters.size(); i++)
222             {
223                 ((GlobalParameter) collGlobalParameters.get(i))
224                         .setModuleId(v);
225             }
226         }
227                       }
228   
229     /**
230      * Get the RealName
231      *
232      * @return String
233      */

234     public String JavaDoc getRealName()
235     {
236         return realName;
237     }
238
239                         
240     /**
241      * Set the value of RealName
242      *
243      * @param v new value
244      */

245     public void setRealName(String JavaDoc v)
246     {
247     
248                   if (!ObjectUtils.equals(this.realName, v))
249               {
250             this.realName = v;
251             setModified(true);
252         }
253     
254           
255               }
256   
257     /**
258      * Get the Domain
259      *
260      * @return String
261      */

262     public String JavaDoc getDomain()
263     {
264         return domain;
265     }
266
267                         
268     /**
269      * Set the value of Domain
270      *
271      * @param v new value
272      */

273     public void setDomain(String JavaDoc v)
274     {
275     
276                   if (!ObjectUtils.equals(this.domain, v))
277               {
278             this.domain = v;
279             setModified(true);
280         }
281     
282           
283               }
284   
285     /**
286      * Get the Code
287      *
288      * @return String
289      */

290     public String JavaDoc getCode()
291     {
292         return code;
293     }
294
295                         
296     /**
297      * Set the value of Code
298      *
299      * @param v new value
300      */

301     public void setCode(String JavaDoc v)
302     {
303     
304                   if (!ObjectUtils.equals(this.code, v))
305               {
306             this.code = v;
307             setModified(true);
308         }
309     
310           
311               }
312   
313     /**
314      * Get the Description
315      *
316      * @return String
317      */

318     public String JavaDoc getDescription()
319     {
320         return description;
321     }
322
323                         
324     /**
325      * Set the value of Description
326      *
327      * @param v new value
328      */

329     public void setDescription(String JavaDoc v)
330     {
331     
332                   if (!ObjectUtils.equals(this.description, v))
333               {
334             this.description = v;
335             setModified(true);
336         }
337     
338           
339               }
340   
341     /**
342      * Get the Url
343      *
344      * @return String
345      */

346     public String JavaDoc getUrl()
347     {
348         return url;
349     }
350
351                         
352     /**
353      * Set the value of Url
354      *
355      * @param v new value
356      */

357     public void setUrl(String JavaDoc v)
358     {
359     
360                   if (!ObjectUtils.equals(this.url, v))
361               {
362             this.url = v;
363             setModified(true);
364         }
365     
366           
367               }
368   
369     /**
370      * Get the ArchiveEmail
371      *
372      * @return String
373      */

374     public String JavaDoc getArchiveEmail()
375     {
376         return archiveEmail;
377     }
378
379                         
380     /**
381      * Set the value of ArchiveEmail
382      *
383      * @param v new value
384      */

385     public void setArchiveEmail(String JavaDoc v)
386     {
387     
388                   if (!ObjectUtils.equals(this.archiveEmail, v))
389               {
390             this.archiveEmail = v;
391             setModified(true);
392         }
393     
394           
395               }
396   
397     /**
398      * Get the ParentId
399      *
400      * @return Integer
401      */

402     public Integer JavaDoc getParentId()
403     {
404         return parentId;
405     }
406
407                               
408     /**
409      * Set the value of ParentId
410      *
411      * @param v new value
412      */

413     public void setParentId(Integer JavaDoc v) throws TorqueException
414     {
415     
416                   if (!ObjectUtils.equals(this.parentId, v))
417               {
418             this.parentId = v;
419             setModified(true);
420         }
421     
422                                                                                   
423                 if (aModuleRelatedByParentId != null && !ObjectUtils.equals(aModuleRelatedByParentId.getModuleId(), v))
424                 {
425             aModuleRelatedByParentId = null;
426         }
427       
428               }
429   
430     /**
431      * Get the OwnerId
432      *
433      * @return Integer
434      */

435     public Integer JavaDoc getOwnerId()
436     {
437         return ownerId;
438     }
439
440                               
441     /**
442      * Set the value of OwnerId
443      *
444      * @param v new value
445      */

446     public void setOwnerId(Integer JavaDoc v) throws TorqueException
447     {
448     
449                   if (!ObjectUtils.equals(this.ownerId, v))
450               {
451             this.ownerId = v;
452             setModified(true);
453         }
454     
455                                                                                   
456                 if (aScarabUserRelatedByOwnerId != null && !ObjectUtils.equals(aScarabUserRelatedByOwnerId.getUserId(), v))
457                 {
458             aScarabUserRelatedByOwnerId = null;
459         }
460       
461               }
462   
463     /**
464      * Get the QaContactId
465      *
466      * @return Integer
467      */

468     public Integer JavaDoc getQaContactId()
469     {
470         return qaContactId;
471     }
472
473                               
474     /**
475      * Set the value of QaContactId
476      *
477      * @param v new value
478      */

479     public void setQaContactId(Integer JavaDoc v) throws TorqueException
480     {
481     
482                   if (!ObjectUtils.equals(this.qaContactId, v))
483               {
484             this.qaContactId = v;
485             setModified(true);
486         }
487     
488                                                                                   
489                 if (aScarabUserRelatedByQaContactId != null && !ObjectUtils.equals(aScarabUserRelatedByQaContactId.getUserId(), v))
490                 {
491             aScarabUserRelatedByQaContactId = null;
492         }
493       
494               }
495   
496     /**
497      * Get the Deleted
498      *
499      * @return boolean
500      */

501     public boolean getDeleted()
502     {
503         return deleted;
504     }
505
506                         
507     /**
508      * Set the value of Deleted
509      *
510      * @param v new value
511      */

512     public void setDeleted(boolean v)
513     {
514     
515                   if (this.deleted != v)
516               {
517             this.deleted = v;
518             setModified(true);
519         }
520     
521           
522               }
523   
524     /**
525      * Get the Locked
526      *
527      * @return boolean
528      */

529     public boolean getLocked()
530     {
531         return locked;
532     }
533
534                         
535     /**
536      * Set the value of Locked
537      *
538      * @param v new value
539      */

540     public void setLocked(boolean v)
541     {
542     
543                   if (this.locked != v)
544               {
545             this.locked = v;
546             setModified(true);
547         }
548     
549           
550               }
551   
552     /**
553      * Get the ClassKey
554      *
555      * @return int
556      */

557     public int getClassKey()
558     {
559         return classKey;
560     }
561
562                         
563     /**
564      * Set the value of ClassKey
565      *
566      * @param v new value
567      */

568     public void setClassKey(int v)
569     {
570     
571                   if (this.classKey != v)
572               {
573             this.classKey = v;
574             setModified(true);
575         }
576     
577           
578               }
579   
580       
581             
582                         
583             private Module aModuleRelatedByParentId;
584
585     /**
586      * Declares an association between this object and a Module object
587      *
588      * @param v Module
589      * @throws TorqueException
590      */

591     public void setModuleRelatedByParentId(Module v) throws TorqueException
592     {
593             if (v == null)
594         {
595                   setParentId((Integer JavaDoc) null);
596               }
597         else
598         {
599             setParentId(v.getModuleId());
600         }
601             aModuleRelatedByParentId = v;
602     }
603
604                         
605     /**
606      * Get the associated Module object
607      *
608      * @return the associated Module object
609      * @throws TorqueException
610      */

611     public Module getModuleRelatedByParentId() throws TorqueException
612     {
613         if ( !ObjectUtils.equals(getParentId(), null) )
614         {
615                 return ModuleManager.getInstance(SimpleKey.keyFor(getParentId()));
616             }
617         return aModuleRelatedByParentId;
618     }
619
620     /**
621      * Provides convenient way to set a relationship based on a
622      * ObjectKey, for example
623      * <code>bar.setFooKey(foo.getPrimaryKey())</code>
624      *
625          */

626     public void setModuleRelatedByParentIdKey(ObjectKey key) throws TorqueException
627     {
628     
629                     setParentId(new Integer JavaDoc(((NumberKey) key).intValue()));
630               }
631   
632             
633                         
634             private ScarabUser aScarabUserRelatedByOwnerId;
635
636     /**
637      * Declares an association between this object and a ScarabUser object
638      *
639      * @param v ScarabUser
640      * @throws TorqueException
641      */

642     public void setScarabUserRelatedByOwnerId(ScarabUser v) throws TorqueException
643     {
644             if (v == null)
645         {
646                   setOwnerId((Integer JavaDoc) null);
647               }
648         else
649         {
650             setOwnerId(v.getUserId());
651         }
652             aScarabUserRelatedByOwnerId = v;
653     }
654
655                         
656     /**
657      * Get the associated ScarabUser object
658      *
659      * @return the associated ScarabUser object
660      * @throws TorqueException
661      */

662     public ScarabUser getScarabUserRelatedByOwnerId() throws TorqueException
663     {
664         if ( !ObjectUtils.equals(getOwnerId(), null) )
665         {
666                 return ScarabUserManager.getInstance(SimpleKey.keyFor(getOwnerId()));
667             }
668         return aScarabUserRelatedByOwnerId;
669     }
670
671     /**
672      * Provides convenient way to set a relationship based on a
673      * ObjectKey, for example
674      * <code>bar.setFooKey(foo.getPrimaryKey())</code>
675      *
676          */

677     public void setScarabUserRelatedByOwnerIdKey(ObjectKey key) throws TorqueException
678     {
679     
680                     setOwnerId(new Integer JavaDoc(((NumberKey) key).intValue()));
681               }
682   
683             
684                         
685             private ScarabUser aScarabUserRelatedByQaContactId;
686
687     /**
688      * Declares an association between this object and a ScarabUser object
689      *
690      * @param v ScarabUser
691      * @throws TorqueException
692      */

693     public void setScarabUserRelatedByQaContactId(ScarabUser v) throws TorqueException
694     {
695             if (v == null)
696         {
697                   setQaContactId((Integer JavaDoc) null);
698               }
699         else
700         {
701             setQaContactId(v.getUserId());
702         }
703             aScarabUserRelatedByQaContactId = v;
704     }
705
706                         
707     /**
708      * Get the associated ScarabUser object
709      *
710      * @return the associated ScarabUser object
711      * @throws TorqueException
712      */

713     public ScarabUser getScarabUserRelatedByQaContactId() throws TorqueException
714     {
715         if ( !ObjectUtils.equals(getQaContactId(), null) )
716         {
717                 return ScarabUserManager.getInstance(SimpleKey.keyFor(getQaContactId()));
718             }
719         return aScarabUserRelatedByQaContactId;
720     }
721
722     /**
723      * Provides convenient way to set a relationship based on a
724      * ObjectKey, for example
725      * <code>bar.setFooKey(foo.getPrimaryKey())</code>
726      *
727          */

728     public void setScarabUserRelatedByQaContactIdKey(ObjectKey key) throws TorqueException
729     {
730     
731                     setQaContactId(new Integer JavaDoc(((NumberKey) key).intValue()));
732               }
733      
734                                 
735             
736     /**
737      * Collection to store aggregation of collAttributeGroups
738      */

739     protected List JavaDoc collAttributeGroups;
740
741     /**
742      * Temporary storage of collAttributeGroups to save a possible db hit in
743      * the event objects are add to the collection, but the
744      * complete collection is never requested.
745      */

746     protected void initAttributeGroups()
747     {
748         if (collAttributeGroups == null)
749         {
750             collAttributeGroups = new ArrayList JavaDoc();
751         }
752     }
753
754                   
755     /**
756      * Method called to associate a AttributeGroup object to this object
757      * through the AttributeGroup foreign key attribute
758      *
759      * @param l AttributeGroup
760      * @throws TorqueException
761      */

762     public void addAttributeGroup(AttributeGroup l) throws TorqueException
763     {
764         getAttributeGroups().add(l);
765         l.setModule((ScarabModule)this);
766     }
767
768     /**
769      * The criteria used to select the current contents of collAttributeGroups
770      */

771     private Criteria lastAttributeGroupsCriteria = null;
772
773     /**
774      * If this collection has already been initialized, returns
775      * the collection. Otherwise returns the results of
776      * getAttributeGroups(new Criteria())
777      *
778      * @throws TorqueException
779      */

780     public List JavaDoc getAttributeGroups() throws TorqueException
781     {
782         if (collAttributeGroups == null)
783         {
784             collAttributeGroups = getAttributeGroups(new Criteria(10));
785         }
786         return collAttributeGroups;
787     }
788
789     /**
790      * If this collection has already been initialized with
791      * an identical criteria, it returns the collection.
792      * Otherwise if this ScarabModule has previously
793      * been saved, it will retrieve related AttributeGroups from storage.
794      * If this ScarabModule is new, it will return
795      * an empty collection or the current collection, the criteria
796      * is ignored on a new object.
797      *
798      * @throws TorqueException
799      */

800     public List JavaDoc getAttributeGroups(Criteria criteria) throws TorqueException
801     {
802         if (collAttributeGroups == null)
803         {
804             if (isNew())
805             {
806                collAttributeGroups = new ArrayList JavaDoc();
807             }
808             else
809             {
810                       criteria.add(AttributeGroupPeer.MODULE_ID, getModuleId() );
811                       collAttributeGroups = AttributeGroupPeer.doSelect(criteria);
812             }
813         }
814         else
815         {
816             // criteria has no effect for a new object
817
if (!isNew())
818             {
819                 // the following code is to determine if a new query is
820
// called for. If the criteria is the same as the last
821
// one, just return the collection.
822
criteria.add(AttributeGroupPeer.MODULE_ID, getModuleId() );
823                       if (!lastAttributeGroupsCriteria.equals(criteria))
824                 {
825                     collAttributeGroups = AttributeGroupPeer.doSelect(criteria);
826                 }
827             }
828         }
829         lastAttributeGroupsCriteria = criteria;
830
831         return collAttributeGroups;
832     }
833
834     /**
835      * If this collection has already been initialized, returns
836      * the collection. Otherwise returns the results of
837      * getAttributeGroups(new Criteria(),Connection)
838      * This method takes in the Connection also as input so that
839      * referenced objects can also be obtained using a Connection
840      * that is taken as input
841      */

842     public List JavaDoc getAttributeGroups(Connection JavaDoc con) throws TorqueException
843     {
844         if (collAttributeGroups == null)
845         {
846             collAttributeGroups = getAttributeGroups(new Criteria(10),con);
847         }
848         return collAttributeGroups;
849     }
850
851     /**
852      * If this collection has already been initialized with
853      * an identical criteria, it returns the collection.
854      * Otherwise if this ScarabModule has previously
855      * been saved, it will retrieve related AttributeGroups from storage.
856      * If this ScarabModule is new, it will return
857      * an empty collection or the current collection, the criteria
858      * is ignored on a new object.
859      * This method takes in the Connection also as input so that
860      * referenced objects can also be obtained using a Connection
861      * that is taken as input
862      */

863     public List JavaDoc getAttributeGroups(Criteria criteria,Connection JavaDoc con) throws TorqueException
864     {
865         if (collAttributeGroups == null)
866         {
867             if (isNew())
868             {
869                collAttributeGroups = new ArrayList JavaDoc();
870             }
871             else
872             {
873                        criteria.add(AttributeGroupPeer.MODULE_ID, getModuleId() );
874                        collAttributeGroups = AttributeGroupPeer.doSelect(criteria,con);
875              }
876          }
877          else
878          {
879              // criteria has no effect for a new object
880
if (!isNew())
881              {
882                  // the following code is to determine if a new query is
883
// called for. If the criteria is the same as the last
884
// one, just return the collection.
885
criteria.add(AttributeGroupPeer.MODULE_ID, getModuleId() );
886                      if (!lastAttributeGroupsCriteria.equals(criteria))
887                  {
888                      collAttributeGroups = AttributeGroupPeer.doSelect(criteria,con);
889                  }
890              }
891          }
892          lastAttributeGroupsCriteria = criteria;
893
894          return collAttributeGroups;
895      }
896
897                         
898               
899                     
900                               
901                                 
902                                                               
903                                         
904                     
905                     
906           
907     /**
908      * If this collection has already been initialized with
909      * an identical criteria, it returns the collection.
910      * Otherwise if this ScarabModule is new, it will return
911      * an empty collection; or if this ScarabModule has previously
912      * been saved, it will retrieve related AttributeGroups from storage.
913      *
914      * This method is protected by default in order to keep the public
915      * api reasonable. You can provide public methods for those you
916      * actually need in ScarabModule.
917      */

918     protected List JavaDoc getAttributeGroupsJoinScarabModule(Criteria criteria)
919         throws TorqueException
920     {
921         if (collAttributeGroups == null)
922         {
923             if (isNew())
924             {
925                collAttributeGroups = new ArrayList JavaDoc();
926             }
927             else
928             {
929                             criteria.add(AttributeGroupPeer.MODULE_ID, getModuleId() );
930                             collAttributeGroups = AttributeGroupPeer.doSelectJoinScarabModule(criteria);
931             }
932         }
933         else
934         {
935             // the following code is to determine if a new query is
936
// called for. If the criteria is the same as the last
937
// one, just return the collection.
938

939                             criteria.add(AttributeGroupPeer.MODULE_ID, getModuleId() );
940                         if (!lastAttributeGroupsCriteria.equals(criteria))
941             {
942                 collAttributeGroups = AttributeGroupPeer.doSelectJoinScarabModule(criteria);
943             }
944         }
945         lastAttributeGroupsCriteria = criteria;
946
947         return collAttributeGroups;
948     }
949                   
950                     
951                     
952                                 
953                                                               
954                                         
955                     
956                     
957           
958     /**
959      * If this collection has already been initialized with
960      * an identical criteria, it returns the collection.
961      * Otherwise if this ScarabModule is new, it will return
962      * an empty collection; or if this ScarabModule has previously
963      * been saved, it will retrieve related AttributeGroups from storage.
964      *
965      * This method is protected by default in order to keep the public
966      * api reasonable. You can provide public methods for those you
967      * actually need in ScarabModule.
968      */

969     protected List JavaDoc getAttributeGroupsJoinIssueType(Criteria criteria)
970         throws TorqueException
971     {
972         if (collAttributeGroups == null)
973         {
974             if (isNew())
975             {
976                collAttributeGroups = new ArrayList JavaDoc();
977             }
978             else
979             {
980                             criteria.add(AttributeGroupPeer.MODULE_ID, getModuleId() );
981                             collAttributeGroups = AttributeGroupPeer.doSelectJoinIssueType(criteria);
982             }
983         }
984         else
985         {
986             // the following code is to determine if a new query is
987
// called for. If the criteria is the same as the last
988
// one, just return the collection.
989

990                             criteria.add(AttributeGroupPeer.MODULE_ID, getModuleId() );
991                         if (!lastAttributeGroupsCriteria.equals(criteria))
992             {
993                 collAttributeGroups = AttributeGroupPeer.doSelectJoinIssueType(criteria);
994             }
995         }
996         lastAttributeGroupsCriteria = criteria;
997
998         return collAttributeGroups;
999     }
1000                            
1001
1002
1003                          
1004            
1005    /**
1006     * Collection to store aggregation of collIssues
1007     */

1008    protected List JavaDoc collIssues;
1009
1010    /**
1011     * Temporary storage of collIssues to save a possible db hit in
1012     * the event objects are add to the collection, but the
1013     * complete collection is never requested.
1014     */

1015    protected void initIssues()
1016    {
1017        if (collIssues == null)
1018        {
1019            collIssues = new ArrayList JavaDoc();
1020        }
1021    }
1022
1023                  
1024    /**
1025     * Method called to associate a Issue object to this object
1026     * through the Issue foreign key attribute
1027     *
1028     * @param l Issue
1029     * @throws TorqueException
1030     */

1031    public void addIssue(Issue l) throws TorqueException
1032    {
1033        getIssues().add(l);
1034        l.setModule((ScarabModule)this);
1035    }
1036
1037    /**
1038     * The criteria used to select the current contents of collIssues
1039     */

1040    private Criteria lastIssuesCriteria = null;
1041
1042    /**
1043     * If this collection has already been initialized, returns
1044     * the collection. Otherwise returns the results of
1045     * getIssues(new Criteria())
1046     *
1047     * @throws TorqueException
1048     */

1049    public List JavaDoc getIssues() throws TorqueException
1050    {
1051        if (collIssues == null)
1052        {
1053            collIssues = getIssues(new Criteria(10));
1054        }
1055        return collIssues;
1056    }
1057
1058    /**
1059     * If this collection has already been initialized with
1060     * an identical criteria, it returns the collection.
1061     * Otherwise if this ScarabModule has previously
1062     * been saved, it will retrieve related Issues from storage.
1063     * If this ScarabModule is new, it will return
1064     * an empty collection or the current collection, the criteria
1065     * is ignored on a new object.
1066     *
1067     * @throws TorqueException
1068     */

1069    public List JavaDoc getIssues(Criteria criteria) throws TorqueException
1070    {
1071        if (collIssues == null)
1072        {
1073            if (isNew())
1074            {
1075               collIssues = new ArrayList JavaDoc();
1076            }
1077            else
1078            {
1079                      criteria.add(IssuePeer.MODULE_ID, getModuleId() );
1080                      collIssues = IssuePeer.doSelect(criteria);
1081            }
1082        }
1083        else
1084        {
1085            // criteria has no effect for a new object
1086
if (!isNew())
1087            {
1088                // the following code is to determine if a new query is
1089
// called for. If the criteria is the same as the last
1090
// one, just return the collection.
1091
criteria.add(IssuePeer.MODULE_ID, getModuleId() );
1092                      if (!lastIssuesCriteria.equals(criteria))
1093                {
1094                    collIssues = IssuePeer.doSelect(criteria);
1095                }
1096            }
1097        }
1098        lastIssuesCriteria = criteria;
1099
1100        return collIssues;
1101    }
1102
1103    /**
1104     * If this collection has already been initialized, returns
1105     * the collection. Otherwise returns the results of
1106     * getIssues(new Criteria(),Connection)
1107     * This method takes in the Connection also as input so that
1108     * referenced objects can also be obtained using a Connection
1109     * that is taken as input
1110     */

1111    public List JavaDoc getIssues(Connection JavaDoc con) throws TorqueException
1112    {
1113        if (collIssues == null)
1114        {
1115            collIssues = getIssues(new Criteria(10),con);
1116        }
1117        return collIssues;
1118    }
1119
1120    /**
1121     * If this collection has already been initialized with
1122     * an identical criteria, it returns the collection.
1123     * Otherwise if this ScarabModule has previously
1124     * been saved, it will retrieve related Issues from storage.
1125     * If this ScarabModule is new, it will return
1126     * an empty collection or the current collection, the criteria
1127     * is ignored on a new object.
1128     * This method takes in the Connection also as input so that
1129     * referenced objects can also be obtained using a Connection
1130     * that is taken as input
1131     */

1132    public List JavaDoc getIssues(Criteria criteria,Connection JavaDoc con) throws TorqueException
1133    {
1134        if (collIssues == null)
1135        {
1136            if (isNew())
1137            {
1138               collIssues = new ArrayList JavaDoc();
1139            }
1140            else
1141            {
1142                       criteria.add(IssuePeer.MODULE_ID, getModuleId() );
1143                       collIssues = IssuePeer.doSelect(criteria,con);
1144             }
1145         }
1146         else
1147         {
1148             // criteria has no effect for a new object
1149
if (!isNew())
1150             {
1151                 // the following code is to determine if a new query is
1152
// called for. If the criteria is the same as the last
1153
// one, just return the collection.
1154
criteria.add(IssuePeer.MODULE_ID, getModuleId() );
1155                     if (!lastIssuesCriteria.equals(criteria))
1156                 {
1157                     collIssues = IssuePeer.doSelect(criteria,con);
1158                 }
1159             }
1160         }
1161         lastIssuesCriteria = criteria;
1162
1163         return collIssues;
1164     }
1165
1166                              
1167              
1168                    
1169                              
1170                                
1171                                                              
1172                                        
1173                    
1174                    
1175          
1176    /**
1177     * If this collection has already been initialized with
1178     * an identical criteria, it returns the collection.
1179     * Otherwise if this ScarabModule is new, it will return
1180     * an empty collection; or if this ScarabModule has previously
1181     * been saved, it will retrieve related Issues from storage.
1182     *
1183     * This method is protected by default in order to keep the public
1184     * api reasonable. You can provide public methods for those you
1185     * actually need in ScarabModule.
1186     */

1187    protected List JavaDoc getIssuesJoinScarabModule(Criteria criteria)
1188        throws TorqueException
1189    {
1190        if (collIssues == null)
1191        {
1192            if (isNew())
1193            {
1194               collIssues = new ArrayList JavaDoc();
1195            }
1196            else
1197            {
1198                            criteria.add(IssuePeer.MODULE_ID, getModuleId() );
1199                            collIssues = IssuePeer.doSelectJoinScarabModule(criteria);
1200            }
1201        }
1202        else
1203        {
1204            // the following code is to determine if a new query is
1205
// called for. If the criteria is the same as the last
1206
// one, just return the collection.
1207

1208                            criteria.add(IssuePeer.MODULE_ID, getModuleId() );
1209                        if (!lastIssuesCriteria.equals(criteria))
1210            {
1211                collIssues = IssuePeer.doSelectJoinScarabModule(criteria);
1212            }
1213        }
1214        lastIssuesCriteria = criteria;
1215
1216        return collIssues;
1217    }
1218                  
1219                    
1220                    
1221                                
1222                                                              
1223                                        
1224                    
1225                    
1226          
1227    /**
1228     * If this collection has already been initialized with
1229     * an identical criteria, it returns the collection.
1230     * Otherwise if this ScarabModule is new, it will return
1231     * an empty collection; or if this ScarabModule has previously
1232     * been saved, it will retrieve related Issues from storage.
1233     *
1234     * This method is protected by default in order to keep the public
1235     * api reasonable. You can provide public methods for those you
1236     * actually need in ScarabModule.
1237     */

1238    protected List JavaDoc getIssuesJoinIssueType(Criteria criteria)
1239        throws TorqueException
1240    {
1241        if (collIssues == null)
1242        {
1243            if (isNew())
1244            {
1245               collIssues = new ArrayList JavaDoc();
1246            }
1247            else
1248            {
1249                            criteria.add(IssuePeer.MODULE_ID, getModuleId() );
1250                            collIssues = IssuePeer.doSelectJoinIssueType(criteria);
1251            }
1252        }
1253        else
1254        {
1255            // the following code is to determine if a new query is
1256
// called for. If the criteria is the same as the last
1257
// one, just return the collection.
1258

1259                            criteria.add(IssuePeer.MODULE_ID, getModuleId() );
1260                        if (!lastIssuesCriteria.equals(criteria))
1261            {
1262                collIssues = IssuePeer.doSelectJoinIssueType(criteria);
1263            }
1264        }
1265        lastIssuesCriteria = criteria;
1266
1267        return collIssues;
1268    }
1269                  
1270                    
1271                    
1272                                
1273                                                              
1274                                        
1275                    
1276                    
1277          
1278    /**
1279     * If this collection has already been initialized with
1280     * an identical criteria, it returns the collection.
1281     * Otherwise if this ScarabModule is new, it will return
1282     * an empty collection; or if this ScarabModule has previously
1283     * been saved, it will retrieve related Issues from storage.
1284     *
1285     * This method is protected by default in order to keep the public
1286     * api reasonable. You can provide public methods for those you
1287     * actually need in ScarabModule.
1288     */

1289    protected List JavaDoc getIssuesJoinActivitySet(Criteria criteria)
1290        throws TorqueException
1291    {
1292        if (collIssues == null)
1293        {
1294            if (isNew())
1295            {
1296               collIssues = new ArrayList JavaDoc();
1297            }
1298            else
1299            {
1300                            criteria.add(IssuePeer.MODULE_ID, getModuleId() );
1301                            collIssues = IssuePeer.doSelectJoinActivitySet(criteria);
1302            }
1303        }
1304        else
1305        {
1306            // the following code is to determine if a new query is
1307
// called for. If the criteria is the same as the last
1308
// one, just return the collection.
1309

1310                            criteria.add(IssuePeer.MODULE_ID, getModuleId() );
1311                        if (!lastIssuesCriteria.equals(criteria))
1312            {
1313                collIssues = IssuePeer.doSelectJoinActivitySet(criteria);
1314            }
1315        }
1316        lastIssuesCriteria = criteria;
1317
1318        return collIssues;
1319    }
1320                            
1321
1322
1323                          
1324            
1325    /**
1326     * Collection to store aggregation of collRModuleIssueTypes
1327     */

1328    protected List JavaDoc collRModuleIssueTypes;
1329
1330    /**
1331     * Temporary storage of collRModuleIssueTypes to save a possible db hit in
1332     * the event objects are add to the collection, but the
1333     * complete collection is never requested.
1334     */

1335    protected void initRModuleIssueTypes()
1336    {
1337        if (collRModuleIssueTypes == null)
1338        {
1339            collRModuleIssueTypes = new ArrayList JavaDoc();
1340        }
1341    }
1342
1343                  
1344    /**
1345     * Method called to associate a RModuleIssueType object to this object
1346     * through the RModuleIssueType foreign key attribute
1347     *
1348     * @param l RModuleIssueType
1349     * @throws TorqueException
1350     */

1351    public void addRModuleIssueType(RModuleIssueType l) throws TorqueException
1352    {
1353        getRModuleIssueTypes().add(l);
1354        l.setModule((ScarabModule)this);
1355    }
1356
1357    /**
1358     * The criteria used to select the current contents of collRModuleIssueTypes
1359     */

1360    private Criteria lastRModuleIssueTypesCriteria = null;
1361
1362    /**
1363     * If this collection has already been initialized, returns
1364     * the collection. Otherwise returns the results of
1365     * getRModuleIssueTypes(new Criteria())
1366     *
1367     * @throws TorqueException
1368     */

1369    public List JavaDoc getRModuleIssueTypes() throws TorqueException
1370    {
1371        if (collRModuleIssueTypes == null)
1372        {
1373            collRModuleIssueTypes = getRModuleIssueTypes(new Criteria(10));
1374        }
1375        return collRModuleIssueTypes;
1376    }
1377
1378    /**
1379     * If this collection has already been initialized with
1380     * an identical criteria, it returns the collection.
1381     * Otherwise if this ScarabModule has previously
1382     * been saved, it will retrieve related RModuleIssueTypes from storage.
1383     * If this ScarabModule is new, it will return
1384     * an empty collection or the current collection, the criteria
1385     * is ignored on a new object.
1386     *
1387     * @throws TorqueException
1388     */

1389    public List JavaDoc getRModuleIssueTypes(Criteria criteria) throws TorqueException
1390    {
1391        if (collRModuleIssueTypes == null)
1392        {
1393            if (isNew())
1394            {
1395               collRModuleIssueTypes = new ArrayList JavaDoc();
1396            }
1397            else
1398            {
1399                      criteria.add(RModuleIssueTypePeer.MODULE_ID, getModuleId() );
1400                      collRModuleIssueTypes = RModuleIssueTypePeer.doSelect(criteria);
1401            }
1402        }
1403        else
1404        {
1405            // criteria has no effect for a new object
1406
if (!isNew())
1407            {
1408                // the following code is to determine if a new query is
1409
// called for. If the criteria is the same as the last
1410
// one, just return the collection.
1411
criteria.add(RModuleIssueTypePeer.MODULE_ID, getModuleId() );
1412                      if (!lastRModuleIssueTypesCriteria.equals(criteria))
1413                {
1414                    collRModuleIssueTypes = RModuleIssueTypePeer.doSelect(criteria);
1415                }
1416            }
1417        }
1418        lastRModuleIssueTypesCriteria = criteria;
1419
1420        return collRModuleIssueTypes;
1421    }
1422
1423    /**
1424     * If this collection has already been initialized, returns
1425     * the collection. Otherwise returns the results of
1426     * getRModuleIssueTypes(new Criteria(),Connection)
1427     * This method takes in the Connection also as input so that
1428     * referenced objects can also be obtained using a Connection
1429     * that is taken as input
1430     */

1431    public List JavaDoc getRModuleIssueTypes(Connection JavaDoc con) throws TorqueException
1432    {
1433        if (collRModuleIssueTypes == null)
1434        {
1435            collRModuleIssueTypes = getRModuleIssueTypes(new Criteria(10),con);
1436        }
1437        return collRModuleIssueTypes;
1438    }
1439
1440    /**
1441     * If this collection has already been initialized with
1442     * an identical criteria, it returns the collection.
1443     * Otherwise if this ScarabModule has previously
1444     * been saved, it will retrieve related RModuleIssueTypes from storage.
1445     * If this ScarabModule is new, it will return
1446     * an empty collection or the current collection, the criteria
1447     * is ignored on a new object.
1448     * This method takes in the Connection also as input so that
1449     * referenced objects can also be obtained using a Connection
1450     * that is taken as input
1451     */

1452    public List JavaDoc getRModuleIssueTypes(Criteria criteria,Connection JavaDoc con) throws TorqueException
1453    {
1454        if (collRModuleIssueTypes == null)
1455        {
1456            if (isNew())
1457            {
1458               collRModuleIssueTypes = new ArrayList JavaDoc();
1459            }
1460            else
1461            {
1462                       criteria.add(RModuleIssueTypePeer.MODULE_ID, getModuleId() );
1463                       collRModuleIssueTypes = RModuleIssueTypePeer.doSelect(criteria,con);
1464             }
1465         }
1466         else
1467         {
1468             // criteria has no effect for a new object
1469
if (!isNew())
1470             {
1471                 // the following code is to determine if a new query is
1472
// called for. If the criteria is the same as the last
1473
// one, just return the collection.
1474
criteria.add(RModuleIssueTypePeer.MODULE_ID, getModuleId() );
1475                     if (!lastRModuleIssueTypesCriteria.equals(criteria))
1476                 {
1477                     collRModuleIssueTypes = RModuleIssueTypePeer.doSelect(criteria,con);
1478                 }
1479             }
1480         }
1481         lastRModuleIssueTypesCriteria = criteria;
1482
1483         return collRModuleIssueTypes;
1484     }
1485
1486                        
1487              
1488                    
1489                              
1490                                
1491                                                              
1492                                        
1493                    
1494                    
1495          
1496    /**
1497     * If this collection has already been initialized with
1498     * an identical criteria, it returns the collection.
1499     * Otherwise if this ScarabModule is new, it will return
1500     * an empty collection; or if this ScarabModule has previously
1501     * been saved, it will retrieve related RModuleIssueTypes from storage.
1502     *
1503     * This method is protected by default in order to keep the public
1504     * api reasonable. You can provide public methods for those you
1505     * actually need in ScarabModule.
1506     */

1507    protected List JavaDoc getRModuleIssueTypesJoinScarabModule(Criteria criteria)
1508        throws TorqueException
1509    {
1510        if (collRModuleIssueTypes == null)
1511        {
1512            if (isNew())
1513            {
1514               collRModuleIssueTypes = new ArrayList JavaDoc();
1515            }
1516            else
1517            {
1518                            criteria.add(RModuleIssueTypePeer.MODULE_ID, getModuleId() );
1519                            collRModuleIssueTypes = RModuleIssueTypePeer.doSelectJoinScarabModule(criteria);
1520            }
1521        }
1522        else
1523        {
1524            // the following code is to determine if a new query is
1525
// called for. If the criteria is the same as the last
1526
// one, just return the collection.
1527

1528                            criteria.add(RModuleIssueTypePeer.MODULE_ID, getModuleId() );
1529                        if (!lastRModuleIssueTypesCriteria.equals(criteria))
1530            {
1531                collRModuleIssueTypes = RModuleIssueTypePeer.doSelectJoinScarabModule(criteria);
1532            }
1533        }
1534        lastRModuleIssueTypesCriteria = criteria;
1535
1536        return collRModuleIssueTypes;
1537    }
1538                  
1539                    
1540                    
1541                                
1542                                                              
1543                                        
1544                    
1545                    
1546          
1547    /**
1548     * If this collection has already been initialized with
1549     * an identical criteria, it returns the collection.
1550     * Otherwise if this ScarabModule is new, it will return
1551     * an empty collection; or if this ScarabModule has previously
1552     * been saved, it will retrieve related RModuleIssueTypes from storage.
1553     *
1554     * This method is protected by default in order to keep the public
1555     * api reasonable. You can provide public methods for those you
1556     * actually need in ScarabModule.
1557     */

1558    protected List JavaDoc getRModuleIssueTypesJoinIssueType(Criteria criteria)
1559        throws TorqueException
1560    {
1561        if (collRModuleIssueTypes == null)
1562        {
1563            if (isNew())
1564            {
1565               collRModuleIssueTypes = new ArrayList JavaDoc();
1566            }
1567            else
1568            {
1569                            criteria.add(RModuleIssueTypePeer.MODULE_ID, getModuleId() );
1570                            collRModuleIssueTypes = RModuleIssueTypePeer.doSelectJoinIssueType(criteria);
1571            }
1572        }
1573        else
1574        {
1575            // the following code is to determine if a new query is
1576
// called for. If the criteria is the same as the last
1577
// one, just return the collection.
1578

1579                            criteria.add(RModuleIssueTypePeer.MODULE_ID, getModuleId() );
1580                        if (!lastRModuleIssueTypesCriteria.equals(criteria))
1581            {
1582                collRModuleIssueTypes = RModuleIssueTypePeer.doSelectJoinIssueType(criteria);
1583            }
1584        }
1585        lastRModuleIssueTypesCriteria = criteria;
1586
1587        return collRModuleIssueTypes;
1588    }
1589                            
1590
1591
1592                          
1593            
1594    /**
1595     * Collection to store aggregation of collMITListItems
1596     */

1597    protected List JavaDoc collMITListItems;
1598
1599    /**
1600     * Temporary storage of collMITListItems to save a possible db hit in
1601     * the event objects are add to the collection, but the
1602     * complete collection is never requested.
1603     */

1604    protected void initMITListItems()
1605    {
1606        if (collMITListItems == null)
1607        {
1608            collMITListItems = new ArrayList JavaDoc();
1609        }
1610    }
1611
1612                  
1613    /**
1614     * Method called to associate a MITListItem object to this object
1615     * through the MITListItem foreign key attribute
1616     *
1617     * @param l MITListItem
1618     * @throws TorqueException
1619     */

1620    public void addMITListItem(MITListItem l) throws TorqueException
1621    {
1622        getMITListItems().add(l);
1623        l.setModule((ScarabModule)this);
1624    }
1625
1626    /**
1627     * The criteria used to select the current contents of collMITListItems
1628     */

1629    private Criteria lastMITListItemsCriteria = null;
1630
1631    /**
1632     * If this collection has already been initialized, returns
1633     * the collection. Otherwise returns the results of
1634     * getMITListItems(new Criteria())
1635     *
1636     * @throws TorqueException
1637     */

1638    public List JavaDoc getMITListItems() throws TorqueException
1639    {
1640        if (collMITListItems == null)
1641        {
1642            collMITListItems = getMITListItems(new Criteria(10));
1643        }
1644        return collMITListItems;
1645    }
1646
1647    /**
1648     * If this collection has already been initialized with
1649     * an identical criteria, it returns the collection.
1650     * Otherwise if this ScarabModule has previously
1651     * been saved, it will retrieve related MITListItems from storage.
1652     * If this ScarabModule is new, it will return
1653     * an empty collection or the current collection, the criteria
1654     * is ignored on a new object.
1655     *
1656     * @throws TorqueException
1657     */

1658    public List JavaDoc getMITListItems(Criteria criteria) throws TorqueException
1659    {
1660        if (collMITListItems == null)
1661        {
1662            if (isNew())
1663            {
1664               collMITListItems = new ArrayList JavaDoc();
1665            }
1666            else
1667            {
1668                      criteria.add(MITListItemPeer.MODULE_ID, getModuleId() );
1669                      collMITListItems = MITListItemPeer.doSelect(criteria);
1670            }
1671        }
1672        else
1673        {
1674            // criteria has no effect for a new object
1675
if (!isNew())
1676            {
1677                // the following code is to determine if a new query is
1678
// called for. If the criteria is the same as the last
1679
// one, just return the collection.
1680
criteria.add(MITListItemPeer.MODULE_ID, getModuleId() );
1681                      if (!lastMITListItemsCriteria.equals(criteria))
1682                {
1683                    collMITListItems = MITListItemPeer.doSelect(criteria);
1684                }
1685            }
1686        }
1687        lastMITListItemsCriteria = criteria;
1688
1689        return collMITListItems;
1690    }
1691
1692    /**
1693     * If this collection has already been initialized, returns
1694     * the collection. Otherwise returns the results of
1695     * getMITListItems(new Criteria(),Connection)
1696     * This method takes in the Connection also as input so that
1697     * referenced objects can also be obtained using a Connection
1698     * that is taken as input
1699     */

1700    public List JavaDoc getMITListItems(Connection JavaDoc con) throws TorqueException
1701    {
1702        if (collMITListItems == null)
1703        {
1704            collMITListItems = getMITListItems(new Criteria(10),con);
1705        }
1706        return collMITListItems;
1707    }
1708
1709    /**
1710     * If this collection has already been initialized with
1711     * an identical criteria, it returns the collection.
1712     * Otherwise if this ScarabModule has previously
1713     * been saved, it will retrieve related MITListItems from storage.
1714     * If this ScarabModule is new, it will return
1715     * an empty collection or the current collection, the criteria
1716     * is ignored on a new object.
1717     * This method takes in the Connection also as input so that
1718     * referenced objects can also be obtained using a Connection
1719     * that is taken as input
1720     */

1721    public List JavaDoc getMITListItems(Criteria criteria,Connection JavaDoc con) throws TorqueException
1722    {
1723        if (collMITListItems == null)
1724        {
1725            if (isNew())
1726            {
1727               collMITListItems = new ArrayList JavaDoc();
1728            }
1729            else
1730            {
1731                       criteria.add(MITListItemPeer.MODULE_ID, getModuleId() );
1732                       collMITListItems = MITListItemPeer.doSelect(criteria,con);
1733             }
1734         }
1735         else
1736         {
1737             // criteria has no effect for a new object
1738
if (!isNew())
1739             {
1740                 // the following code is to determine if a new query is
1741
// called for. If the criteria is the same as the last
1742
// one, just return the collection.
1743
criteria.add(MITListItemPeer.MODULE_ID, getModuleId() );
1744                     if (!lastMITListItemsCriteria.equals(criteria))
1745                 {
1746                     collMITListItems = MITListItemPeer.doSelect(criteria,con);
1747                 }
1748             }
1749         }
1750         lastMITListItemsCriteria = criteria;
1751
1752         return collMITListItems;
1753     }
1754
1755                              
1756              
1757                    
1758                    
1759                                
1760                                                              
1761                                        
1762                    
1763                    
1764          
1765    /**
1766     * If this collection has already been initialized with
1767     * an identical criteria, it returns the collection.
1768     * Otherwise if this ScarabModule is new, it will return
1769     * an empty collection; or if this ScarabModule has previously
1770     * been saved, it will retrieve related MITListItems from storage.
1771     *
1772     * This method is protected by default in order to keep the public
1773     * api reasonable. You can provide public methods for those you
1774     * actually need in ScarabModule.
1775     */

1776    protected List JavaDoc getMITListItemsJoinMITList(Criteria criteria)
1777        throws TorqueException
1778    {
1779        if (collMITListItems == null)
1780        {
1781            if (isNew())
1782            {
1783               collMITListItems = new ArrayList JavaDoc();
1784            }
1785            else
1786            {
1787                            criteria.add(MITListItemPeer.MODULE_ID, getModuleId() );
1788                            collMITListItems = MITListItemPeer.doSelectJoinMITList(criteria);
1789            }
1790        }
1791        else
1792        {
1793            // the following code is to determine if a new query is
1794
// called for. If the criteria is the same as the last
1795
// one, just return the collection.
1796

1797                            criteria.add(MITListItemPeer.MODULE_ID, getModuleId() );
1798                        if (!lastMITListItemsCriteria.equals(criteria))
1799            {
1800                collMITListItems = MITListItemPeer.doSelectJoinMITList(criteria);
1801            }
1802        }
1803        lastMITListItemsCriteria = criteria;
1804
1805        return collMITListItems;
1806    }
1807                  
1808                    
1809                              
1810                                
1811                                                              
1812                                        
1813                    
1814                    
1815          
1816    /**
1817     * If this collection has already been initialized with
1818     * an identical criteria, it returns the collection.
1819     * Otherwise if this ScarabModule is new, it will return
1820     * an empty collection; or if this ScarabModule has previously
1821     * been saved, it will retrieve related MITListItems from storage.
1822     *
1823     * This method is protected by default in order to keep the public
1824     * api reasonable. You can provide public methods for those you
1825     * actually need in ScarabModule.
1826     */

1827    protected List JavaDoc getMITListItemsJoinScarabModule(Criteria criteria)
1828        throws TorqueException
1829    {
1830        if (collMITListItems == null)
1831        {
1832            if (isNew())
1833            {
1834               collMITListItems = new ArrayList JavaDoc();
1835            }
1836            else
1837            {
1838                            criteria.add(MITListItemPeer.MODULE_ID, getModuleId() );
1839                            collMITListItems = MITListItemPeer.doSelectJoinScarabModule(criteria);
1840            }
1841        }
1842        else
1843        {
1844            // the following code is to determine if a new query is
1845
// called for. If the criteria is the same as the last
1846
// one, just return the collection.
1847

1848                            criteria.add(MITListItemPeer.MODULE_ID, getModuleId() );
1849                        if (!lastMITListItemsCriteria.equals(criteria))
1850            {
1851                collMITListItems = MITListItemPeer.doSelectJoinScarabModule(criteria);
1852            }
1853        }
1854        lastMITListItemsCriteria = criteria;
1855
1856        return collMITListItems;
1857    }
1858                  
1859                    
1860                    
1861                                
1862                                                              
1863                                        
1864                    
1865                    
1866          
1867    /**
1868     * If this collection has already been initialized with
1869     * an identical criteria, it returns the collection.
1870     * Otherwise if this ScarabModule is new, it will return
1871     * an empty collection; or if this ScarabModule has previously
1872     * been saved, it will retrieve related MITListItems from storage.
1873     *
1874     * This method is protected by default in order to keep the public
1875     * api reasonable. You can provide public methods for those you
1876     * actually need in ScarabModule.
1877     */

1878    protected List JavaDoc getMITListItemsJoinIssueType(Criteria criteria)
1879        throws TorqueException
1880    {
1881        if (collMITListItems == null)
1882        {
1883            if (isNew())
1884            {
1885               collMITListItems = new ArrayList JavaDoc();
1886            }
1887            else
1888            {
1889                            criteria.add(MITListItemPeer.MODULE_ID, getModuleId() );
1890                            collMITListItems = MITListItemPeer.doSelectJoinIssueType(criteria);
1891            }
1892        }
1893        else
1894        {
1895            // the following code is to determine if a new query is
1896
// called for. If the criteria is the same as the last
1897
// one, just return the collection.
1898

1899                            criteria.add(MITListItemPeer.MODULE_ID, getModuleId() );
1900                        if (!lastMITListItemsCriteria.equals(criteria))
1901            {
1902                collMITListItems = MITListItemPeer.doSelectJoinIssueType(criteria);
1903            }
1904        }
1905        lastMITListItemsCriteria = criteria;
1906
1907        return collMITListItems;
1908    }
1909                            
1910
1911
1912      
1913
1914
1915                          
1916            
1917    /**
1918     * Collection to store aggregation of collRModuleAttributes
1919     */

1920    protected List JavaDoc collRModuleAttributes;
1921
1922    /**
1923     * Temporary storage of collRModuleAttributes to save a possible db hit in
1924     * the event objects are add to the collection, but the
1925     * complete collection is never requested.
1926     */

1927    protected void initRModuleAttributes()
1928    {
1929        if (collRModuleAttributes == null)
1930        {
1931            collRModuleAttributes = new ArrayList JavaDoc();
1932        }
1933    }
1934
1935                  
1936    /**
1937     * Method called to associate a RModuleAttribute object to this object
1938     * through the RModuleAttribute foreign key attribute
1939     *
1940     * @param l RModuleAttribute
1941     * @throws TorqueException
1942     */

1943    public void addRModuleAttribute(RModuleAttribute l) throws TorqueException
1944    {
1945        getRModuleAttributes().add(l);
1946        l.setModule((ScarabModule)this);
1947    }
1948
1949    /**
1950     * The criteria used to select the current contents of collRModuleAttributes
1951     */

1952    private Criteria lastRModuleAttributesCriteria = null;
1953
1954    /**
1955     * If this collection has already been initialized, returns
1956     * the collection. Otherwise returns the results of
1957     * getRModuleAttributes(new Criteria())
1958     *
1959     * @throws TorqueException
1960     */

1961    public List JavaDoc getRModuleAttributes() throws TorqueException
1962    {
1963        if (collRModuleAttributes == null)
1964        {
1965            collRModuleAttributes = getRModuleAttributes(new Criteria(10));
1966        }
1967        return collRModuleAttributes;
1968    }
1969
1970    /**
1971     * If this collection has already been initialized with
1972     * an identical criteria, it returns the collection.
1973     * Otherwise if this ScarabModule has previously
1974     * been saved, it will retrieve related RModuleAttributes from storage.
1975     * If this ScarabModule is new, it will return
1976     * an empty collection or the current collection, the criteria
1977     * is ignored on a new object.
1978     *
1979     * @throws TorqueException
1980     */

1981    public List JavaDoc getRModuleAttributes(Criteria criteria) throws TorqueException
1982    {
1983        if (collRModuleAttributes == null)
1984        {
1985            if (isNew())
1986            {
1987               collRModuleAttributes = new ArrayList JavaDoc();
1988            }
1989            else
1990            {
1991                      criteria.add(RModuleAttributePeer.MODULE_ID, getModuleId() );
1992                      collRModuleAttributes = RModuleAttributePeer.doSelect(criteria);
1993            }
1994        }
1995        else
1996        {
1997            // criteria has no effect for a new object
1998
if (!isNew())
1999            {
2000                // the following code is to determine if a new query is
2001
// called for. If the criteria is the same as the last
2002
// one, just return the collection.
2003
criteria.add(RModuleAttributePeer.MODULE_ID, getModuleId() );
2004                      if (!lastRModuleAttributesCriteria.equals(criteria))
2005                {
2006                    collRModuleAttributes = RModuleAttributePeer.doSelect(criteria);
2007                }
2008            }
2009        }
2010        lastRModuleAttributesCriteria = criteria;
2011
2012        return collRModuleAttributes;
2013    }
2014
2015    /**
2016     * If this collection has already been initialized, returns
2017     * the collection. Otherwise returns the results of
2018     * getRModuleAttributes(new Criteria(),Connection)
2019     * This method takes in the Connection also as input so that
2020     * referenced objects can also be obtained using a Connection
2021     * that is taken as input
2022     */

2023    public List JavaDoc getRModuleAttributes(Connection JavaDoc con) throws TorqueException
2024    {
2025        if (collRModuleAttributes == null)
2026        {
2027            collRModuleAttributes = getRModuleAttributes(new Criteria(10),con);
2028        }
2029        return collRModuleAttributes;
2030    }
2031
2032    /**
2033     * If this collection has already been initialized with
2034     * an identical criteria, it returns the collection.
2035     * Otherwise if this ScarabModule has previously
2036     * been saved, it will retrieve related RModuleAttributes from storage.
2037     * If this ScarabModule is new, it will return
2038     * an empty collection or the current collection, the criteria
2039     * is ignored on a new object.
2040     * This method takes in the Connection also as input so that
2041     * referenced objects can also be obtained using a Connection
2042     * that is taken as input
2043     */

2044    public List JavaDoc getRModuleAttributes(Criteria criteria,Connection JavaDoc con) throws TorqueException
2045    {
2046        if (collRModuleAttributes == null)
2047        {
2048            if (isNew())
2049            {
2050               collRModuleAttributes = new ArrayList JavaDoc();
2051            }
2052            else
2053            {
2054                       criteria.add(RModuleAttributePeer.MODULE_ID, getModuleId() );
2055                       collRModuleAttributes = RModuleAttributePeer.doSelect(criteria,con);
2056             }
2057         }
2058         else
2059         {
2060             // criteria has no effect for a new object
2061
if (!isNew())
2062             {
2063                 // the following code is to determine if a new query is
2064
// called for. If the criteria is the same as the last
2065
// one, just return the collection.
2066
criteria.add(RModuleAttributePeer.MODULE_ID, getModuleId() );
2067                     if (!lastRModuleAttributesCriteria.equals(criteria))
2068                 {
2069                     collRModuleAttributes = RModuleAttributePeer.doSelect(criteria,con);
2070                 }
2071             }
2072         }
2073         lastRModuleAttributesCriteria = criteria;
2074
2075         return collRModuleAttributes;
2076     }
2077
2078                              
2079              
2080                    
2081                    
2082                                
2083                                                              
2084                                        
2085                    
2086                    
2087          
2088    /**
2089     * If this collection has already been initialized with
2090     * an identical criteria, it returns the collection.
2091     * Otherwise if this ScarabModule is new, it will return
2092     * an empty collection; or if this ScarabModule has previously
2093     * been saved, it will retrieve related RModuleAttributes from storage.
2094     *
2095     * This method is protected by default in order to keep the public
2096     * api reasonable. You can provide public methods for those you
2097     * actually need in ScarabModule.
2098     */

2099    protected List JavaDoc getRModuleAttributesJoinAttribute(Criteria criteria)
2100        throws TorqueException
2101    {
2102        if (collRModuleAttributes == null)
2103        {
2104            if (isNew())
2105            {
2106               collRModuleAttributes = new ArrayList JavaDoc();
2107            }
2108            else
2109            {
2110                            criteria.add(RModuleAttributePeer.MODULE_ID, getModuleId() );
2111                            collRModuleAttributes = RModuleAttributePeer.doSelectJoinAttribute(criteria);
2112            }
2113        }
2114        else
2115        {
2116            // the following code is to determine if a new query is
2117
// called for. If the criteria is the same as the last
2118
// one, just return the collection.
2119

2120                            criteria.add(RModuleAttributePeer.MODULE_ID, getModuleId() );
2121                        if (!lastRModuleAttributesCriteria.equals(criteria))
2122            {
2123                collRModuleAttributes = RModuleAttributePeer.doSelectJoinAttribute(criteria);
2124            }
2125        }
2126        lastRModuleAttributesCriteria = criteria;
2127
2128        return collRModuleAttributes;
2129    }
2130                  
2131                    
2132                              
2133                                
2134                                                              
2135                                        
2136                    
2137                    
2138          
2139    /**
2140     * If this collection has already been initialized with
2141     * an identical criteria, it returns the collection.
2142     * Otherwise if this ScarabModule is new, it will return
2143     * an empty collection; or if this ScarabModule has previously
2144     * been saved, it will retrieve related RModuleAttributes from storage.
2145     *
2146     * This method is protected by default in order to keep the public
2147     * api reasonable. You can provide public methods for those you
2148     * actually need in ScarabModule.
2149     */

2150    protected List JavaDoc getRModuleAttributesJoinScarabModule(Criteria criteria)
2151        throws TorqueException
2152    {
2153        if (collRModuleAttributes == null)
2154        {
2155            if (isNew())
2156            {
2157               collRModuleAttributes = new ArrayList JavaDoc();
2158            }
2159            else
2160            {
2161                            criteria.add(RModuleAttributePeer.MODULE_ID, getModuleId() );
2162                            collRModuleAttributes = RModuleAttributePeer.doSelectJoinScarabModule(criteria);
2163            }
2164        }
2165        else
2166        {
2167            // the following code is to determine if a new query is
2168
// called for. If the criteria is the same as the last
2169
// one, just return the collection.
2170

2171                            criteria.add(RModuleAttributePeer.MODULE_ID, getModuleId() );
2172                        if (!lastRModuleAttributesCriteria.equals(criteria))
2173            {
2174                collRModuleAttributes = RModuleAttributePeer.doSelectJoinScarabModule(criteria);
2175            }
2176        }
2177        lastRModuleAttributesCriteria = criteria;
2178
2179        return collRModuleAttributes;
2180    }
2181                  
2182                    
2183                    
2184                                
2185                                                              
2186                                        
2187                    
2188                    
2189          
2190    /**
2191     * If this collection has already been initialized with
2192     * an identical criteria, it returns the collection.
2193     * Otherwise if this ScarabModule is new, it will return
2194     * an empty collection; or if this ScarabModule has previously
2195     * been saved, it will retrieve related RModuleAttributes from storage.
2196     *
2197     * This method is protected by default in order to keep the public
2198     * api reasonable. You can provide public methods for those you
2199     * actually need in ScarabModule.
2200     */

2201    protected List JavaDoc getRModuleAttributesJoinIssueType(Criteria criteria)
2202        throws TorqueException
2203    {
2204        if (collRModuleAttributes == null)
2205        {
2206            if (isNew())
2207            {
2208               collRModuleAttributes = new ArrayList JavaDoc();
2209            }
2210            else
2211            {
2212                            criteria.add(RModuleAttributePeer.MODULE_ID, getModuleId() );
2213                            collRModuleAttributes = RModuleAttributePeer.doSelectJoinIssueType(criteria);
2214            }
2215        }
2216        else
2217        {
2218            // the following code is to determine if a new query is
2219
// called for. If the criteria is the same as the last
2220
// one, just return the collection.
2221

2222                            criteria.add(RModuleAttributePeer.MODULE_ID, getModuleId() );
2223                        if (!lastRModuleAttributesCriteria.equals(criteria))
2224            {
2225                collRModuleAttributes = RModuleAttributePeer.doSelectJoinIssueType(criteria);
2226            }
2227        }
2228        lastRModuleAttributesCriteria = criteria;
2229
2230        return collRModuleAttributes;
2231    }
2232                            
2233
2234
2235                          
2236            
2237    /**
2238     * Collection to store aggregation of collRModuleOptions
2239     */

2240    protected List JavaDoc collRModuleOptions;
2241
2242    /**
2243     * Temporary storage of collRModuleOptions to save a possible db hit in
2244     * the event objects are add to the collection, but the
2245     * complete collection is never requested.
2246     */

2247    protected void initRModuleOptions()
2248    {
2249        if (collRModuleOptions == null)
2250        {
2251            collRModuleOptions = new ArrayList JavaDoc();
2252        }
2253    }
2254
2255                  
2256    /**
2257     * Method called to associate a RModuleOption object to this object
2258     * through the RModuleOption foreign key attribute
2259     *
2260     * @param l RModuleOption
2261     * @throws TorqueException
2262     */

2263    public void addRModuleOption(RModuleOption l) throws TorqueException
2264    {
2265        getRModuleOptions().add(l);
2266        l.setModule((ScarabModule)this);
2267    }
2268
2269    /**
2270     * The criteria used to select the current contents of collRModuleOptions
2271     */

2272    private Criteria lastRModuleOptionsCriteria = null;
2273
2274    /**
2275     * If this collection has already been initialized, returns
2276     * the collection. Otherwise returns the results of
2277     * getRModuleOptions(new Criteria())
2278     *
2279     * @throws TorqueException
2280     */

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

2301    public List JavaDoc getRModuleOptions(Criteria criteria) throws TorqueException
2302    {
2303        if (collRModuleOptions == null)
2304        {
2305            if (isNew())
2306            {
2307               collRModuleOptions = new ArrayList JavaDoc();
2308            }
2309            else
2310            {
2311                      criteria.add(RModuleOptionPeer.MODULE_ID, getModuleId() );
2312                      collRModuleOptions = RModuleOptionPeer.doSelect(criteria);
2313            }
2314        }
2315        else
2316        {
2317            // criteria has no effect for a new object
2318
if (!isNew())
2319            {
2320                // the following code is to determine if a new query is
2321
// called for. If the criteria is the same as the last
2322
// one, just return the collection.
2323
criteria.add(RModuleOptionPeer.MODULE_ID, getModuleId() );
2324                      if (!lastRModuleOptionsCriteria.equals(criteria))
2325                {
2326                    collRModuleOptions = RModuleOptionPeer.doSelect(criteria);
2327                }
2328            }
2329        }
2330        lastRModuleOptionsCriteria = criteria;
2331
2332        return collRModuleOptions;
2333    }
2334
2335    /**
2336     * If this collection has already been initialized, returns
2337     * the collection. Otherwise returns the results of
2338     * getRModuleOptions(new Criteria(),Connection)
2339     * This method takes in the Connection also as input so that
2340     * referenced objects can also be obtained using a Connection
2341     * that is taken as input
2342     */

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

2364    public List JavaDoc getRModuleOptions(Criteria criteria,Connection JavaDoc con) throws TorqueException
2365    {
2366        if (collRModuleOptions == null)
2367        {
2368            if (isNew())
2369            {
2370               collRModuleOptions = new ArrayList JavaDoc();
2371            }
2372            else
2373            {
2374                       criteria.add(RModuleOptionPeer.MODULE_ID, getModuleId() );
2375                       collRModuleOptions = RModuleOptionPeer.doSelect(criteria,con);
2376             }
2377         }
2378         else
2379         {
2380             // criteria has no effect for a new object
2381
if (!isNew())
2382             {
2383                 // the following code is to determine if a new query is
2384
// called for. If the criteria is the same as the last
2385
// one, just return the collection.
2386
criteria.add(RModuleOptionPeer.MODULE_ID, getModuleId() );
2387                     if (!lastRModuleOptionsCriteria.equals(criteria))
2388                 {
2389                     collRModuleOptions = RModuleOptionPeer.doSelect(criteria,con);
2390                 }
2391             }
2392         }
2393         lastRModuleOptionsCriteria = criteria;
2394
2395         return collRModuleOptions;
2396     }
2397
2398                              
2399              
2400                    
2401                    
2402                                
2403                                                              
2404                                        
2405                    
2406                    
2407          
2408    /**
2409     * If this collection has already been initialized with
2410     * an identical criteria, it returns the collection.
2411     * Otherwise if this ScarabModule is new, it will return
2412     * an empty collection; or if this ScarabModule has previously
2413     * been saved, it will retrieve related RModuleOptions from storage.
2414     *
2415     * This method is protected by default in order to keep the public
2416     * api reasonable. You can provide public methods for those you
2417     * actually need in ScarabModule.
2418     */

2419    protected List JavaDoc getRModuleOptionsJoinAttributeOption(Criteria criteria)
2420        throws TorqueException
2421    {
2422        if (collRModuleOptions == null)
2423        {
2424            if (isNew())
2425            {
2426               collRModuleOptions = new ArrayList JavaDoc();
2427            }
2428            else
2429            {
2430                            criteria.add(RModuleOptionPeer.MODULE_ID, getModuleId() );
2431                            collRModuleOptions = RModuleOptionPeer.doSelectJoinAttributeOption(criteria);
2432            }
2433        }
2434        else
2435        {
2436            // the following code is to determine if a new query is
2437
// called for. If the criteria is the same as the last
2438
// one, just return the collection.
2439

2440                            criteria.add(RModuleOptionPeer.MODULE_ID, getModuleId() );
2441                        if (!lastRModuleOptionsCriteria.equals(criteria))
2442            {
2443                collRModuleOptions = RModuleOptionPeer.doSelectJoinAttributeOption(criteria);
2444            }
2445        }
2446        lastRModuleOptionsCriteria = criteria;
2447
2448        return collRModuleOptions;
2449    }
2450                  
2451                    
2452                              
2453                                
2454                                                              
2455                                        
2456                    
2457                    
2458          
2459    /**
2460     * If this collection has already been initialized with
2461     * an identical criteria, it returns the collection.
2462     * Otherwise if this ScarabModule is new, it will return
2463     * an empty collection; or if this ScarabModule has previously
2464     * been saved, it will retrieve related RModuleOptions from storage.
2465     *
2466     * This method is protected by default in order to keep the public
2467     * api reasonable. You can provide public methods for those you
2468     * actually need in ScarabModule.
2469     */

2470    protected List JavaDoc getRModuleOptionsJoinScarabModule(Criteria criteria)
2471        throws TorqueException
2472    {
2473        if (collRModuleOptions == null)
2474        {
2475            if (isNew())
2476            {
2477               collRModuleOptions = new ArrayList JavaDoc();
2478            }
2479            else
2480            {
2481                            criteria.add(RModuleOptionPeer.MODULE_ID, getModuleId() );
2482                            collRModuleOptions = RModuleOptionPeer.doSelectJoinScarabModule(criteria);
2483            }
2484        }
2485        else
2486        {
2487            // the following code is to determine if a new query is
2488
// called for. If the criteria is the same as the last
2489
// one, just return the collection.
2490

2491                            criteria.add(RModuleOptionPeer.MODULE_ID, getModuleId() );
2492                        if (!lastRModuleOptionsCriteria.equals(criteria))
2493            {
2494                collRModuleOptions = RModuleOptionPeer.doSelectJoinScarabModule(criteria);
2495            }
2496        }
2497        lastRModuleOptionsCriteria = criteria;
2498
2499        return collRModuleOptions;
2500    }
2501                  
2502                    
2503                    
2504                                
2505                                                              
2506                                        
2507                    
2508                    
2509          
2510    /**
2511     * If this collection has already been initialized with
2512     * an identical criteria, it returns the collection.
2513     * Otherwise if this ScarabModule is new, it will return
2514     * an empty collection; or if this ScarabModule has previously
2515     * been saved, it will retrieve related RModuleOptions from storage.
2516     *
2517     * This method is protected by default in order to keep the public
2518     * api reasonable. You can provide public methods for those you
2519     * actually need in ScarabModule.
2520     */

2521    protected List JavaDoc getRModuleOptionsJoinIssueType(Criteria criteria)
2522        throws TorqueException
2523    {
2524        if (collRModuleOptions == null)
2525        {
2526            if (isNew())
2527            {
2528               collRModuleOptions = new ArrayList JavaDoc();
2529            }
2530            else
2531            {
2532                            criteria.add(RModuleOptionPeer.MODULE_ID, getModuleId() );
2533                            collRModuleOptions = RModuleOptionPeer.doSelectJoinIssueType(criteria);
2534            }
2535        }
2536        else
2537        {
2538            // the following code is to determine if a new query is
2539
// called for. If the criteria is the same as the last
2540
// one, just return the collection.
2541

2542                            criteria.add(RModuleOptionPeer.MODULE_ID, getModuleId() );
2543                        if (!lastRModuleOptionsCriteria.equals(criteria))
2544            {
2545                collRModuleOptions = RModuleOptionPeer.doSelectJoinIssueType(criteria);
2546            }
2547        }
2548        lastRModuleOptionsCriteria = criteria;
2549
2550        return collRModuleOptions;
2551    }
2552                            
2553
2554
2555                          
2556            
2557    /**
2558     * Collection to store aggregation of collRModuleUserAttributes
2559     */

2560    protected List JavaDoc collRModuleUserAttributes;
2561
2562    /**
2563     * Temporary storage of collRModuleUserAttributes to save a possible db hit in
2564     * the event objects are add to the collection, but the
2565     * complete collection is never requested.
2566     */

2567    protected void initRModuleUserAttributes()
2568    {
2569        if (collRModuleUserAttributes == null)
2570        {
2571            collRModuleUserAttributes = new ArrayList JavaDoc();
2572        }
2573    }
2574
2575                  
2576    /**
2577     * Method called to associate a RModuleUserAttribute object to this object
2578     * through the RModuleUserAttribute foreign key attribute
2579     *
2580     * @param l RModuleUserAttribute
2581     * @throws TorqueException
2582     */

2583    public void addRModuleUserAttribute(RModuleUserAttribute l) throws TorqueException
2584    {
2585        getRModuleUserAttributes().add(l);
2586        l.setModule((ScarabModule)this);
2587    }
2588
2589    /**
2590     * The criteria used to select the current contents of collRModuleUserAttributes
2591     */

2592    private Criteria lastRModuleUserAttributesCriteria = null;
2593
2594    /**
2595     * If this collection has already been initialized, returns
2596     * the collection. Otherwise returns the results of
2597     * getRModuleUserAttributes(new Criteria())
2598     *
2599     * @throws TorqueException
2600     */

2601    public List JavaDoc getRModuleUserAttributes() throws TorqueException
2602    {
2603        if (collRModuleUserAttributes == null)
2604        {
2605            collRModuleUserAttributes = getRModuleUserAttributes(new Criteria(10));
2606        }
2607        return collRModuleUserAttributes;
2608    }
2609
2610    /**
2611     * If this collection has already been initialized with
2612     * an identical criteria, it returns the collection.
2613     * Otherwise if this ScarabModule has previously
2614     * been saved, it will retrieve related RModuleUserAttributes from storage.
2615     * If this ScarabModule is new, it will return
2616     * an empty collection or the current collection, the criteria
2617     * is ignored on a new object.
2618     *
2619     * @throws TorqueException
2620     */

2621    public List JavaDoc getRModuleUserAttributes(Criteria criteria) throws TorqueException
2622    {
2623        if (collRModuleUserAttributes == null)
2624        {
2625            if (isNew())
2626            {
2627               collRModuleUserAttributes = new ArrayList JavaDoc();
2628            }
2629            else
2630            {
2631                      criteria.add(RModuleUserAttributePeer.MODULE_ID, getModuleId() );
2632                      collRModuleUserAttributes = RModuleUserAttributePeer.doSelect(criteria);
2633            }
2634        }
2635        else
2636        {
2637            // criteria has no effect for a new object
2638
if (!isNew())
2639            {
2640                // the following code is to determine if a new query is
2641
// called for. If the criteria is the same as the last
2642
// one, just return the collection.
2643
criteria.add(RModuleUserAttributePeer.MODULE_ID, getModuleId() );
2644                      if (!lastRModuleUserAttributesCriteria.equals(criteria))
2645                {
2646                    collRModuleUserAttributes = RModuleUserAttributePeer.doSelect(criteria);
2647                }
2648            }
2649        }
2650        lastRModuleUserAttributesCriteria = criteria;
2651
2652        return collRModuleUserAttributes;
2653    }
2654
2655    /**
2656     * If this collection has already been initialized, returns
2657     * the collection. Otherwise returns the results of
2658     * getRModuleUserAttributes(new Criteria(),Connection)
2659     * This method takes in the Connection also as input so that
2660     * referenced objects can also be obtained using a Connection
2661     * that is taken as input
2662     */

2663    public List JavaDoc getRModuleUserAttributes(Connection JavaDoc con) throws TorqueException
2664    {
2665        if (collRModuleUserAttributes == null)
2666        {
2667            collRModuleUserAttributes = getRModuleUserAttributes(new Criteria(10),con);
2668        }
2669        return collRModuleUserAttributes;
2670    }
2671
2672    /**
2673     * If this collection has already been initialized with
2674     * an identical criteria, it returns the collection.
2675     * Otherwise if this ScarabModule has previously
2676     * been saved, it will retrieve related RModuleUserAttributes from storage.
2677     * If this ScarabModule is new, it will return
2678     * an empty collection or the current collection, the criteria
2679     * is ignored on a new object.
2680     * This method takes in the Connection also as input so that
2681     * referenced objects can also be obtained using a Connection
2682     * that is taken as input
2683     */

2684    public List JavaDoc getRModuleUserAttributes(Criteria criteria,Connection JavaDoc con) throws TorqueException
2685    {
2686        if (collRModuleUserAttributes == null)
2687        {
2688            if (isNew())
2689            {
2690               collRModuleUserAttributes = new ArrayList JavaDoc();
2691            }
2692            else
2693            {
2694                       criteria.add(RModuleUserAttributePeer.MODULE_ID, getModuleId() );
2695                       collRModuleUserAttributes = RModuleUserAttributePeer.doSelect(criteria,con);
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(RModuleUserAttributePeer.MODULE_ID, getModuleId() );
2707                     if (!lastRModuleUserAttributesCriteria.equals(criteria))
2708                 {
2709                     collRModuleUserAttributes = RModuleUserAttributePeer.doSelect(criteria,con);
2710                 }
2711             }
2712         }
2713         lastRModuleUserAttributesCriteria = criteria;
2714
2715         return collRModuleUserAttributes;
2716     }
2717
2718                                          
2719              
2720                    
2721                    
2722                                
2723                                                              
2724                                        
2725                    
2726                    
2727          
2728    /**
2729     * If this collection has already been initialized with
2730     * an identical criteria, it returns the collection.
2731     * Otherwise if this ScarabModule is new, it will return
2732     * an empty collection; or if this ScarabModule has previously
2733     * been saved, it will retrieve related RModuleUserAttributes from storage.
2734     *
2735     * This method is protected by default in order to keep the public
2736     * api reasonable. You can provide public methods for those you
2737     * actually need in ScarabModule.
2738     */

2739    protected List JavaDoc getRModuleUserAttributesJoinMITList(Criteria criteria)
2740        throws TorqueException
2741    {
2742        if (collRModuleUserAttributes == null)
2743        {
2744            if (isNew())
2745            {
2746               collRModuleUserAttributes = new ArrayList JavaDoc();
2747            }
2748            else
2749            {
2750                            criteria.add(RModuleUserAttributePeer.MODULE_ID, getModuleId() );
2751                            collRModuleUserAttributes = RModuleUserAttributePeer.doSelectJoinMITList(criteria);
2752            }
2753        }
2754        else
2755        {
2756            // the following code is to determine if a new query is
2757
// called for. If the criteria is the same as the last
2758
// one, just return the collection.
2759

2760                            criteria.add(RModuleUserAttributePeer.MODULE_ID, getModuleId() );
2761                        if (!lastRModuleUserAttributesCriteria.equals(criteria))
2762            {
2763                collRModuleUserAttributes = RModuleUserAttributePeer.doSelectJoinMITList(criteria);
2764            }
2765        }
2766        lastRModuleUserAttributesCriteria = criteria;
2767
2768        return collRModuleUserAttributes;
2769    }
2770                  
2771                    
2772                              
2773                                
2774                                                              
2775                                        
2776                    
2777                    
2778          
2779    /**
2780     * If this collection has already been initialized with
2781     * an identical criteria, it returns the collection.
2782     * Otherwise if this ScarabModule is new, it will return
2783     * an empty collection; or if this ScarabModule has previously
2784     * been saved, it will retrieve related RModuleUserAttributes from storage.
2785     *
2786     * This method is protected by default in order to keep the public
2787     * api reasonable. You can provide public methods for those you
2788     * actually need in ScarabModule.
2789     */

2790    protected List JavaDoc getRModuleUserAttributesJoinScarabModule(Criteria criteria)
2791        throws TorqueException
2792    {
2793        if (collRModuleUserAttributes == null)
2794        {
2795            if (isNew())
2796            {
2797               collRModuleUserAttributes = new ArrayList JavaDoc();
2798            }
2799            else
2800            {
2801                            criteria.add(RModuleUserAttributePeer.MODULE_ID, getModuleId() );
2802                            collRModuleUserAttributes = RModuleUserAttributePeer.doSelectJoinScarabModule(criteria);
2803            }
2804        }
2805        else
2806        {
2807            // the following code is to determine if a new query is
2808
// called for. If the criteria is the same as the last
2809
// one, just return the collection.
2810

2811                            criteria.add(RModuleUserAttributePeer.MODULE_ID, getModuleId() );
2812                        if (!lastRModuleUserAttributesCriteria.equals(criteria))
2813            {
2814                collRModuleUserAttributes = RModuleUserAttributePeer.doSelectJoinScarabModule(criteria);
2815            }
2816        }
2817        lastRModuleUserAttributesCriteria = criteria;
2818
2819        return collRModuleUserAttributes;
2820    }
2821                  
2822                    
2823                    
2824                                
2825                                                              
2826                                        
2827                    
2828                    
2829          
2830    /**
2831     * If this collection has already been initialized with
2832     * an identical criteria, it returns the collection.
2833     * Otherwise if this ScarabModule is new, it will return
2834     * an empty collection; or if this ScarabModule has previously
2835     * been saved, it will retrieve related RModuleUserAttributes from storage.
2836     *
2837     * This method is protected by default in order to keep the public
2838     * api reasonable. You can provide public methods for those you
2839     * actually need in ScarabModule.
2840     */

2841    protected List JavaDoc getRModuleUserAttributesJoinScarabUserImpl(Criteria criteria)
2842        throws TorqueException
2843    {
2844        if (collRModuleUserAttributes == null)
2845        {
2846            if (isNew())
2847            {
2848               collRModuleUserAttributes = new ArrayList JavaDoc();
2849            }
2850            else
2851            {
2852                            criteria.add(RModuleUserAttributePeer.MODULE_ID, getModuleId() );
2853                            collRModuleUserAttributes = RModuleUserAttributePeer.doSelectJoinScarabUserImpl(criteria);
2854            }
2855        }
2856        else
2857        {
2858            // the following code is to determine if a new query is
2859
// called for. If the criteria is the same as the last
2860
// one, just return the collection.
2861

2862                            criteria.add(RModuleUserAttributePeer.MODULE_ID, getModuleId() );
2863                        if (!lastRModuleUserAttributesCriteria.equals(criteria))
2864            {
2865                collRModuleUserAttributes = RModuleUserAttributePeer.doSelectJoinScarabUserImpl(criteria);
2866            }
2867        }
2868        lastRModuleUserAttributesCriteria = criteria;
2869
2870        return collRModuleUserAttributes;
2871    }
2872                  
2873                    
2874                    
2875                                
2876                                                              
2877                                        
2878                    
2879                    
2880          
2881    /**
2882     * If this collection has already been initialized with
2883     * an identical criteria, it returns the collection.
2884     * Otherwise if this ScarabModule is new, it will return
2885     * an empty collection; or if this ScarabModule has previously
2886     * been saved, it will retrieve related RModuleUserAttributes from storage.
2887     *
2888     * This method is protected by default in order to keep the public
2889     * api reasonable. You can provide public methods for those you
2890     * actually need in ScarabModule.
2891     */

2892    protected List JavaDoc getRModuleUserAttributesJoinIssueType(Criteria criteria)
2893        throws TorqueException
2894    {
2895        if (collRModuleUserAttributes == null)
2896        {
2897            if (isNew())
2898            {
2899               collRModuleUserAttributes = new ArrayList JavaDoc();
2900            }
2901            else
2902            {
2903                            criteria.add(RModuleUserAttributePeer.MODULE_ID, getModuleId() );
2904                            collRModuleUserAttributes = RModuleUserAttributePeer.doSelectJoinIssueType(criteria);
2905            }
2906        }
2907        else
2908        {
2909            // the following code is to determine if a new query is
2910
// called for. If the criteria is the same as the last
2911
// one, just return the collection.
2912

2913                            criteria.add(RModuleUserAttributePeer.MODULE_ID, getModuleId() );
2914                        if (!lastRModuleUserAttributesCriteria.equals(criteria))
2915            {
2916                collRModuleUserAttributes = RModuleUserAttributePeer.doSelectJoinIssueType(criteria);
2917            }
2918        }
2919        lastRModuleUserAttributesCriteria = criteria;
2920
2921        return collRModuleUserAttributes;
2922    }
2923                  
2924                    
2925                    
2926                                
2927                                                              
2928                                        
2929                    
2930                    
2931          
2932    /**
2933     * If this collection has already been initialized with
2934     * an identical criteria, it returns the collection.
2935     * Otherwise if this ScarabModule is new, it will return
2936     * an empty collection; or if this ScarabModule has previously
2937     * been saved, it will retrieve related RModuleUserAttributes from storage.
2938     *
2939     * This method is protected by default in order to keep the public
2940     * api reasonable. You can provide public methods for those you
2941     * actually need in ScarabModule.
2942     */

2943    protected List JavaDoc getRModuleUserAttributesJoinAttribute(Criteria criteria)
2944        throws TorqueException
2945    {
2946        if (collRModuleUserAttributes == null)
2947        {
2948            if (isNew())
2949            {
2950               collRModuleUserAttributes = new ArrayList JavaDoc();
2951            }
2952            else
2953            {
2954                            criteria.add(RModuleUserAttributePeer.MODULE_ID, getModuleId() );
2955                            collRModuleUserAttributes = RModuleUserAttributePeer.doSelectJoinAttribute(criteria);
2956            }
2957        }
2958        else
2959        {
2960            // the following code is to determine if a new query is
2961
// called for. If the criteria is the same as the last
2962
// one, just return the collection.
2963

2964                            criteria.add(RModuleUserAttributePeer.MODULE_ID, getModuleId() );
2965                        if (!lastRModuleUserAttributesCriteria.equals(criteria))
2966            {
2967                collRModuleUserAttributes = RModuleUserAttributePeer.doSelectJoinAttribute(criteria);
2968            }
2969        }
2970        lastRModuleUserAttributesCriteria = criteria;
2971
2972        return collRModuleUserAttributes;
2973    }
2974                            
2975
2976
2977                          
2978            
2979    /**
2980     * Collection to store aggregation of collUserVotes
2981     */

2982    protected List JavaDoc collUserVotes;
2983
2984    /**
2985     * Temporary storage of collUserVotes to save a possible db hit in
2986     * the event objects are add to the collection, but the
2987     * complete collection is never requested.
2988     */

2989    protected void initUserVotes()
2990    {
2991        if (collUserVotes == null)
2992        {
2993            collUserVotes = new ArrayList JavaDoc();
2994        }
2995    }
2996
2997                  
2998    /**
2999     * Method called to associate a UserVote object to this object
3000     * through the UserVote foreign key attribute
3001     *
3002     * @param l UserVote
3003     * @throws TorqueException
3004     */

3005    public void addUserVote(UserVote l) throws TorqueException
3006    {
3007        getUserVotes().add(l);
3008        l.setModule((ScarabModule)this);
3009    }
3010
3011    /**
3012     * The criteria used to select the current contents of collUserVotes
3013     */

3014    private Criteria lastUserVotesCriteria = null;
3015
3016    /**
3017     * If this collection has already been initialized, returns
3018     * the collection. Otherwise returns the results of
3019     * getUserVotes(new Criteria())
3020     *
3021     * @throws TorqueException
3022     */

3023    public List JavaDoc getUserVotes() throws TorqueException
3024    {
3025        if (collUserVotes == null)
3026        {
3027            collUserVotes = getUserVotes(new Criteria(10));
3028        }
3029        return collUserVotes;
3030    }
3031
3032    /**
3033     * If this collection has already been initialized with
3034     * an identical criteria, it returns the collection.
3035     * Otherwise if this ScarabModule has previously
3036     * been saved, it will retrieve related UserVotes from storage.
3037     * If this ScarabModule is new, it will return
3038     * an empty collection or the current collection, the criteria
3039     * is ignored on a new object.
3040     *
3041     * @throws TorqueException
3042     */

3043    public List JavaDoc getUserVotes(Criteria criteria) throws TorqueException
3044    {
3045        if (collUserVotes == null)
3046        {
3047            if (isNew())
3048            {
3049               collUserVotes = new ArrayList JavaDoc();
3050            }
3051            else
3052            {
3053                      criteria.add(UserVotePeer.MODULE_ID, getModuleId() );
3054                      collUserVotes = UserVotePeer.doSelect(criteria);
3055            }
3056        }
3057        else
3058        {
3059            // criteria has no effect for a new object
3060
if (!isNew())
3061            {
3062                // the following code is to determine if a new query is
3063
// called for. If the criteria is the same as the last
3064
// one, just return the collection.
3065
criteria.add(UserVotePeer.MODULE_ID, getModuleId() );
3066                      if (!lastUserVotesCriteria.equals(criteria))
3067                {
3068                    collUserVotes = UserVotePeer.doSelect(criteria);
3069                }
3070            }
3071        }
3072        lastUserVotesCriteria = criteria;
3073
3074        return collUserVotes;
3075    }
3076
3077    /**
3078     * If this collection has already been initialized, returns
3079     * the collection. Otherwise returns the results of
3080     * getUserVotes(new Criteria(),Connection)
3081     * This method takes in the Connection also as input so that
3082     * referenced objects can also be obtained using a Connection
3083     * that is taken as input
3084     */

3085    public List JavaDoc getUserVotes(Connection JavaDoc con) throws TorqueException
3086    {
3087        if (collUserVotes == null)
3088        {
3089            collUserVotes = getUserVotes(new Criteria(10),con);
3090        }
3091        return collUserVotes;
3092    }
3093
3094    /**
3095     * If this collection has already been initialized with
3096     * an identical criteria, it returns the collection.
3097     * Otherwise if this ScarabModule has previously
3098     * been saved, it will retrieve related UserVotes from storage.
3099     * If this ScarabModule is new, it will return
3100     * an empty collection or the current collection, the criteria
3101     * is ignored on a new object.
3102     * This method takes in the Connection also as input so that
3103     * referenced objects can also be obtained using a Connection
3104     * that is taken as input
3105     */

3106    public List JavaDoc getUserVotes(Criteria criteria,Connection JavaDoc con) throws TorqueException
3107    {
3108        if (collUserVotes == null)
3109        {
3110            if (isNew())
3111            {
3112               collUserVotes = new ArrayList JavaDoc();
3113            }
3114            else
3115            {
3116                       criteria.add(UserVotePeer.MODULE_ID, getModuleId() );
3117                       collUserVotes = UserVotePeer.doSelect(criteria,con);
3118             }
3119         }
3120         else
3121         {
3122             // criteria has no effect for a new object
3123
if (!isNew())
3124             {
3125                 // the following code is to determine if a new query is
3126
// called for. If the criteria is the same as the last
3127
// one, just return the collection.
3128
criteria.add(UserVotePeer.MODULE_ID, getModuleId() );
3129                     if (!lastUserVotesCriteria.equals(criteria))
3130                 {
3131                     collUserVotes = UserVotePeer.doSelect(criteria,con);
3132                 }
3133             }
3134         }
3135         lastUserVotesCriteria = criteria;
3136
3137         return collUserVotes;
3138     }
3139
3140                        
3141              
3142                    
3143                              
3144                                
3145                                                              
3146                                        
3147                    
3148                    
3149          
3150    /**
3151     * If this collection has already been initialized with
3152     * an identical criteria, it returns the collection.
3153     * Otherwise if this ScarabModule is new, it will return
3154     * an empty collection; or if this ScarabModule has previously
3155     * been saved, it will retrieve related UserVotes from storage.
3156     *
3157     * This method is protected by default in order to keep the public
3158     * api reasonable. You can provide public methods for those you
3159     * actually need in ScarabModule.
3160     */

3161    protected List JavaDoc getUserVotesJoinScarabModule(Criteria criteria)
3162        throws TorqueException
3163    {
3164        if (collUserVotes == null)
3165        {
3166            if (isNew())
3167            {
3168               collUserVotes = new ArrayList JavaDoc();
3169            }
3170            else
3171            {
3172                            criteria.add(UserVotePeer.MODULE_ID, getModuleId() );
3173                            collUserVotes = UserVotePeer.doSelectJoinScarabModule(criteria);
3174            }
3175        }
3176        else
3177        {
3178            // the following code is to determine if a new query is
3179
// called for. If the criteria is the same as the last
3180
// one, just return the collection.
3181

3182                            criteria.add(UserVotePeer.MODULE_ID, getModuleId() );
3183                        if (!lastUserVotesCriteria.equals(criteria))
3184            {
3185                collUserVotes = UserVotePeer.doSelectJoinScarabModule(criteria);
3186            }
3187        }
3188        lastUserVotesCriteria = criteria;
3189
3190        return collUserVotes;
3191    }
3192                  
3193                    
3194                    
3195                                
3196                                                              
3197                                        
3198                    
3199                    
3200          
3201    /**
3202     * If this collection has already been initialized with
3203     * an identical criteria, it returns the collection.
3204     * Otherwise if this ScarabModule is new, it will return
3205     * an empty collection; or if this ScarabModule has previously
3206     * been saved, it will retrieve related UserVotes from storage.
3207     *
3208     * This method is protected by default in order to keep the public
3209     * api reasonable. You can provide public methods for those you
3210     * actually need in ScarabModule.
3211     */

3212    protected List JavaDoc getUserVotesJoinScarabUserImpl(Criteria criteria)
3213        throws TorqueException
3214    {
3215        if (collUserVotes == null)
3216        {
3217            if (isNew())
3218            {
3219               collUserVotes = new ArrayList JavaDoc();
3220            }
3221            else
3222            {
3223                            criteria.add(UserVotePeer.MODULE_ID, getModuleId() );
3224                            collUserVotes = UserVotePeer.doSelectJoinScarabUserImpl(criteria);
3225            }
3226        }
3227        else
3228        {
3229            // the following code is to determine if a new query is
3230
// called for. If the criteria is the same as the last
3231
// one, just return the collection.
3232

3233                            criteria.add(UserVotePeer.MODULE_ID, getModuleId() );
3234                        if (!lastUserVotesCriteria.equals(criteria))
3235            {
3236                collUserVotes = UserVotePeer.doSelectJoinScarabUserImpl(criteria);
3237            }
3238        }
3239        lastUserVotesCriteria = criteria;
3240
3241        return collUserVotes;
3242    }
3243                            
3244
3245
3246                          
3247            
3248    /**
3249     * Collection to store aggregation of collQuerys
3250     */

3251    protected List JavaDoc collQuerys;
3252
3253    /**
3254     * Temporary storage of collQuerys to save a possible db hit in
3255     * the event objects are add to the collection, but the
3256     * complete collection is never requested.
3257     */

3258    protected void initQuerys()
3259    {
3260        if (collQuerys == null)
3261        {
3262            collQuerys = new ArrayList JavaDoc();
3263        }
3264    }
3265
3266                  
3267    /**
3268     * Method called to associate a Query object to this object
3269     * through the Query foreign key attribute
3270     *
3271     * @param l Query
3272     * @throws TorqueException
3273     */

3274    public void addQuery(Query l) throws TorqueException
3275    {
3276        getQuerys().add(l);
3277        l.setModule((ScarabModule)this);
3278    }
3279
3280    /**
3281     * The criteria used to select the current contents of collQuerys
3282     */

3283    private Criteria lastQuerysCriteria = null;
3284
3285    /**
3286     * If this collection has already been initialized, returns
3287     * the collection. Otherwise returns the results of
3288     * getQuerys(new Criteria())
3289     *
3290     * @throws TorqueException
3291     */

3292    public List JavaDoc getQuerys() throws TorqueException
3293    {
3294        if (collQuerys == null)
3295        {
3296            collQuerys = getQuerys(new Criteria(10));
3297        }
3298        return collQuerys;
3299    }
3300
3301    /**
3302     * If this collection has already been initialized with
3303     * an identical criteria, it returns the collection.
3304     * Otherwise if this ScarabModule has previously
3305     * been saved, it will retrieve related Querys from storage.
3306     * If this ScarabModule is new, it will return
3307     * an empty collection or the current collection, the criteria
3308     * is ignored on a new object.
3309     *
3310     * @throws TorqueException
3311     */

3312    public List JavaDoc getQuerys(Criteria criteria) throws TorqueException
3313    {
3314        if (collQuerys == null)
3315        {
3316            if (isNew())
3317            {
3318               collQuerys = new ArrayList JavaDoc();
3319            }
3320            else
3321            {
3322                      criteria.add(QueryPeer.MODULE_ID, getModuleId() );
3323                      collQuerys = QueryPeer.doSelect(criteria);
3324            }
3325        }
3326        else
3327        {
3328            // criteria has no effect for a new object
3329
if (!isNew())
3330            {
3331                // the following code is to determine if a new query is
3332
// called for. If the criteria is the same as the last
3333
// one, just return the collection.
3334
criteria.add(QueryPeer.MODULE_ID, getModuleId() );
3335                      if (!lastQuerysCriteria.equals(criteria))
3336                {
3337                    collQuerys = QueryPeer.doSelect(criteria);
3338                }
3339            }
3340        }
3341        lastQuerysCriteria = criteria;
3342
3343        return collQuerys;
3344    }
3345
3346    /**
3347     * If this collection has already been initialized, returns
3348     * the collection. Otherwise returns the results of
3349     * getQuerys(new Criteria(),Connection)
3350     * This method takes in the Connection also as input so that
3351     * referenced objects can also be obtained using a Connection
3352     * that is taken as input
3353     */

3354    public List JavaDoc getQuerys(Connection JavaDoc con) throws TorqueException
3355    {
3356        if (collQuerys == null)
3357        {
3358            collQuerys = getQuerys(new Criteria(10),con);
3359        }
3360        return collQuerys;
3361    }
3362
3363    /**
3364     * If this collection has already been initialized with
3365     * an identical criteria, it returns the collection.
3366     * Otherwise if this ScarabModule has previously
3367     * been saved, it will retrieve related Querys from storage.
3368     * If this ScarabModule is new, it will return
3369     * an empty collection or the current collection, the criteria
3370     * is ignored on a new object.
3371     * This method takes in the Connection also as input so that
3372     * referenced objects can also be obtained using a Connection
3373     * that is taken as input
3374     */

3375    public List JavaDoc getQuerys(Criteria criteria,Connection JavaDoc con) throws TorqueException
3376    {
3377        if (collQuerys == null)
3378        {
3379            if (isNew())
3380            {
3381               collQuerys = new ArrayList JavaDoc();
3382            }
3383            else
3384            {
3385                       criteria.add(QueryPeer.MODULE_ID, getModuleId() );
3386                       collQuerys = QueryPeer.doSelect(criteria,con);
3387             }
3388         }
3389         else
3390         {
3391             // criteria has no effect for a new object
3392
if (!isNew())
3393             {
3394                 // the following code is to determine if a new query is
3395
// called for. If the criteria is the same as the last
3396
// one, just return the collection.
3397
criteria.add(QueryPeer.MODULE_ID, getModuleId() );
3398                     if (!lastQuerysCriteria.equals(criteria))
3399                 {
3400                     collQuerys = QueryPeer.doSelect(criteria,con);
3401                 }
3402             }
3403         }
3404         lastQuerysCriteria = criteria;
3405
3406         return collQuerys;
3407     }
3408
3409                                                
3410              
3411                    
3412                    
3413                                
3414                                                              
3415                                        
3416                    
3417                    
3418          
3419    /**
3420     * If this collection has already been initialized with
3421     * an identical criteria, it returns the collection.
3422     * Otherwise if this ScarabModule is new, it will return
3423     * an empty collection; or if this ScarabModule has previously
3424     * been saved, it will retrieve related Querys from storage.
3425     *
3426     * This method is protected by default in order to keep the public
3427     * api reasonable. You can provide public methods for those you
3428     * actually need in ScarabModule.
3429     */

3430    protected List JavaDoc getQuerysJoinScarabUserImpl(Criteria criteria)
3431        throws TorqueException
3432    {
3433        if (collQuerys == null)
3434        {
3435            if (isNew())
3436            {
3437               collQuerys = new ArrayList JavaDoc();
3438            }
3439            else
3440            {
3441                            criteria.add(QueryPeer.MODULE_ID, getModuleId() );
3442                            collQuerys = QueryPeer.doSelectJoinScarabUserImpl(criteria);
3443            }
3444        }
3445        else
3446        {
3447            // the following code is to determine if a new query is
3448
// called for. If the criteria is the same as the last
3449
// one, just return the collection.
3450

3451                            criteria.add(QueryPeer.MODULE_ID, getModuleId() );
3452                        if (!lastQuerysCriteria.equals(criteria))
3453            {
3454                collQuerys = QueryPeer.doSelectJoinScarabUserImpl(criteria);
3455            }
3456        }
3457        lastQuerysCriteria = criteria;
3458
3459        return collQuerys;
3460    }
3461                  
3462                    
3463                    
3464                                
3465                                                              
3466                                        
3467                    
3468                    
3469          
3470    /**
3471     * If this collection has already been initialized with
3472     * an identical criteria, it returns the collection.
3473     * Otherwise if this ScarabModule is new, it will return
3474     * an empty collection; or if this ScarabModule has previously
3475     * been saved, it will retrieve related Querys from storage.
3476     *
3477     * This method is protected by default in order to keep the public
3478     * api reasonable. You can provide public methods for those you
3479     * actually need in ScarabModule.
3480     */

3481    protected List JavaDoc getQuerysJoinScope(Criteria criteria)
3482        throws TorqueException
3483    {
3484        if (collQuerys == null)
3485        {
3486            if (isNew())
3487            {
3488               collQuerys = new ArrayList JavaDoc();
3489            }
3490            else
3491            {
3492                            criteria.add(QueryPeer.MODULE_ID, getModuleId() );
3493                            collQuerys = QueryPeer.doSelectJoinScope(criteria);
3494            }
3495        }
3496        else
3497        {
3498            // the following code is to determine if a new query is
3499
// called for. If the criteria is the same as the last
3500
// one, just return the collection.
3501

3502                            criteria.add(QueryPeer.MODULE_ID, getModuleId() );
3503                        if (!lastQuerysCriteria.equals(criteria))
3504            {
3505                collQuerys = QueryPeer.doSelectJoinScope(criteria);
3506            }
3507        }
3508        lastQuerysCriteria = criteria;
3509
3510        return collQuerys;
3511    }
3512                  
3513                    
3514                              
3515                                
3516                                                              
3517                                        
3518                    
3519                    
3520          
3521    /**
3522     * If this collection has already been initialized with
3523     * an identical criteria, it returns the collection.
3524     * Otherwise if this ScarabModule is new, it will return
3525     * an empty collection; or if this ScarabModule has previously
3526     * been saved, it will retrieve related Querys from storage.
3527     *
3528     * This method is protected by default in order to keep the public
3529     * api reasonable. You can provide public methods for those you
3530     * actually need in ScarabModule.
3531     */

3532    protected List JavaDoc getQuerysJoinScarabModule(Criteria criteria)
3533        throws TorqueException
3534    {
3535        if (collQuerys == null)
3536        {
3537            if (isNew())
3538            {
3539               collQuerys = new ArrayList JavaDoc();
3540            }
3541            else
3542            {
3543                            criteria.add(QueryPeer.MODULE_ID, getModuleId() );
3544                            collQuerys = QueryPeer.doSelectJoinScarabModule(criteria);
3545            }
3546        }
3547        else
3548        {
3549            // the following code is to determine if a new query is
3550
// called for. If the criteria is the same as the last
3551
// one, just return the collection.
3552

3553                            criteria.add(QueryPeer.MODULE_ID, getModuleId() );
3554                        if (!lastQuerysCriteria.equals(criteria))
3555            {
3556                collQuerys = QueryPeer.doSelectJoinScarabModule(criteria);
3557            }
3558        }
3559        lastQuerysCriteria = criteria;
3560
3561        return collQuerys;
3562    }
3563                  
3564                    
3565                    
3566                                
3567                                                              
3568                                        
3569                    
3570                    
3571          
3572    /**
3573     * If this collection has already been initialized with
3574     * an identical criteria, it returns the collection.
3575     * Otherwise if this ScarabModule is new, it will return
3576     * an empty collection; or if this ScarabModule has previously
3577     * been saved, it will retrieve related Querys from storage.
3578     *
3579     * This method is protected by default in order to keep the public
3580     * api reasonable. You can provide public methods for those you
3581     * actually need in ScarabModule.
3582     */

3583    protected List JavaDoc getQuerysJoinIssueType(Criteria criteria)
3584        throws TorqueException
3585    {
3586        if (collQuerys == null)
3587        {
3588            if (isNew())
3589            {
3590               collQuerys = new ArrayList JavaDoc();
3591            }
3592            else
3593            {
3594                            criteria.add(QueryPeer.MODULE_ID, getModuleId() );
3595                            collQuerys = QueryPeer.doSelectJoinIssueType(criteria);
3596            }
3597        }
3598        else
3599        {
3600            // the following code is to determine if a new query is
3601
// called for. If the criteria is the same as the last
3602
// one, just return the collection.
3603

3604                            criteria.add(QueryPeer.MODULE_ID, getModuleId() );
3605                        if (!lastQuerysCriteria.equals(criteria))
3606            {
3607                collQuerys = QueryPeer.doSelectJoinIssueType(criteria);
3608            }
3609        }
3610        lastQuerysCriteria = criteria;
3611
3612        return collQuerys;
3613    }
3614                  
3615                    
3616                    
3617                                
3618                                                              
3619                                        
3620                    
3621                    
3622          
3623    /**
3624     * If this collection has already been initialized with
3625     * an identical criteria, it returns the collection.
3626     * Otherwise if this ScarabModule is new, it will return
3627     * an empty collection; or if this ScarabModule has previously
3628     * been saved, it will retrieve related Querys from storage.
3629     *
3630     * This method is protected by default in order to keep the public
3631     * api reasonable. You can provide public methods for those you
3632     * actually need in ScarabModule.
3633     */

3634    protected List JavaDoc getQuerysJoinMITList(Criteria criteria)
3635        throws TorqueException
3636    {
3637        if (collQuerys == null)
3638        {
3639            if (isNew())
3640            {
3641               collQuerys = new ArrayList JavaDoc();
3642            }
3643            else
3644            {
3645                            criteria.add(QueryPeer.MODULE_ID, getModuleId() );
3646                            collQuerys = QueryPeer.doSelectJoinMITList(criteria);
3647            }
3648        }
3649        else
3650        {
3651            // the following code is to determine if a new query is
3652
// called for. If the criteria is the same as the last
3653
// one, just return the collection.
3654

3655                            criteria.add(QueryPeer.MODULE_ID, getModuleId() );
3656                        if (!lastQuerysCriteria.equals(criteria))
3657            {
3658                collQuerys = QueryPeer.doSelectJoinMITList(criteria);
3659            }
3660        }
3661        lastQuerysCriteria = criteria;
3662
3663        return collQuerys;
3664    }
3665                  
3666                    
3667                    
3668                                
3669                                                              
3670                                        
3671                    
3672                    
3673          
3674    /**
3675     * If this collection has already been initialized with
3676     * an identical criteria, it returns the collection.
3677     * Otherwise if this ScarabModule is new, it will return
3678     * an empty collection; or if this ScarabModule has previously
3679     * been saved, it will retrieve related Querys from storage.
3680     *
3681     * This method is protected by default in order to keep the public
3682     * api reasonable. You can provide public methods for those you
3683     * actually need in ScarabModule.
3684     */

3685    protected List JavaDoc getQuerysJoinFrequency(Criteria criteria)
3686        throws TorqueException
3687    {
3688        if (collQuerys == null)
3689        {
3690            if (isNew())
3691            {
3692               collQuerys = new ArrayList JavaDoc();
3693            }
3694            else
3695            {
3696                            criteria.add(QueryPeer.MODULE_ID, getModuleId() );
3697                            collQuerys = QueryPeer.doSelectJoinFrequency(criteria);
3698            }
3699        }
3700        else
3701        {
3702            // the following code is to determine if a new query is
3703
// called for. If the criteria is the same as the last
3704
// one, just return the collection.
3705

3706                            criteria.add(QueryPeer.MODULE_ID, getModuleId() );
3707                        if (!lastQuerysCriteria.equals(criteria))
3708            {
3709                collQuerys = QueryPeer.doSelectJoinFrequency(criteria);
3710            }
3711        }
3712        lastQuerysCriteria = criteria;
3713
3714        return collQuerys;
3715    }
3716                            
3717
3718
3719                          
3720            
3721    /**
3722     * Collection to store aggregation of collReports
3723     */

3724    protected List JavaDoc collReports;
3725
3726    /**
3727     * Temporary storage of collReports to save a possible db hit in
3728     * the event objects are add to the collection, but the
3729     * complete collection is never requested.
3730     */

3731    protected void initReports()
3732    {
3733        if (collReports == null)
3734        {
3735            collReports = new ArrayList JavaDoc();
3736        }
3737    }
3738
3739                  
3740    /**
3741     * Method called to associate a Report object to this object
3742     * through the Report foreign key attribute
3743     *
3744     * @param l Report
3745     * @throws TorqueException
3746     */

3747    public void addReport(Report l) throws TorqueException
3748    {
3749        getReports().add(l);
3750        l.setModule((ScarabModule)this);
3751    }
3752
3753    /**
3754     * The criteria used to select the current contents of collReports
3755     */

3756    private Criteria lastReportsCriteria = null;
3757
3758    /**
3759     * If this collection has already been initialized, returns
3760     * the collection. Otherwise returns the results of
3761     * getReports(new Criteria())
3762     *
3763     * @throws TorqueException
3764     */

3765    public List JavaDoc getReports() throws TorqueException
3766    {
3767        if (collReports == null)
3768        {
3769            collReports = getReports(new Criteria(10));
3770        }
3771        return collReports;
3772    }
3773
3774    /**
3775     * If this collection has already been initialized with
3776     * an identical criteria, it returns the collection.
3777     * Otherwise if this ScarabModule has previously
3778     * been saved, it will retrieve related Reports from storage.
3779     * If this ScarabModule is new, it will return
3780     * an empty collection or the current collection, the criteria
3781     * is ignored on a new object.
3782     *
3783     * @throws TorqueException
3784     */

3785    public List JavaDoc getReports(Criteria criteria) throws TorqueException
3786    {
3787        if (collReports == null)
3788        {
3789            if (isNew())
3790            {
3791               collReports = new ArrayList JavaDoc();
3792            }
3793            else
3794            {
3795                      criteria.add(ReportPeer.MODULE_ID, getModuleId() );
3796                      collReports = ReportPeer.doSelect(criteria);
3797            }
3798        }
3799        else
3800        {
3801            // criteria has no effect for a new object
3802
if (!isNew())
3803            {
3804                // the following code is to determine if a new query is
3805
// called for. If the criteria is the same as the last
3806
// one, just return the collection.
3807
criteria.add(ReportPeer.MODULE_ID, getModuleId() );
3808                      if (!lastReportsCriteria.equals(criteria))
3809                {
3810                    collReports = ReportPeer.doSelect(criteria);
3811                }
3812            }
3813        }
3814        lastReportsCriteria = criteria;
3815
3816        return collReports;
3817    }
3818
3819    /**
3820     * If this collection has already been initialized, returns
3821     * the collection. Otherwise returns the results of
3822     * getReports(new Criteria(),Connection)
3823     * This method takes in the Connection also as input so that
3824     * referenced objects can also be obtained using a Connection
3825     * that is taken as input
3826     */

3827    public List JavaDoc getReports(Connection JavaDoc con) throws TorqueException
3828    {
3829        if (collReports == null)
3830        {
3831            collReports = getReports(new Criteria(10),con);
3832        }
3833        return collReports;
3834    }
3835
3836    /**
3837     * If this collection has already been initialized with
3838     * an identical criteria, it returns the collection.
3839     * Otherwise if this ScarabModule has previously
3840     * been saved, it will retrieve related Reports from storage.
3841     * If this ScarabModule is new, it will return
3842     * an empty collection or the current collection, the criteria
3843     * is ignored on a new object.
3844     * This method takes in the Connection also as input so that
3845     * referenced objects can also be obtained using a Connection
3846     * that is taken as input
3847     */

3848    public List JavaDoc getReports(Criteria criteria,Connection JavaDoc con) throws TorqueException
3849    {
3850        if (collReports == null)
3851        {
3852            if (isNew())
3853            {
3854               collReports = new ArrayList JavaDoc();
3855            }
3856            else
3857            {
3858                       criteria.add(ReportPeer.MODULE_ID, getModuleId() );
3859                       collReports = ReportPeer.doSelect(criteria,con);
3860             }
3861         }
3862         else
3863         {
3864             // criteria has no effect for a new object
3865
if (!isNew())
3866             {
3867                 // the following code is to determine if a new query is
3868
// called for. If the criteria is the same as the last
3869
// one, just return the collection.
3870
criteria.add(ReportPeer.MODULE_ID, getModuleId() );
3871                     if (!lastReportsCriteria.equals(criteria))
3872                 {
3873                     collReports = ReportPeer.doSelect(criteria,con);
3874                 }
3875             }
3876         }
3877         lastReportsCriteria = criteria;
3878
3879         return collReports;
3880     }
3881
3882                                    
3883              
3884                    
3885                    
3886                                
3887                                                              
3888                                        
3889                    
3890                    
3891          
3892    /**
3893     * If this collection has already been initialized with
3894     * an identical criteria, it returns the collection.
3895     * Otherwise if this ScarabModule is new, it will return
3896     * an empty collection; or if this ScarabModule has previously
3897     * been saved, it will retrieve related Reports from storage.
3898     *
3899     * This method is protected by default in order to keep the public
3900     * api reasonable. You can provide public methods for those you
3901     * actually need in ScarabModule.
3902     */

3903    protected List JavaDoc getReportsJoinIssueType(Criteria criteria)
3904        throws TorqueException
3905    {
3906        if (collReports == null)
3907        {
3908            if (isNew())
3909            {
3910               collReports = new ArrayList JavaDoc();
3911            }
3912            else
3913            {
3914                            criteria.add(ReportPeer.MODULE_ID, getModuleId() );
3915                            collReports = ReportPeer.doSelectJoinIssueType(criteria);
3916            }
3917        }
3918        else
3919        {
3920            // the following code is to determine if a new query is
3921
// called for. If the criteria is the same as the last
3922
// one, just return the collection.
3923

3924                            criteria.add(ReportPeer.MODULE_ID, getModuleId() );
3925                        if (!lastReportsCriteria.equals(criteria))
3926            {
3927                collReports = ReportPeer.doSelectJoinIssueType(criteria);
3928            }
3929        }
3930        lastReportsCriteria = criteria;
3931
3932        return collReports;
3933    }
3934                  
3935                    
3936                    
3937                                
3938                                                              
3939                                        
3940                    
3941                    
3942          
3943    /**
3944     * If this collection has already been initialized with
3945     * an identical criteria, it returns the collection.
3946     * Otherwise if this ScarabModule is new, it will return
3947     * an empty collection; or if this ScarabModule has previously
3948     * been saved, it will retrieve related Reports from storage.
3949     *
3950     * This method is protected by default in order to keep the public
3951     * api reasonable. You can provide public methods for those you
3952     * actually need in ScarabModule.
3953     */

3954    protected List JavaDoc getReportsJoinScarabUserImpl(Criteria criteria)
3955        throws TorqueException
3956    {
3957        if (collReports == null)
3958        {
3959            if (isNew())
3960            {
3961               collReports = new ArrayList JavaDoc();
3962            }
3963            else
3964            {
3965                            criteria.add(ReportPeer.MODULE_ID, getModuleId() );
3966                            collReports = ReportPeer.doSelectJoinScarabUserImpl(criteria);
3967            }
3968        }
3969        else
3970        {
3971            // the following code is to determine if a new query is
3972
// called for. If the criteria is the same as the last
3973
// one, just return the collection.
3974

3975                            criteria.add(ReportPeer.MODULE_ID, getModuleId() );
3976                        if (!lastReportsCriteria.equals(criteria))
3977            {
3978                collReports = ReportPeer.doSelectJoinScarabUserImpl(criteria);
3979            }
3980        }
3981        lastReportsCriteria = criteria;
3982
3983        return collReports;
3984    }
3985                  
3986                    
3987                              
3988                                
3989                                                              
3990                                        
3991                    
3992                    
3993          
3994    /**
3995     * If this collection has already been initialized with
3996     * an identical criteria, it returns the collection.
3997     * Otherwise if this ScarabModule is new, it will return
3998     * an empty collection; or if this ScarabModule has previously
3999     * been saved, it will retrieve related Reports from storage.
4000     *
4001     * This method is protected by default in order to keep the public
4002     * api reasonable. You can provide public methods for those you
4003     * actually need in ScarabModule.
4004     */

4005    protected List JavaDoc getReportsJoinScarabModule(Criteria criteria)
4006        throws TorqueException
4007    {
4008        if (collReports == null)
4009        {
4010            if (isNew())
4011            {
4012               collReports = new ArrayList JavaDoc();
4013            }
4014            else
4015            {
4016                            criteria.add(ReportPeer.MODULE_ID, getModuleId() );
4017                            collReports = ReportPeer.doSelectJoinScarabModule(criteria);
4018            }
4019        }
4020        else
4021        {
4022            // the following code is to determine if a new query is
4023
// called for. If the criteria is the same as the last
4024
// one, just return the collection.
4025

4026                            criteria.add(ReportPeer.MODULE_ID, getModuleId() );
4027                        if (!lastReportsCriteria.equals(criteria))
4028            {
4029                collReports = ReportPeer.doSelectJoinScarabModule(criteria);
4030            }
4031        }
4032        lastReportsCriteria = criteria;
4033
4034        return collReports;
4035    }
4036                  
4037                    
4038                    
4039                                
4040                                                              
4041                                        
4042                    
4043                    
4044          
4045    /**
4046     * If this collection has already been initialized with
4047     * an identical criteria, it returns the collection.
4048     * Otherwise if this ScarabModule is new, it will return
4049     * an empty collection; or if this ScarabModule has previously
4050     * been saved, it will retrieve related Reports from storage.
4051     *
4052     * This method is protected by default in order to keep the public
4053     * api reasonable. You can provide public methods for those you
4054     * actually need in ScarabModule.
4055     */

4056    protected List JavaDoc getReportsJoinScope(Criteria criteria)
4057        throws TorqueException
4058    {
4059        if (collReports == null)
4060        {
4061            if (isNew())
4062            {
4063               collReports = new ArrayList JavaDoc();
4064            }
4065            else
4066            {
4067                            criteria.add(ReportPeer.MODULE_ID, getModuleId() );
4068                            collReports = ReportPeer.doSelectJoinScope(criteria);
4069            }
4070        }
4071        else
4072        {
4073            // the following code is to determine if a new query is
4074
// called for. If the criteria is the same as the last
4075
// one, just return the collection.
4076

4077                            criteria.add(ReportPeer.MODULE_ID, getModuleId() );
4078                        if (!lastReportsCriteria.equals(criteria))
4079            {
4080                collReports = ReportPeer.doSelectJoinScope(criteria);
4081            }
4082        }
4083        lastReportsCriteria = criteria;
4084
4085        return collReports;
4086    }
4087                            
4088
4089
4090                          
4091            
4092    /**
4093     * Collection to store aggregation of collPendingGroupUserRoles
4094     */

4095    protected List JavaDoc collPendingGroupUserRoles;
4096
4097    /**
4098     * Temporary storage of collPendingGroupUserRoles to save a possible db hit in
4099     * the event objects are add to the collection, but the
4100     * complete collection is never requested.
4101     */

4102    protected void initPendingGroupUserRoles()
4103    {
4104        if (collPendingGroupUserRoles == null)
4105        {
4106            collPendingGroupUserRoles = new ArrayList JavaDoc();
4107        }
4108    }
4109
4110                  
4111    /**
4112     * Method called to associate a PendingGroupUserRole object to this object
4113     * through the PendingGroupUserRole foreign key attribute
4114     *
4115     * @param l PendingGroupUserRole
4116     * @throws TorqueException
4117     */

4118    public void addPendingGroupUserRole(PendingGroupUserRole l) throws TorqueException
4119    {
4120        getPendingGroupUserRoles().add(l);
4121        l.setModule((ScarabModule)this);
4122    }
4123
4124    /**
4125     * The criteria used to select the current contents of collPendingGroupUserRoles
4126     */

4127    private Criteria lastPendingGroupUserRolesCriteria = null;
4128
4129    /**
4130     * If this collection has already been initialized, returns
4131     * the collection. Otherwise returns the results of
4132     * getPendingGroupUserRoles(new Criteria())
4133     *
4134     * @throws TorqueException
4135     */

4136    public List JavaDoc getPendingGroupUserRoles() throws TorqueException
4137    {
4138        if (collPendingGroupUserRoles == null)
4139        {
4140            collPendingGroupUserRoles = getPendingGroupUserRoles(new Criteria(10));
4141        }
4142        return collPendingGroupUserRoles;
4143    }
4144
4145    /**
4146     * If this collection has already been initialized with
4147     * an identical criteria, it returns the collection.
4148     * Otherwise if this ScarabModule has previously
4149     * been saved, it will retrieve related PendingGroupUserRoles from storage.
4150     * If this ScarabModule is new, it will return
4151     * an empty collection or the current collection, the criteria
4152     * is ignored on a new object.
4153     *
4154     * @throws TorqueException
4155     */

4156    public List JavaDoc getPendingGroupUserRoles(Criteria criteria) throws TorqueException
4157    {
4158        if (collPendingGroupUserRoles == null)
4159        {
4160            if (isNew())
4161            {
4162               collPendingGroupUserRoles = new ArrayList JavaDoc();
4163            }
4164            else
4165            {
4166                      criteria.add(PendingGroupUserRolePeer.GROUP_ID, getModuleId() );
4167                      collPendingGroupUserRoles = PendingGroupUserRolePeer.doSelect(criteria);
4168            }
4169        }
4170        else
4171        {
4172            // criteria has no effect for a new object
4173
if (!isNew())
4174            {
4175                // the following code is to determine if a new query is
4176
// called for. If the criteria is the same as the last
4177
// one, just return the collection.
4178
criteria.add(PendingGroupUserRolePeer.GROUP_ID, getModuleId() );
4179                      if (!lastPendingGroupUserRolesCriteria.equals(criteria))
4180                {
4181                    collPendingGroupUserRoles = PendingGroupUserRolePeer.doSelect(criteria);
4182                }
4183            }
4184        }
4185        lastPendingGroupUserRolesCriteria = criteria;
4186
4187        return collPendingGroupUserRoles;
4188    }
4189
4190    /**
4191     * If this collection has already been initialized, returns
4192     * the collection. Otherwise returns the results of
4193     * getPendingGroupUserRoles(new Criteria(),Connection)
4194     * This method takes in the Connection also as input so that
4195     * referenced objects can also be obtained using a Connection
4196     * that is taken as input
4197     */

4198    public List JavaDoc getPendingGroupUserRoles(Connection JavaDoc con) throws TorqueException
4199    {
4200        if (collPendingGroupUserRoles == null)
4201        {
4202            collPendingGroupUserRoles = getPendingGroupUserRoles(new Criteria(10),con);
4203        }
4204        return collPendingGroupUserRoles;
4205    }
4206
4207    /**
4208     * If this collection has already been initialized with
4209     * an identical criteria, it returns the collection.
4210     * Otherwise if this ScarabModule has previously
4211     * been saved, it will retrieve related PendingGroupUserRoles from storage.
4212     * If this ScarabModule is new, it will return
4213     * an empty collection or the current collection, the criteria
4214     * is ignored on a new object.
4215     * This method takes in the Connection also as input so that
4216     * referenced objects can also be obtained using a Connection
4217     * that is taken as input
4218     */

4219    public List JavaDoc getPendingGroupUserRoles(Criteria criteria,Connection JavaDoc con) throws TorqueException
4220    {
4221        if (collPendingGroupUserRoles == null)
4222        {
4223            if (isNew())
4224            {
4225               collPendingGroupUserRoles = new ArrayList JavaDoc();
4226            }
4227            else
4228            {
4229                       criteria.add(PendingGroupUserRolePeer.GROUP_ID, getModuleId() );
4230                       collPendingGroupUserRoles = PendingGroupUserRolePeer.doSelect(criteria,con);
4231             }
4232         }
4233         else
4234         {
4235             // criteria has no effect for a new object
4236
if (!isNew())
4237             {
4238                 // the following code is to determine if a new query is
4239
// called for. If the criteria is the same as the last
4240
// one, just return the collection.
4241
criteria.add(PendingGroupUserRolePeer.GROUP_ID, getModuleId() );
4242                     if (!lastPendingGroupUserRolesCriteria.equals(criteria))
4243                 {
4244                     collPendingGroupUserRoles = PendingGroupUserRolePeer.doSelect(criteria,con);
4245                 }
4246             }
4247         }
4248         lastPendingGroupUserRolesCriteria = criteria;
4249
4250         return collPendingGroupUserRoles;
4251     }
4252
4253                        
4254              
4255                    
4256                    
4257                                
4258                                                              
4259                                        
4260                    
4261                    
4262          
4263    /**
4264     * If this collection has already been initialized with
4265     * an identical criteria, it returns the collection.
4266     * Otherwise if this ScarabModule is new, it will return
4267     * an empty collection; or if this ScarabModule has previously
4268     * been saved, it will retrieve related PendingGroupUserRoles from storage.
4269     *
4270     * This method is protected by default in order to keep the public
4271     * api reasonable. You can provide public methods for those you
4272     * actually need in ScarabModule.
4273     */

4274    protected List JavaDoc getPendingGroupUserRolesJoinScarabUserImpl(Criteria criteria)
4275        throws TorqueException
4276    {
4277        if (collPendingGroupUserRoles == null)
4278        {
4279            if (isNew())
4280            {
4281               collPendingGroupUserRoles = new ArrayList JavaDoc();
4282            }
4283            else
4284            {
4285                            criteria.add(PendingGroupUserRolePeer.GROUP_ID, getModuleId() );
4286                            collPendingGroupUserRoles = PendingGroupUserRolePeer.doSelectJoinScarabUserImpl(criteria);
4287            }
4288        }
4289        else
4290        {
4291            // the following code is to determine if a new query is
4292
// called for. If the criteria is the same as the last
4293
// one, just return the collection.
4294

4295                            criteria.add(PendingGroupUserRolePeer.GROUP_ID, getModuleId() );
4296                        if (!lastPendingGroupUserRolesCriteria.equals(criteria))
4297            {
4298                collPendingGroupUserRoles = PendingGroupUserRolePeer.doSelectJoinScarabUserImpl(criteria);
4299            }
4300        }
4301        lastPendingGroupUserRolesCriteria = criteria;
4302
4303        return collPendingGroupUserRoles;
4304    }
4305                  
4306                    
4307                              
4308                                
4309                                                              
4310                                        
4311                    
4312                    
4313          
4314    /**
4315     * If this collection has already been initialized with
4316     * an identical criteria, it returns the collection.
4317     * Otherwise if this ScarabModule is new, it will return
4318     * an empty collection; or if this ScarabModule has previously
4319     * been saved, it will retrieve related PendingGroupUserRoles from storage.
4320     *
4321     * This method is protected by default in order to keep the public
4322     * api reasonable. You can provide public methods for those you
4323     * actually need in ScarabModule.
4324     */

4325    protected List JavaDoc getPendingGroupUserRolesJoinScarabModule(Criteria criteria)
4326        throws TorqueException
4327    {
4328        if (collPendingGroupUserRoles == null)
4329        {
4330            if (isNew())
4331            {
4332               collPendingGroupUserRoles = new ArrayList JavaDoc();
4333            }
4334            else
4335            {
4336                            criteria.add(PendingGroupUserRolePeer.GROUP_ID, getModuleId() );
4337                            collPendingGroupUserRoles = PendingGroupUserRolePeer.doSelectJoinScarabModule(criteria);
4338            }
4339        }
4340        else
4341        {
4342            // the following code is to determine if a new query is
4343
// called for. If the criteria is the same as the last
4344
// one, just return the collection.
4345

4346                            criteria.add(PendingGroupUserRolePeer.GROUP_ID, getModuleId() );
4347                        if (!lastPendingGroupUserRolesCriteria.equals(criteria))
4348            {
4349                collPendingGroupUserRoles = PendingGroupUserRolePeer.doSelectJoinScarabModule(criteria);
4350            }
4351        }
4352        lastPendingGroupUserRolesCriteria = criteria;
4353
4354        return collPendingGroupUserRoles;
4355    }
4356                            
4357
4358
4359                          
4360            
4361    /**
4362     * Collection to store aggregation of collGlobalParameters
4363     */

4364    protected List JavaDoc collGlobalParameters;
4365
4366    /**
4367     * Temporary storage of collGlobalParameters to save a possible db hit in
4368     * the event objects are add to the collection, but the
4369     * complete collection is never requested.
4370     */

4371    protected void initGlobalParameters()
4372    {
4373        if (collGlobalParameters == null)
4374        {
4375            collGlobalParameters = new ArrayList JavaDoc();
4376        }
4377    }
4378
4379                  
4380    /**
4381     * Method called to associate a GlobalParameter object to this object
4382     * through the GlobalParameter foreign key attribute
4383     *
4384     * @param l GlobalParameter
4385     * @throws TorqueException
4386     */

4387    public void addGlobalParameter(GlobalParameter l) throws TorqueException
4388    {
4389        getGlobalParameters().add(l);
4390        l.setModule((ScarabModule)this);
4391    }
4392
4393    /**
4394     * The criteria used to select the current contents of collGlobalParameters
4395     */

4396    private Criteria lastGlobalParametersCriteria = null;
4397
4398    /**
4399     * If this collection has already been initialized, returns
4400     * the collection. Otherwise returns the results of
4401     * getGlobalParameters(new Criteria())
4402     *
4403     * @throws TorqueException
4404     */

4405    public List JavaDoc getGlobalParameters() throws TorqueException
4406    {
4407        if (collGlobalParameters == null)
4408        {
4409            collGlobalParameters = getGlobalParameters(new Criteria(10));
4410        }
4411        return collGlobalParameters;
4412    }
4413
4414    /**
4415     * If this collection has already been initialized with
4416     * an identical criteria, it returns the collection.
4417     * Otherwise if this ScarabModule has previously
4418     * been saved, it will retrieve related GlobalParameters from storage.
4419     * If this ScarabModule is new, it will return
4420     * an empty collection or the current collection, the criteria
4421     * is ignored on a new object.
4422     *
4423     * @throws TorqueException
4424     */

4425    public List JavaDoc getGlobalParameters(Criteria criteria) throws TorqueException
4426    {
4427        if (collGlobalParameters == null)
4428        {
4429            if (isNew())
4430            {
4431               collGlobalParameters = new ArrayList JavaDoc();
4432            }
4433            else
4434            {
4435                      criteria.add(GlobalParameterPeer.MODULE_ID, getModuleId() );
4436                      collGlobalParameters = GlobalParameterPeer.doSelect(criteria);
4437            }
4438        }
4439        else
4440        {
4441            // criteria has no effect for a new object
4442
if (!isNew())
4443            {
4444                // the following code is to determine if a new query is
4445
// called for. If the criteria is the same as the last
4446
// one, just return the collection.
4447
criteria.add(GlobalParameterPeer.MODULE_ID, getModuleId() );
4448                      if (!lastGlobalParametersCriteria.equals(criteria))
4449                {
4450                    collGlobalParameters = GlobalParameterPeer.doSelect(criteria);
4451                }
4452            }
4453        }
4454        lastGlobalParametersCriteria = criteria;
4455
4456        return collGlobalParameters;
4457    }
4458
4459    /**
4460     * If this collection has already been initialized, returns
4461     * the collection. Otherwise returns the results of
4462     * getGlobalParameters(new Criteria(),Connection)
4463     * This method takes in the Connection also as input so that
4464     * referenced objects can also be obtained using a Connection
4465     * that is taken as input
4466     */

4467    public List JavaDoc getGlobalParameters(Connection JavaDoc con) throws TorqueException
4468    {
4469        if (collGlobalParameters == null)
4470        {
4471            collGlobalParameters = getGlobalParameters(new Criteria(10),con);
4472        }
4473        return collGlobalParameters;
4474    }
4475
4476    /**
4477     * If this collection has already been initialized with
4478     * an identical criteria, it returns the collection.
4479     * Otherwise if this ScarabModule has previously
4480     * been saved, it will retrieve related GlobalParameters from storage.
4481     * If this ScarabModule is new, it will return
4482     * an empty collection or the current collection, the criteria
4483     * is ignored on a new object.
4484     * This method takes in the Connection also as input so that
4485     * referenced objects can also be obtained using a Connection
4486     * that is taken as input
4487     */

4488    public List JavaDoc getGlobalParameters(Criteria criteria,Connection JavaDoc con) throws TorqueException
4489    {
4490        if (collGlobalParameters == null)
4491        {
4492            if (isNew())
4493            {
4494               collGlobalParameters = new ArrayList JavaDoc();
4495            }
4496            else
4497            {
4498                       criteria.add(GlobalParameterPeer.MODULE_ID, getModuleId() );
4499                       collGlobalParameters = GlobalParameterPeer.doSelect(criteria,con);
4500             }
4501         }
4502         else
4503         {
4504             // criteria has no effect for a new object
4505
if (!isNew())
4506             {
4507                 // the following code is to determine if a new query is
4508
// called for. If the criteria is the same as the last
4509
// one, just return the collection.
4510
criteria.add(GlobalParameterPeer.MODULE_ID, getModuleId() );
4511                     if (!lastGlobalParametersCriteria.equals(criteria))
4512                 {
4513                     collGlobalParameters = GlobalParameterPeer.doSelect(criteria,con);
4514                 }
4515             }
4516         }
4517         lastGlobalParametersCriteria = criteria;
4518
4519         return collGlobalParameters;
4520     }
4521
4522                  
4523              
4524                    
4525                              
4526                                
4527                                                              
4528                                        
4529                    
4530                    
4531          
4532    /**
4533     * If this collection has already been initialized with
4534     * an identical criteria, it returns the collection.
4535     * Otherwise if this ScarabModule is new, it will return
4536     * an empty collection; or if this ScarabModule has previously
4537     * been saved, it will retrieve related GlobalParameters from storage.
4538     *
4539     * This method is protected by default in order to keep the public
4540     * api reasonable. You can provide public methods for those you
4541     * actually need in ScarabModule.
4542     */

4543    protected List JavaDoc getGlobalParametersJoinScarabModule(Criteria criteria)
4544        throws TorqueException
4545    {
4546        if (collGlobalParameters == null)
4547        {
4548            if (isNew())
4549            {
4550               collGlobalParameters = new ArrayList JavaDoc();
4551            }
4552            else
4553            {
4554                            criteria.add(GlobalParameterPeer.MODULE_ID, getModuleId() );
4555                            collGlobalParameters = GlobalParameterPeer.doSelectJoinScarabModule(criteria);
4556            }
4557        }
4558        else
4559        {
4560            // the following code is to determine if a new query is
4561
// called for. If the criteria is the same as the last
4562
// one, just return the collection.
4563

4564                            criteria.add(GlobalParameterPeer.MODULE_ID, getModuleId() );
4565                        if (!lastGlobalParametersCriteria.equals(criteria))
4566            {
4567                collGlobalParameters = GlobalParameterPeer.doSelectJoinScarabModule(criteria);
4568            }
4569        }
4570        lastGlobalParametersCriteria = criteria;
4571
4572        return collGlobalParameters;
4573    }
4574                            
4575
4576
4577          
4578    private static List JavaDoc fieldNames = null;
4579
4580    /**
4581     * Generate a list of field names.
4582     *
4583     * @return a list of field names
4584     */

4585    public static synchronized List JavaDoc getFieldNames()
4586    {
4587        if (fieldNames == null)
4588        {
4589            fieldNames = new ArrayList JavaDoc();
4590              fieldNames.add("ModuleId");
4591              fieldNames.add("RealName");
4592              fieldNames.add("Domain");
4593              fieldNames.add("Code");
4594              fieldNames.add("Description");
4595              fieldNames.add("Url");
4596              fieldNames.add("ArchiveEmail");
4597              fieldNames.add("ParentId");
4598              fieldNames.add("OwnerId");
4599              fieldNames.add("QaContactId");
4600              fieldNames.add("Deleted");
4601              fieldNames.add("Locked");
4602              fieldNames.add("ClassKey");
4603              fieldNames = Collections.unmodifiableList(fieldNames);
4604        }
4605        return fieldNames;
4606    }
4607
4608    /**
4609     * Retrieves a field from the object by name passed in as a String.
4610     *
4611     * @param name field name
4612     * @return value
4613     */

4614    public Object JavaDoc getByName(String JavaDoc name)
4615    {
4616          if (name.equals("ModuleId"))
4617        {
4618                return getModuleId();
4619            }
4620          if (name.equals("RealName"))
4621        {
4622                return getRealName();
4623            }
4624          if (name.equals("Domain"))
4625        {
4626                return getDomain();
4627            }
4628          if (name.equals("Code"))
4629        {
4630                return getCode();
4631            }
4632          if (name.equals("Description"))
4633        {
4634                return getDescription();
4635            }
4636          if (name.equals("Url"))
4637        {
4638                return getUrl();
4639            }
4640          if (name.equals("ArchiveEmail"))
4641        {
4642                return getArchiveEmail();
4643            }
4644          if (name.equals("ParentId"))
4645        {
4646                return getParentId();
4647            }
4648          if (name.equals("OwnerId"))
4649        {
4650                return getOwnerId();
4651            }
4652          if (name.equals("QaContactId"))
4653        {
4654                return getQaContactId();
4655            }
4656          if (name.equals("Deleted"))
4657        {
4658                return Boolean.valueOf(getDeleted());
4659            }
4660          if (name.equals("Locked"))
4661        {
4662                return Boolean.valueOf(getLocked());
4663            }
4664          if (name.equals("ClassKey"))
4665        {
4666                return new Integer JavaDoc(getClassKey());
4667            }
4668          return null;
4669    }
4670    
4671    /**
4672     * Retrieves a field from the object by name passed in
4673     * as a String. The String must be one of the static
4674     * Strings defined in this Class' Peer.
4675     *
4676     * @param name peer name
4677     * @return value
4678     */

4679    public Object JavaDoc getByPeerName(String JavaDoc name)
4680    {
4681          if (name.equals(ScarabModulePeer.MODULE_ID))
4682        {
4683                return getModuleId();
4684            }
4685          if (name.equals(ScarabModulePeer.MODULE_NAME))
4686        {
4687                return getRealName();
4688            }
4689          if (name.equals(ScarabModulePeer.DOMAIN))
4690        {
4691                return getDomain();
4692            }
4693          if (name.equals(ScarabModulePeer.MODULE_CODE))
4694        {
4695                return getCode();
4696            }
4697          if (name.equals(ScarabModulePeer.MODULE_DESCRIPTION))
4698        {
4699                return getDescription();
4700            }
4701          if (name.equals(ScarabModulePeer.MODULE_URL))
4702        {
4703                return getUrl();
4704            }
4705          if (name.equals(ScarabModulePeer.ARCHIVE_EMAIL))
4706        {
4707                return getArchiveEmail();
4708            }
4709          if (name.equals(ScarabModulePeer.PARENT_ID))
4710        {
4711                return getParentId();
4712            }
4713          if (name.equals(ScarabModulePeer.OWNER_ID))
4714        {
4715                return getOwnerId();
4716            }
4717          if (name.equals(ScarabModulePeer.QA_CONTACT_ID))
4718        {
4719                return getQaContactId();
4720            }
4721          if (name.equals(ScarabModulePeer.DELETED))
4722        {
4723                return Boolean.valueOf(getDeleted());
4724            }
4725          if (name.equals(ScarabModulePeer.LOCKED))
4726        {
4727                return Boolean.valueOf(getLocked());
4728            }
4729          if (name.equals(ScarabModulePeer.CLASS_KEY))
4730        {
4731                return new Integer JavaDoc(getClassKey());
4732            }
4733          return null;
4734    }
4735
4736    /**
4737     * Retrieves a field from the object by Position as specified
4738     * in the xml schema. Zero-based.
4739     *
4740     * @param pos position in xml schema
4741     * @return value
4742     */

4743    public Object JavaDoc getByPosition(int pos)
4744    {
4745            if (pos == 0)
4746        {
4747                return getModuleId();
4748            }
4749              if (pos == 1)
4750        {
4751                return getRealName();
4752            }
4753              if (pos == 2)
4754        {
4755                return getDomain();
4756            }
4757              if (pos == 3)
4758        {
4759                return getCode();
4760            }
4761              if (pos == 4)
4762        {
4763                return getDescription();
4764            }
4765              if (pos == 5)
4766        {
4767                return getUrl();
4768            }
4769              if (pos == 6)
4770        {
4771                return getArchiveEmail();
4772            }
4773              if (pos == 7)
4774        {
4775                return getParentId();
4776            }
4777              if (pos == 8)
4778        {
4779                return getOwnerId();
4780            }
4781              if (pos == 9)
4782        {
4783                return getQaContactId();
4784            }
4785              if (pos == 10)
4786        {
4787                return Boolean.valueOf(getDeleted());
4788            }
4789              if (pos == 11)
4790        {
4791                return Boolean.valueOf(getLocked());
4792            }
4793              if (pos == 12)
4794        {
4795                return new Integer JavaDoc(getClassKey());
4796            }
4797              return null;
4798    }
4799     
4800    /**
4801     * Stores the object in the database. If the object is new,
4802     * it inserts it; otherwise an update is performed.
4803     *
4804     * @throws Exception
4805     */

4806    public void save() throws Exception JavaDoc
4807    {
4808          save(ScarabModulePeer.getMapBuilder()
4809                .getDatabaseMap().getName());
4810      }
4811
4812    /**
4813     * Stores the object in the database. If the object is new,
4814     * it inserts it; otherwise an update is performed.
4815       * Note: this code is here because the method body is
4816     * auto-generated conditionally and therefore needs to be
4817     * in this file instead of in the super class, BaseObject.
4818       *
4819     * @param dbName
4820     * @throws TorqueException
4821     */

4822    public void save(String JavaDoc dbName) throws TorqueException
4823    {
4824        Connection JavaDoc con = null;
4825          try
4826        {
4827            con = Transaction.begin(dbName);
4828            save(con);
4829            Transaction.commit(con);
4830        }
4831        catch(TorqueException e)
4832        {
4833            Transaction.safeRollback(con);
4834            throw e;
4835        }
4836      }
4837
4838      /** flag to prevent endless save loop, if this object is referenced
4839        by another object which falls in this transaction. */

4840    private boolean alreadyInSave = false;
4841      /**
4842     * Stores the object in the database. If the object is new,
4843     * it inserts it; otherwise an update is performed. This method
4844     * is meant to be used as part of a transaction, otherwise use
4845     * the save() method and the connection details will be handled
4846     * internally
4847     *
4848     * @param con
4849     * @throws TorqueException
4850     */

4851    public void save(Connection JavaDoc con) throws TorqueException
4852    {
4853          if (!alreadyInSave)
4854        {
4855            alreadyInSave = true;
4856
4857
4858  
4859            // If this object has been modified, then save it to the database.
4860
if (isModified())
4861            {
4862                if (isNew())
4863                {
4864                    ScarabModulePeer.doInsert((ScarabModule)this, con);
4865                    setNew(false);
4866                }
4867                else
4868                {
4869                    ScarabModulePeer.doUpdate((ScarabModule)this, con);
4870                }
4871
4872                          if (isCacheOnSave())
4873                {
4874                    ModuleManager.putInstance(this);
4875                }
4876              }
4877
4878                                      
4879                            if (collAttributeGroups != null)
4880            {
4881                for (int i = 0; i < collAttributeGroups.size(); i++)
4882                {
4883                    ((AttributeGroup)collAttributeGroups.get(i)).save(con);
4884                }
4885            }
4886                                          
4887                            if (collIssues != null)
4888            {
4889                for (int i = 0; i < collIssues.size(); i++)
4890                {
4891                    ((Issue)collIssues.get(i)).save(con);
4892                }
4893            }
4894                                          
4895                            if (collRModuleIssueTypes != null)
4896            {
4897                for (int i = 0; i < collRModuleIssueTypes.size(); i++)
4898                {
4899                    ((RModuleIssueType)collRModuleIssueTypes.get(i)).save(con);
4900                }
4901            }
4902                                          
4903                            if (collMITListItems != null)
4904            {
4905                for (int i = 0; i < collMITListItems.size(); i++)
4906                {
4907                    ((MITListItem)collMITListItems.get(i)).save(con);
4908                }
4909            }
4910                                                    
4911                            if (collRModuleAttributes != null)
4912            {
4913                for (int i = 0; i < collRModuleAttributes.size(); i++)
4914                {
4915                    ((RModuleAttribute)collRModuleAttributes.get(i)).save(con);
4916                }
4917            }
4918                                          
4919                            if (collRModuleOptions != null)
4920            {
4921                for (int i = 0; i < collRModuleOptions.size(); i++)
4922                {
4923                    ((RModuleOption)collRModuleOptions.get(i)).save(con);
4924                }
4925            }
4926                                          
4927                            if (collRModuleUserAttributes != null)
4928            {
4929                for (int i = 0; i < collRModuleUserAttributes.size(); i++)
4930                {
4931                    ((RModuleUserAttribute)collRModuleUserAttributes.get(i)).save(con);
4932                }
4933            }
4934                                          
4935                            if (collUserVotes != null)
4936            {
4937                for (int i = 0; i < collUserVotes.size(); i++)
4938                {
4939                    ((UserVote)collUserVotes.get(i)).save(con);
4940                }
4941            }
4942                                          
4943                            if (collQuerys != null)
4944            {
4945                for (int i = 0; i < collQuerys.size(); i++)
4946                {
4947                    ((Query)collQuerys.get(i)).save(con);
4948                }
4949            }
4950                                          
4951                            if (collReports != null)
4952            {
4953                for (int i = 0; i < collReports.size(); i++)
4954                {
4955                    ((Report)collReports.get(i)).save(con);
4956                }
4957            }
4958                                          
4959                            if (collPendingGroupUserRoles != null)
4960            {
4961                for (int i = 0; i < collPendingGroupUserRoles.size(); i++)
4962                {
4963                    ((PendingGroupUserRole)collPendingGroupUserRoles.get(i)).save(con);
4964                }
4965            }
4966                                          
4967                            if (collGlobalParameters != null)
4968            {
4969                for (int i = 0; i < collGlobalParameters.size(); i++)
4970                {
4971                    ((GlobalParameter)collGlobalParameters.get(i)).save(con);
4972                }
4973            }
4974                          alreadyInSave = false;
4975        }
4976      }
4977
4978    /**
4979     * Specify whether to cache the object after saving to the db.
4980     * This method returns false
4981     */

4982    protected boolean isCacheOnSave()
4983    {
4984        return true;
4985    }
4986
4987                        
4988      /**
4989     * Set the PrimaryKey using ObjectKey.
4990     *
4991     * @param moduleId ObjectKey
4992     */

4993    public void setPrimaryKey(ObjectKey moduleId)
4994        throws TorqueException {
4995            setModuleId(new Integer JavaDoc(((NumberKey)moduleId).intValue()));
4996        }
4997
4998    /**
4999     * Set the PrimaryKey using a String.
5000     *
5001     * @param key
5002     */

5003    public void setPrimaryKey(String JavaDoc key) throws TorqueException
5004    {
5005            setModuleId(new Integer JavaDoc(key));
5006        }
5007
5008  
5009    /**
5010     * returns an id that differentiates this object from others
5011     * of its class.
5012     */

5013    public ObjectKey getPrimaryKey()
5014    {
5015          return SimpleKey.keyFor(getModuleId());
5016      }
5017 
5018    /**
5019     * get an id that differentiates this object from others
5020     * of its class.
5021     */

5022    public String JavaDoc getQueryKey()
5023    {
5024        if (getPrimaryKey() == null)
5025        {
5026            return "";
5027        }
5028        else
5029        {
5030            return getPrimaryKey().toString();
5031        }
5032    }
5033
5034    /**
5035     * set an id that differentiates this object from others
5036     * of its class.
5037     */

5038    public void setQueryKey(String JavaDoc key)
5039        throws TorqueException
5040    {
5041        setPrimaryKey(key);
5042    }
5043
5044    /**
5045     * Makes a copy of this object.
5046     * It creates a new object filling in the simple attributes.
5047       * It then fills all the association collections and sets the
5048     * related objects to isNew=true.
5049       */

5050      public ScarabModule copyInto(ScarabModule copyObj) throws TorqueException
5051    {
5052            copyObj.setModuleId(moduleId);
5053          copyObj.setRealName(realName);
5054          copyObj.setDomain(domain);
5055          copyObj.setCode(code);
5056          copyObj.setDescription(description);
5057          copyObj.setUrl(url);
5058          copyObj.setArchiveEmail(archiveEmail);
5059          copyObj.setParentId(parentId);
5060          copyObj.setOwnerId(ownerId);
5061          copyObj.setQaContactId(qaContactId);
5062          copyObj.setDeleted(deleted);
5063          copyObj.setLocked(locked);
5064          copyObj.setClassKey(classKey);
5065  
5066                      copyObj.setModuleId((Integer JavaDoc)null);
5067                                                                                    
5068                                      
5069                
5070        List JavaDoc v = getAttributeGroups();
5071        for (int i = 0; i < v.size(); i++)
5072        {
5073            AttributeGroup obj = (AttributeGroup) v.get(i);
5074            copyObj.addAttributeGroup(obj.copy());
5075        }
5076                                                  
5077                
5078        v = getIssues();
5079        for (int i = 0; i < v.size(); i++)
5080        {
5081            Issue obj = (Issue) v.get(i);
5082            copyObj.addIssue(obj.copy());
5083        }
5084                                                  
5085                
5086        v = getRModuleIssueTypes();
5087        for (int i = 0; i < v.size(); i++)
5088        {
5089            RModuleIssueType obj = (RModuleIssueType) v.get(i);
5090            copyObj.addRModuleIssueType(obj.copy());
5091        }
5092                                                  
5093                
5094        v = getMITListItems();
5095        for (int i = 0; i < v.size(); i++)
5096        {
5097            MITListItem obj = (MITListItem) v.get(i);
5098            copyObj.addMITListItem(obj.copy());
5099        }
5100                                                            
5101                
5102        v = getRModuleAttributes();
5103        for (int i = 0; i < v.size(); i++)
5104        {
5105            RModuleAttribute obj = (RModuleAttribute) v.get(i);
5106            copyObj.addRModuleAttribute(obj.copy());
5107        }
5108                                                  
5109                
5110        v = getRModuleOptions();
5111        for (int i = 0; i < v.size(); i++)
5112        {
5113            RModuleOption obj = (RModuleOption) v.get(i);
5114            copyObj.addRModuleOption(obj.copy());
5115        }
5116                                                  
5117                
5118        v = getRModuleUserAttributes();
5119        for (int i = 0; i < v.size(); i++)
5120        {
5121            RModuleUserAttribute obj = (RModuleUserAttribute) v.get(i);
5122            copyObj.addRModuleUserAttribute(obj.copy());
5123        }
5124                                                  
5125                
5126        v = getUserVotes();
5127        for (int i = 0; i < v.size(); i++)
5128        {
5129            UserVote obj = (UserVote) v.get(i);
5130            copyObj.addUserVote(obj.copy());
5131        }
5132                                                  
5133                
5134        v = getQuerys();
5135        for (int i = 0; i < v.size(); i++)
5136        {
5137            Query obj = (Query) v.get(i);
5138            copyObj.addQuery(obj.copy());
5139        }
5140                                                  
5141                
5142        v = getReports();
5143        for (int i = 0; i < v.size(); i++)
5144        {
5145            Report obj = (Report) v.get(i);
5146            copyObj.addReport(obj.copy());
5147        }
5148                                                  
5149                
5150        v = getPendingGroupUserRoles();
5151        for (int i = 0; i < v.size(); i++)
5152        {
5153            PendingGroupUserRole obj = (PendingGroupUserRole) v.get(i);
5154            copyObj.addPendingGroupUserRole(obj.copy());
5155        }
5156                                                  
5157                
5158        v = getGlobalParameters();
5159        for (int i = 0; i < v.size(); i++)
5160        {
5161            GlobalParameter obj = (GlobalParameter) v.get(i);
5162            copyObj.addGlobalParameter(obj.copy());
5163        }
5164                            return copyObj;
5165    }
5166
5167    /**
5168     * returns a peer instance associated with this om. Since Peer classes
5169     * are not to have any instance attributes, this method returns the
5170     * same instance for all member of this class. The method could therefore
5171     * be static, but this would prevent one from overriding the behavior.
5172     */

5173    public ScarabModulePeer getPeer()
5174    {
5175        return peer;
5176    }
5177
5178    public String JavaDoc toString()
5179    {
5180        StringBuffer JavaDoc str = new StringBuffer JavaDoc();
5181        str.append("ScarabModule:\n");
5182        str.append("ModuleId = ")
5183               .append(getModuleId())
5184             .append("\n");
5185        str.append("RealName = ")
5186               .append(getRealName())
5187             .append("\n");
5188        str.append("Domain = ")
5189               .append(getDomain())
5190             .append("\n");
5191        str.append("Code = ")
5192               .append(getCode())
5193             .append("\n");
5194        str.append("Description = ")
5195               .append(getDescription())
5196             .append("\n");
5197        str.append("Url = ")
5198               .append(getUrl())
5199             .append("\n");
5200        str.append("ArchiveEmail = ")
5201               .append(getArchiveEmail())
5202             .append("\n");
5203        str.append("ParentId = ")
5204               .append(getParentId())
5205             .append("\n");
5206        str.append("OwnerId = ")
5207               .append(getOwnerId())
5208             .append("\n");
5209        str.append("QaContactId = ")
5210               .append(getQaContactId())
5211             .append("\n");
5212        str.append("Deleted = ")
5213               .append(getDeleted())
5214             .append("\n");
5215        str.append("Locked = ")
5216               .append(getLocked())
5217             .append("\n");
5218        str.append("ClassKey = ")
5219               .append(getClassKey())
5220             .append("\n");
5221        return(str.toString());
5222    }
5223}
5224
Popular Tags