KickJava   Java API By Example, From Geeks To Geeks.

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


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  * You should not use this class directly. It should not even be
29  * extended all references should be to IssueType
30  */

31 public abstract class BaseIssueType extends BaseObject
32     implements org.apache.fulcrum.intake.Retrievable
33 {
34     /** The Peer class */
35     private static final IssueTypePeer peer =
36         new IssueTypePeer();
37
38         
39     /** The value for the issueTypeId field */
40     private Integer JavaDoc issueTypeId;
41       
42     /** The value for the name field */
43     private String JavaDoc name;
44       
45     /** The value for the description field */
46     private String JavaDoc description;
47       
48     /** The value for the parentId field */
49     private Integer JavaDoc parentId;
50                                                                 
51     /** The value for the dedupe field */
52     private boolean dedupe = true;
53                                                                 
54     /** The value for the deleted field */
55     private boolean deleted = false;
56                                                                 
57     /** The value for the locked field */
58     private boolean locked = false;
59                                                                 
60     /** The value for the isdefault field */
61     private boolean isdefault = false;
62   
63     
64     /**
65      * Get the IssueTypeId
66      *
67      * @return Integer
68      */

69     public Integer JavaDoc getIssueTypeId()
70     {
71         return issueTypeId;
72     }
73
74                                               
75     /**
76      * Set the value of IssueTypeId
77      *
78      * @param v new value
79      */

80     public void setIssueTypeId(Integer JavaDoc v) throws TorqueException
81     {
82     
83                   if (!ObjectUtils.equals(this.issueTypeId, v))
84               {
85             this.issueTypeId = v;
86             setModified(true);
87         }
88     
89           
90                                   
91         // update associated AttributeGroup
92
if (collAttributeGroups != null)
93         {
94             for (int i = 0; i < collAttributeGroups.size(); i++)
95             {
96                 ((AttributeGroup) collAttributeGroups.get(i))
97                         .setIssueTypeId(v);
98             }
99         }
100                                           
101         // update associated Issue
102
if (collIssues != null)
103         {
104             for (int i = 0; i < collIssues.size(); i++)
105             {
106                 ((Issue) collIssues.get(i))
107                         .setTypeId(v);
108             }
109         }
110                                                         
111         // update associated RModuleIssueType
112
if (collRModuleIssueTypes != null)
113         {
114             for (int i = 0; i < collRModuleIssueTypes.size(); i++)
115             {
116                 ((RModuleIssueType) collRModuleIssueTypes.get(i))
117                         .setIssueTypeId(v);
118             }
119         }
120                                           
121         // update associated MITListItem
122
if (collMITListItems != null)
123         {
124             for (int i = 0; i < collMITListItems.size(); i++)
125             {
126                 ((MITListItem) collMITListItems.get(i))
127                         .setIssueTypeId(v);
128             }
129         }
130                                           
131         // update associated RModuleAttribute
132
if (collRModuleAttributes != null)
133         {
134             for (int i = 0; i < collRModuleAttributes.size(); i++)
135             {
136                 ((RModuleAttribute) collRModuleAttributes.get(i))
137                         .setIssueTypeId(v);
138             }
139         }
140                                           
141         // update associated RIssueTypeAttribute
142
if (collRIssueTypeAttributes != null)
143         {
144             for (int i = 0; i < collRIssueTypeAttributes.size(); i++)
145             {
146                 ((RIssueTypeAttribute) collRIssueTypeAttributes.get(i))
147                         .setIssueTypeId(v);
148             }
149         }
150                                           
151         // update associated RModuleOption
152
if (collRModuleOptions != null)
153         {
154             for (int i = 0; i < collRModuleOptions.size(); i++)
155             {
156                 ((RModuleOption) collRModuleOptions.get(i))
157                         .setIssueTypeId(v);
158             }
159         }
160                                           
161         // update associated RIssueTypeOption
162
if (collRIssueTypeOptions != null)
163         {
164             for (int i = 0; i < collRIssueTypeOptions.size(); i++)
165             {
166                 ((RIssueTypeOption) collRIssueTypeOptions.get(i))
167                         .setIssueTypeId(v);
168             }
169         }
170                                           
171         // update associated RModuleUserAttribute
172
if (collRModuleUserAttributes != null)
173         {
174             for (int i = 0; i < collRModuleUserAttributes.size(); i++)
175             {
176                 ((RModuleUserAttribute) collRModuleUserAttributes.get(i))
177                         .setIssueTypeId(v);
178             }
179         }
180                                           
181         // update associated Query
182
if (collQuerys != null)
183         {
184             for (int i = 0; i < collQuerys.size(); i++)
185             {
186                 ((Query) collQuerys.get(i))
187                         .setIssueTypeId(v);
188             }
189         }
190                                           
191         // update associated Report
192
if (collReports != null)
193         {
194             for (int i = 0; i < collReports.size(); i++)
195             {
196                 ((Report) collReports.get(i))
197                         .setIssueTypeId(v);
198             }
199         }
200                       }
201   
202     /**
203      * Get the Name
204      *
205      * @return String
206      */

207     public String JavaDoc getName()
208     {
209         return name;
210     }
211
212                         
213     /**
214      * Set the value of Name
215      *
216      * @param v new value
217      */

218     public void setName(String JavaDoc v)
219     {
220     
221                   if (!ObjectUtils.equals(this.name, v))
222               {
223             this.name = v;
224             setModified(true);
225         }
226     
227           
228               }
229   
230     /**
231      * Get the Description
232      *
233      * @return String
234      */

235     public String JavaDoc getDescription()
236     {
237         return description;
238     }
239
240                         
241     /**
242      * Set the value of Description
243      *
244      * @param v new value
245      */

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

263     public Integer JavaDoc getParentId()
264     {
265         return parentId;
266     }
267
268                               
269     /**
270      * Set the value of ParentId
271      *
272      * @param v new value
273      */

274     public void setParentId(Integer JavaDoc v) throws TorqueException
275     {
276     
277                   if (!ObjectUtils.equals(this.parentId, v))
278               {
279             this.parentId = v;
280             setModified(true);
281         }
282     
283                                                                           
284                 if (aIssueTypeRelatedByParentId != null && !ObjectUtils.equals(aIssueTypeRelatedByParentId.getIssueTypeId(), v))
285                 {
286             aIssueTypeRelatedByParentId = null;
287         }
288       
289               }
290   
291     /**
292      * Get the Dedupe
293      *
294      * @return boolean
295      */

296     public boolean getDedupe()
297     {
298         return dedupe;
299     }
300
301                         
302     /**
303      * Set the value of Dedupe
304      *
305      * @param v new value
306      */

307     public void setDedupe(boolean v)
308     {
309     
310                   if (this.dedupe != v)
311               {
312             this.dedupe = v;
313             setModified(true);
314         }
315     
316           
317               }
318   
319     /**
320      * Get the Deleted
321      *
322      * @return boolean
323      */

324     public boolean getDeleted()
325     {
326         return deleted;
327     }
328
329                         
330     /**
331      * Set the value of Deleted
332      *
333      * @param v new value
334      */

335     public void setDeleted(boolean v)
336     {
337     
338                   if (this.deleted != v)
339               {
340             this.deleted = v;
341             setModified(true);
342         }
343     
344           
345               }
346   
347     /**
348      * Get the Locked
349      *
350      * @return boolean
351      */

352     public boolean getLocked()
353     {
354         return locked;
355     }
356
357                         
358     /**
359      * Set the value of Locked
360      *
361      * @param v new value
362      */

363     public void setLocked(boolean v)
364     {
365     
366                   if (this.locked != v)
367               {
368             this.locked = v;
369             setModified(true);
370         }
371     
372           
373               }
374   
375     /**
376      * Get the Isdefault
377      *
378      * @return boolean
379      */

380     public boolean getIsdefault()
381     {
382         return isdefault;
383     }
384
385                         
386     /**
387      * Set the value of Isdefault
388      *
389      * @param v new value
390      */

391     public void setIsdefault(boolean v)
392     {
393     
394                   if (this.isdefault != v)
395               {
396             this.isdefault = v;
397             setModified(true);
398         }
399     
400           
401               }
402   
403       
404         
405                         
406             private IssueType aIssueTypeRelatedByParentId;
407
408     /**
409      * Declares an association between this object and a IssueType object
410      *
411      * @param v IssueType
412      * @throws TorqueException
413      */

414     public void setIssueTypeRelatedByParentId(IssueType v) throws TorqueException
415     {
416             if (v == null)
417         {
418                   setParentId((Integer JavaDoc) null);
419               }
420         else
421         {
422             setParentId(v.getIssueTypeId());
423         }
424             aIssueTypeRelatedByParentId = v;
425     }
426
427                         
428     /**
429      * Get the associated IssueType object
430      *
431      * @return the associated IssueType object
432      * @throws TorqueException
433      */

434     public IssueType getIssueTypeRelatedByParentId() throws TorqueException
435     {
436         if ( !ObjectUtils.equals(getParentId(), null) )
437         {
438                 return IssueTypeManager.getInstance(SimpleKey.keyFor(getParentId()));
439             }
440         return aIssueTypeRelatedByParentId;
441     }
442
443     /**
444      * Provides convenient way to set a relationship based on a
445      * ObjectKey, for example
446      * <code>bar.setFooKey(foo.getPrimaryKey())</code>
447      *
448          */

449     public void setIssueTypeRelatedByParentIdKey(ObjectKey key) throws TorqueException
450     {
451     
452                     setParentId(new Integer JavaDoc(((NumberKey) key).intValue()));
453               }
454      
455                                 
456             
457     /**
458      * Collection to store aggregation of collAttributeGroups
459      */

460     protected List JavaDoc collAttributeGroups;
461
462     /**
463      * Temporary storage of collAttributeGroups to save a possible db hit in
464      * the event objects are add to the collection, but the
465      * complete collection is never requested.
466      */

467     protected void initAttributeGroups()
468     {
469         if (collAttributeGroups == null)
470         {
471             collAttributeGroups = new ArrayList JavaDoc();
472         }
473     }
474
475             
476     /**
477      * Method called to associate a AttributeGroup object to this object
478      * through the AttributeGroup foreign key attribute
479      *
480      * @param l AttributeGroup
481      * @throws TorqueException
482      */

483     public void addAttributeGroup(AttributeGroup l) throws TorqueException
484     {
485         getAttributeGroups().add(l);
486         l.setIssueType((IssueType)this);
487     }
488
489     /**
490      * The criteria used to select the current contents of collAttributeGroups
491      */

492     private Criteria lastAttributeGroupsCriteria = null;
493
494     /**
495      * If this collection has already been initialized, returns
496      * the collection. Otherwise returns the results of
497      * getAttributeGroups(new Criteria())
498      *
499      * @throws TorqueException
500      */

501     public List JavaDoc getAttributeGroups() throws TorqueException
502     {
503         if (collAttributeGroups == null)
504         {
505             collAttributeGroups = getAttributeGroups(new Criteria(10));
506         }
507         return collAttributeGroups;
508     }
509
510     /**
511      * If this collection has already been initialized with
512      * an identical criteria, it returns the collection.
513      * Otherwise if this IssueType has previously
514      * been saved, it will retrieve related AttributeGroups from storage.
515      * If this IssueType is new, it will return
516      * an empty collection or the current collection, the criteria
517      * is ignored on a new object.
518      *
519      * @throws TorqueException
520      */

521     public List JavaDoc getAttributeGroups(Criteria criteria) throws TorqueException
522     {
523         if (collAttributeGroups == null)
524         {
525             if (isNew())
526             {
527                collAttributeGroups = new ArrayList JavaDoc();
528             }
529             else
530             {
531                       criteria.add(AttributeGroupPeer.ISSUE_TYPE_ID, getIssueTypeId() );
532                       collAttributeGroups = AttributeGroupPeer.doSelect(criteria);
533             }
534         }
535         else
536         {
537             // criteria has no effect for a new object
538
if (!isNew())
539             {
540                 // the following code is to determine if a new query is
541
// called for. If the criteria is the same as the last
542
// one, just return the collection.
543
criteria.add(AttributeGroupPeer.ISSUE_TYPE_ID, getIssueTypeId() );
544                       if (!lastAttributeGroupsCriteria.equals(criteria))
545                 {
546                     collAttributeGroups = AttributeGroupPeer.doSelect(criteria);
547                 }
548             }
549         }
550         lastAttributeGroupsCriteria = criteria;
551
552         return collAttributeGroups;
553     }
554
555     /**
556      * If this collection has already been initialized, returns
557      * the collection. Otherwise returns the results of
558      * getAttributeGroups(new Criteria(),Connection)
559      * This method takes in the Connection also as input so that
560      * referenced objects can also be obtained using a Connection
561      * that is taken as input
562      */

563     public List JavaDoc getAttributeGroups(Connection JavaDoc con) throws TorqueException
564     {
565         if (collAttributeGroups == null)
566         {
567             collAttributeGroups = getAttributeGroups(new Criteria(10),con);
568         }
569         return collAttributeGroups;
570     }
571
572     /**
573      * If this collection has already been initialized with
574      * an identical criteria, it returns the collection.
575      * Otherwise if this IssueType has previously
576      * been saved, it will retrieve related AttributeGroups from storage.
577      * If this IssueType is new, it will return
578      * an empty collection or the current collection, the criteria
579      * is ignored on a new object.
580      * This method takes in the Connection also as input so that
581      * referenced objects can also be obtained using a Connection
582      * that is taken as input
583      */

584     public List JavaDoc getAttributeGroups(Criteria criteria,Connection JavaDoc con) throws TorqueException
585     {
586         if (collAttributeGroups == null)
587         {
588             if (isNew())
589             {
590                collAttributeGroups = new ArrayList JavaDoc();
591             }
592             else
593             {
594                        criteria.add(AttributeGroupPeer.ISSUE_TYPE_ID, getIssueTypeId() );
595                        collAttributeGroups = AttributeGroupPeer.doSelect(criteria,con);
596              }
597          }
598          else
599          {
600              // criteria has no effect for a new object
601
if (!isNew())
602              {
603                  // the following code is to determine if a new query is
604
// called for. If the criteria is the same as the last
605
// one, just return the collection.
606
criteria.add(AttributeGroupPeer.ISSUE_TYPE_ID, getIssueTypeId() );
607                      if (!lastAttributeGroupsCriteria.equals(criteria))
608                  {
609                      collAttributeGroups = AttributeGroupPeer.doSelect(criteria,con);
610                  }
611              }
612          }
613          lastAttributeGroupsCriteria = criteria;
614
615          return collAttributeGroups;
616      }
617
618                         
619               
620                     
621                     
622                                 
623                                                               
624                                         
625                     
626                     
627           
628     /**
629      * If this collection has already been initialized with
630      * an identical criteria, it returns the collection.
631      * Otherwise if this IssueType is new, it will return
632      * an empty collection; or if this IssueType has previously
633      * been saved, it will retrieve related AttributeGroups from storage.
634      *
635      * This method is protected by default in order to keep the public
636      * api reasonable. You can provide public methods for those you
637      * actually need in IssueType.
638      */

639     protected List JavaDoc getAttributeGroupsJoinScarabModule(Criteria criteria)
640         throws TorqueException
641     {
642         if (collAttributeGroups == null)
643         {
644             if (isNew())
645             {
646                collAttributeGroups = new ArrayList JavaDoc();
647             }
648             else
649             {
650                             criteria.add(AttributeGroupPeer.ISSUE_TYPE_ID, getIssueTypeId() );
651                             collAttributeGroups = AttributeGroupPeer.doSelectJoinScarabModule(criteria);
652             }
653         }
654         else
655         {
656             // the following code is to determine if a new query is
657
// called for. If the criteria is the same as the last
658
// one, just return the collection.
659

660                             criteria.add(AttributeGroupPeer.ISSUE_TYPE_ID, getIssueTypeId() );
661                         if (!lastAttributeGroupsCriteria.equals(criteria))
662             {
663                 collAttributeGroups = AttributeGroupPeer.doSelectJoinScarabModule(criteria);
664             }
665         }
666         lastAttributeGroupsCriteria = criteria;
667
668         return collAttributeGroups;
669     }
670                   
671                     
672                               
673                                 
674                                                               
675                                         
676                     
677                     
678           
679     /**
680      * If this collection has already been initialized with
681      * an identical criteria, it returns the collection.
682      * Otherwise if this IssueType is new, it will return
683      * an empty collection; or if this IssueType has previously
684      * been saved, it will retrieve related AttributeGroups from storage.
685      *
686      * This method is protected by default in order to keep the public
687      * api reasonable. You can provide public methods for those you
688      * actually need in IssueType.
689      */

690     protected List JavaDoc getAttributeGroupsJoinIssueType(Criteria criteria)
691         throws TorqueException
692     {
693         if (collAttributeGroups == null)
694         {
695             if (isNew())
696             {
697                collAttributeGroups = new ArrayList JavaDoc();
698             }
699             else
700             {
701                             criteria.add(AttributeGroupPeer.ISSUE_TYPE_ID, getIssueTypeId() );
702                             collAttributeGroups = AttributeGroupPeer.doSelectJoinIssueType(criteria);
703             }
704         }
705         else
706         {
707             // the following code is to determine if a new query is
708
// called for. If the criteria is the same as the last
709
// one, just return the collection.
710

711                             criteria.add(AttributeGroupPeer.ISSUE_TYPE_ID, getIssueTypeId() );
712                         if (!lastAttributeGroupsCriteria.equals(criteria))
713             {
714                 collAttributeGroups = AttributeGroupPeer.doSelectJoinIssueType(criteria);
715             }
716         }
717         lastAttributeGroupsCriteria = criteria;
718
719         return collAttributeGroups;
720     }
721                             
722
723
724                           
725             
726     /**
727      * Collection to store aggregation of collIssues
728      */

729     protected List JavaDoc collIssues;
730
731     /**
732      * Temporary storage of collIssues to save a possible db hit in
733      * the event objects are add to the collection, but the
734      * complete collection is never requested.
735      */

736     protected void initIssues()
737     {
738         if (collIssues == null)
739         {
740             collIssues = new ArrayList JavaDoc();
741         }
742     }
743
744             
745     /**
746      * Method called to associate a Issue object to this object
747      * through the Issue foreign key attribute
748      *
749      * @param l Issue
750      * @throws TorqueException
751      */

752     public void addIssue(Issue l) throws TorqueException
753     {
754         getIssues().add(l);
755         l.setIssueType((IssueType)this);
756     }
757
758     /**
759      * The criteria used to select the current contents of collIssues
760      */

761     private Criteria lastIssuesCriteria = null;
762
763     /**
764      * If this collection has already been initialized, returns
765      * the collection. Otherwise returns the results of
766      * getIssues(new Criteria())
767      *
768      * @throws TorqueException
769      */

770     public List JavaDoc getIssues() throws TorqueException
771     {
772         if (collIssues == null)
773         {
774             collIssues = getIssues(new Criteria(10));
775         }
776         return collIssues;
777     }
778
779     /**
780      * If this collection has already been initialized with
781      * an identical criteria, it returns the collection.
782      * Otherwise if this IssueType has previously
783      * been saved, it will retrieve related Issues from storage.
784      * If this IssueType is new, it will return
785      * an empty collection or the current collection, the criteria
786      * is ignored on a new object.
787      *
788      * @throws TorqueException
789      */

790     public List JavaDoc getIssues(Criteria criteria) throws TorqueException
791     {
792         if (collIssues == null)
793         {
794             if (isNew())
795             {
796                collIssues = new ArrayList JavaDoc();
797             }
798             else
799             {
800                       criteria.add(IssuePeer.TYPE_ID, getIssueTypeId() );
801                       collIssues = IssuePeer.doSelect(criteria);
802             }
803         }
804         else
805         {
806             // criteria has no effect for a new object
807
if (!isNew())
808             {
809                 // the following code is to determine if a new query is
810
// called for. If the criteria is the same as the last
811
// one, just return the collection.
812
criteria.add(IssuePeer.TYPE_ID, getIssueTypeId() );
813                       if (!lastIssuesCriteria.equals(criteria))
814                 {
815                     collIssues = IssuePeer.doSelect(criteria);
816                 }
817             }
818         }
819         lastIssuesCriteria = criteria;
820
821         return collIssues;
822     }
823
824     /**
825      * If this collection has already been initialized, returns
826      * the collection. Otherwise returns the results of
827      * getIssues(new Criteria(),Connection)
828      * This method takes in the Connection also as input so that
829      * referenced objects can also be obtained using a Connection
830      * that is taken as input
831      */

832     public List JavaDoc getIssues(Connection JavaDoc con) throws TorqueException
833     {
834         if (collIssues == null)
835         {
836             collIssues = getIssues(new Criteria(10),con);
837         }
838         return collIssues;
839     }
840
841     /**
842      * If this collection has already been initialized with
843      * an identical criteria, it returns the collection.
844      * Otherwise if this IssueType has previously
845      * been saved, it will retrieve related Issues from storage.
846      * If this IssueType is new, it will return
847      * an empty collection or the current collection, the criteria
848      * is ignored on a new object.
849      * This method takes in the Connection also as input so that
850      * referenced objects can also be obtained using a Connection
851      * that is taken as input
852      */

853     public List JavaDoc getIssues(Criteria criteria,Connection JavaDoc con) throws TorqueException
854     {
855         if (collIssues == null)
856         {
857             if (isNew())
858             {
859                collIssues = new ArrayList JavaDoc();
860             }
861             else
862             {
863                        criteria.add(IssuePeer.TYPE_ID, getIssueTypeId() );
864                        collIssues = IssuePeer.doSelect(criteria,con);
865              }
866          }
867          else
868          {
869              // criteria has no effect for a new object
870
if (!isNew())
871              {
872                  // the following code is to determine if a new query is
873
// called for. If the criteria is the same as the last
874
// one, just return the collection.
875
criteria.add(IssuePeer.TYPE_ID, getIssueTypeId() );
876                      if (!lastIssuesCriteria.equals(criteria))
877                  {
878                      collIssues = IssuePeer.doSelect(criteria,con);
879                  }
880              }
881          }
882          lastIssuesCriteria = criteria;
883
884          return collIssues;
885      }
886
887                               
888               
889                     
890                     
891                                 
892                                                               
893                                         
894                     
895                     
896           
897     /**
898      * If this collection has already been initialized with
899      * an identical criteria, it returns the collection.
900      * Otherwise if this IssueType is new, it will return
901      * an empty collection; or if this IssueType has previously
902      * been saved, it will retrieve related Issues from storage.
903      *
904      * This method is protected by default in order to keep the public
905      * api reasonable. You can provide public methods for those you
906      * actually need in IssueType.
907      */

908     protected List JavaDoc getIssuesJoinScarabModule(Criteria criteria)
909         throws TorqueException
910     {
911         if (collIssues == null)
912         {
913             if (isNew())
914             {
915                collIssues = new ArrayList JavaDoc();
916             }
917             else
918             {
919                             criteria.add(IssuePeer.TYPE_ID, getIssueTypeId() );
920                             collIssues = IssuePeer.doSelectJoinScarabModule(criteria);
921             }
922         }
923         else
924         {
925             // the following code is to determine if a new query is
926
// called for. If the criteria is the same as the last
927
// one, just return the collection.
928

929                             criteria.add(IssuePeer.TYPE_ID, getIssueTypeId() );
930                         if (!lastIssuesCriteria.equals(criteria))
931             {
932                 collIssues = IssuePeer.doSelectJoinScarabModule(criteria);
933             }
934         }
935         lastIssuesCriteria = criteria;
936
937         return collIssues;
938     }
939                   
940                     
941                               
942                                 
943                                                               
944                                         
945                     
946                     
947           
948     /**
949      * If this collection has already been initialized with
950      * an identical criteria, it returns the collection.
951      * Otherwise if this IssueType is new, it will return
952      * an empty collection; or if this IssueType has previously
953      * been saved, it will retrieve related Issues from storage.
954      *
955      * This method is protected by default in order to keep the public
956      * api reasonable. You can provide public methods for those you
957      * actually need in IssueType.
958      */

959     protected List JavaDoc getIssuesJoinIssueType(Criteria criteria)
960         throws TorqueException
961     {
962         if (collIssues == null)
963         {
964             if (isNew())
965             {
966                collIssues = new ArrayList JavaDoc();
967             }
968             else
969             {
970                             criteria.add(IssuePeer.TYPE_ID, getIssueTypeId() );
971                             collIssues = IssuePeer.doSelectJoinIssueType(criteria);
972             }
973         }
974         else
975         {
976             // the following code is to determine if a new query is
977
// called for. If the criteria is the same as the last
978
// one, just return the collection.
979

980                             criteria.add(IssuePeer.TYPE_ID, getIssueTypeId() );
981                         if (!lastIssuesCriteria.equals(criteria))
982             {
983                 collIssues = IssuePeer.doSelectJoinIssueType(criteria);
984             }
985         }
986         lastIssuesCriteria = criteria;
987
988         return collIssues;
989     }
990                   
991                     
992                     
993                                 
994                                                               
995                                         
996                     
997                     
998           
999     /**
1000     * If this collection has already been initialized with
1001     * an identical criteria, it returns the collection.
1002     * Otherwise if this IssueType is new, it will return
1003     * an empty collection; or if this IssueType has previously
1004     * been saved, it will retrieve related Issues from storage.
1005     *
1006     * This method is protected by default in order to keep the public
1007     * api reasonable. You can provide public methods for those you
1008     * actually need in IssueType.
1009     */

1010    protected List JavaDoc getIssuesJoinActivitySet(Criteria criteria)
1011        throws TorqueException
1012    {
1013        if (collIssues == null)
1014        {
1015            if (isNew())
1016            {
1017               collIssues = new ArrayList JavaDoc();
1018            }
1019            else
1020            {
1021                            criteria.add(IssuePeer.TYPE_ID, getIssueTypeId() );
1022                            collIssues = IssuePeer.doSelectJoinActivitySet(criteria);
1023            }
1024        }
1025        else
1026        {
1027            // the following code is to determine if a new query is
1028
// called for. If the criteria is the same as the last
1029
// one, just return the collection.
1030

1031                            criteria.add(IssuePeer.TYPE_ID, getIssueTypeId() );
1032                        if (!lastIssuesCriteria.equals(criteria))
1033            {
1034                collIssues = IssuePeer.doSelectJoinActivitySet(criteria);
1035            }
1036        }
1037        lastIssuesCriteria = criteria;
1038
1039        return collIssues;
1040    }
1041                            
1042
1043
1044      
1045
1046
1047                          
1048            
1049    /**
1050     * Collection to store aggregation of collRModuleIssueTypes
1051     */

1052    protected List JavaDoc collRModuleIssueTypes;
1053
1054    /**
1055     * Temporary storage of collRModuleIssueTypes to save a possible db hit in
1056     * the event objects are add to the collection, but the
1057     * complete collection is never requested.
1058     */

1059    protected void initRModuleIssueTypes()
1060    {
1061        if (collRModuleIssueTypes == null)
1062        {
1063            collRModuleIssueTypes = new ArrayList JavaDoc();
1064        }
1065    }
1066
1067            
1068    /**
1069     * Method called to associate a RModuleIssueType object to this object
1070     * through the RModuleIssueType foreign key attribute
1071     *
1072     * @param l RModuleIssueType
1073     * @throws TorqueException
1074     */

1075    public void addRModuleIssueType(RModuleIssueType l) throws TorqueException
1076    {
1077        getRModuleIssueTypes().add(l);
1078        l.setIssueType((IssueType)this);
1079    }
1080
1081    /**
1082     * The criteria used to select the current contents of collRModuleIssueTypes
1083     */

1084    private Criteria lastRModuleIssueTypesCriteria = null;
1085
1086    /**
1087     * If this collection has already been initialized, returns
1088     * the collection. Otherwise returns the results of
1089     * getRModuleIssueTypes(new Criteria())
1090     *
1091     * @throws TorqueException
1092     */

1093    public List JavaDoc getRModuleIssueTypes() throws TorqueException
1094    {
1095        if (collRModuleIssueTypes == null)
1096        {
1097            collRModuleIssueTypes = getRModuleIssueTypes(new Criteria(10));
1098        }
1099        return collRModuleIssueTypes;
1100    }
1101
1102    /**
1103     * If this collection has already been initialized with
1104     * an identical criteria, it returns the collection.
1105     * Otherwise if this IssueType has previously
1106     * been saved, it will retrieve related RModuleIssueTypes from storage.
1107     * If this IssueType is new, it will return
1108     * an empty collection or the current collection, the criteria
1109     * is ignored on a new object.
1110     *
1111     * @throws TorqueException
1112     */

1113    public List JavaDoc getRModuleIssueTypes(Criteria criteria) throws TorqueException
1114    {
1115        if (collRModuleIssueTypes == null)
1116        {
1117            if (isNew())
1118            {
1119               collRModuleIssueTypes = new ArrayList JavaDoc();
1120            }
1121            else
1122            {
1123                      criteria.add(RModuleIssueTypePeer.ISSUE_TYPE_ID, getIssueTypeId() );
1124                      collRModuleIssueTypes = RModuleIssueTypePeer.doSelect(criteria);
1125            }
1126        }
1127        else
1128        {
1129            // criteria has no effect for a new object
1130
if (!isNew())
1131            {
1132                // the following code is to determine if a new query is
1133
// called for. If the criteria is the same as the last
1134
// one, just return the collection.
1135
criteria.add(RModuleIssueTypePeer.ISSUE_TYPE_ID, getIssueTypeId() );
1136                      if (!lastRModuleIssueTypesCriteria.equals(criteria))
1137                {
1138                    collRModuleIssueTypes = RModuleIssueTypePeer.doSelect(criteria);
1139                }
1140            }
1141        }
1142        lastRModuleIssueTypesCriteria = criteria;
1143
1144        return collRModuleIssueTypes;
1145    }
1146
1147    /**
1148     * If this collection has already been initialized, returns
1149     * the collection. Otherwise returns the results of
1150     * getRModuleIssueTypes(new Criteria(),Connection)
1151     * This method takes in the Connection also as input so that
1152     * referenced objects can also be obtained using a Connection
1153     * that is taken as input
1154     */

1155    public List JavaDoc getRModuleIssueTypes(Connection JavaDoc con) throws TorqueException
1156    {
1157        if (collRModuleIssueTypes == null)
1158        {
1159            collRModuleIssueTypes = getRModuleIssueTypes(new Criteria(10),con);
1160        }
1161        return collRModuleIssueTypes;
1162    }
1163
1164    /**
1165     * If this collection has already been initialized with
1166     * an identical criteria, it returns the collection.
1167     * Otherwise if this IssueType has previously
1168     * been saved, it will retrieve related RModuleIssueTypes from storage.
1169     * If this IssueType is new, it will return
1170     * an empty collection or the current collection, the criteria
1171     * is ignored on a new object.
1172     * This method takes in the Connection also as input so that
1173     * referenced objects can also be obtained using a Connection
1174     * that is taken as input
1175     */

1176    public List JavaDoc getRModuleIssueTypes(Criteria criteria,Connection JavaDoc con) throws TorqueException
1177    {
1178        if (collRModuleIssueTypes == null)
1179        {
1180            if (isNew())
1181            {
1182               collRModuleIssueTypes = new ArrayList JavaDoc();
1183            }
1184            else
1185            {
1186                       criteria.add(RModuleIssueTypePeer.ISSUE_TYPE_ID, getIssueTypeId() );
1187                       collRModuleIssueTypes = RModuleIssueTypePeer.doSelect(criteria,con);
1188             }
1189         }
1190         else
1191         {
1192             // criteria has no effect for a new object
1193
if (!isNew())
1194             {
1195                 // the following code is to determine if a new query is
1196
// called for. If the criteria is the same as the last
1197
// one, just return the collection.
1198
criteria.add(RModuleIssueTypePeer.ISSUE_TYPE_ID, getIssueTypeId() );
1199                     if (!lastRModuleIssueTypesCriteria.equals(criteria))
1200                 {
1201                     collRModuleIssueTypes = RModuleIssueTypePeer.doSelect(criteria,con);
1202                 }
1203             }
1204         }
1205         lastRModuleIssueTypesCriteria = criteria;
1206
1207         return collRModuleIssueTypes;
1208     }
1209
1210                        
1211              
1212                    
1213                    
1214                                
1215                                                              
1216                                        
1217                    
1218                    
1219          
1220    /**
1221     * If this collection has already been initialized with
1222     * an identical criteria, it returns the collection.
1223     * Otherwise if this IssueType is new, it will return
1224     * an empty collection; or if this IssueType has previously
1225     * been saved, it will retrieve related RModuleIssueTypes from storage.
1226     *
1227     * This method is protected by default in order to keep the public
1228     * api reasonable. You can provide public methods for those you
1229     * actually need in IssueType.
1230     */

1231    protected List JavaDoc getRModuleIssueTypesJoinScarabModule(Criteria criteria)
1232        throws TorqueException
1233    {
1234        if (collRModuleIssueTypes == null)
1235        {
1236            if (isNew())
1237            {
1238               collRModuleIssueTypes = new ArrayList JavaDoc();
1239            }
1240            else
1241            {
1242                            criteria.add(RModuleIssueTypePeer.ISSUE_TYPE_ID, getIssueTypeId() );
1243                            collRModuleIssueTypes = RModuleIssueTypePeer.doSelectJoinScarabModule(criteria);
1244            }
1245        }
1246        else
1247        {
1248            // the following code is to determine if a new query is
1249
// called for. If the criteria is the same as the last
1250
// one, just return the collection.
1251

1252                            criteria.add(RModuleIssueTypePeer.ISSUE_TYPE_ID, getIssueTypeId() );
1253                        if (!lastRModuleIssueTypesCriteria.equals(criteria))
1254            {
1255                collRModuleIssueTypes = RModuleIssueTypePeer.doSelectJoinScarabModule(criteria);
1256            }
1257        }
1258        lastRModuleIssueTypesCriteria = criteria;
1259
1260        return collRModuleIssueTypes;
1261    }
1262                  
1263                    
1264                              
1265                                
1266                                                              
1267                                        
1268                    
1269                    
1270          
1271    /**
1272     * If this collection has already been initialized with
1273     * an identical criteria, it returns the collection.
1274     * Otherwise if this IssueType is new, it will return
1275     * an empty collection; or if this IssueType has previously
1276     * been saved, it will retrieve related RModuleIssueTypes from storage.
1277     *
1278     * This method is protected by default in order to keep the public
1279     * api reasonable. You can provide public methods for those you
1280     * actually need in IssueType.
1281     */

1282    protected List JavaDoc getRModuleIssueTypesJoinIssueType(Criteria criteria)
1283        throws TorqueException
1284    {
1285        if (collRModuleIssueTypes == null)
1286        {
1287            if (isNew())
1288            {
1289               collRModuleIssueTypes = new ArrayList JavaDoc();
1290            }
1291            else
1292            {
1293                            criteria.add(RModuleIssueTypePeer.ISSUE_TYPE_ID, getIssueTypeId() );
1294                            collRModuleIssueTypes = RModuleIssueTypePeer.doSelectJoinIssueType(criteria);
1295            }
1296        }
1297        else
1298        {
1299            // the following code is to determine if a new query is
1300
// called for. If the criteria is the same as the last
1301
// one, just return the collection.
1302

1303                            criteria.add(RModuleIssueTypePeer.ISSUE_TYPE_ID, getIssueTypeId() );
1304                        if (!lastRModuleIssueTypesCriteria.equals(criteria))
1305            {
1306                collRModuleIssueTypes = RModuleIssueTypePeer.doSelectJoinIssueType(criteria);
1307            }
1308        }
1309        lastRModuleIssueTypesCriteria = criteria;
1310
1311        return collRModuleIssueTypes;
1312    }
1313                            
1314
1315
1316                          
1317            
1318    /**
1319     * Collection to store aggregation of collMITListItems
1320     */

1321    protected List JavaDoc collMITListItems;
1322
1323    /**
1324     * Temporary storage of collMITListItems to save a possible db hit in
1325     * the event objects are add to the collection, but the
1326     * complete collection is never requested.
1327     */

1328    protected void initMITListItems()
1329    {
1330        if (collMITListItems == null)
1331        {
1332            collMITListItems = new ArrayList JavaDoc();
1333        }
1334    }
1335
1336            
1337    /**
1338     * Method called to associate a MITListItem object to this object
1339     * through the MITListItem foreign key attribute
1340     *
1341     * @param l MITListItem
1342     * @throws TorqueException
1343     */

1344    public void addMITListItem(MITListItem l) throws TorqueException
1345    {
1346        getMITListItems().add(l);
1347        l.setIssueType((IssueType)this);
1348    }
1349
1350    /**
1351     * The criteria used to select the current contents of collMITListItems
1352     */

1353    private Criteria lastMITListItemsCriteria = null;
1354
1355    /**
1356     * If this collection has already been initialized, returns
1357     * the collection. Otherwise returns the results of
1358     * getMITListItems(new Criteria())
1359     *
1360     * @throws TorqueException
1361     */

1362    public List JavaDoc getMITListItems() throws TorqueException
1363    {
1364        if (collMITListItems == null)
1365        {
1366            collMITListItems = getMITListItems(new Criteria(10));
1367        }
1368        return collMITListItems;
1369    }
1370
1371    /**
1372     * If this collection has already been initialized with
1373     * an identical criteria, it returns the collection.
1374     * Otherwise if this IssueType has previously
1375     * been saved, it will retrieve related MITListItems from storage.
1376     * If this IssueType is new, it will return
1377     * an empty collection or the current collection, the criteria
1378     * is ignored on a new object.
1379     *
1380     * @throws TorqueException
1381     */

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

1424    public List JavaDoc getMITListItems(Connection JavaDoc con) throws TorqueException
1425    {
1426        if (collMITListItems == null)
1427        {
1428            collMITListItems = getMITListItems(new Criteria(10),con);
1429        }
1430        return collMITListItems;
1431    }
1432
1433    /**
1434     * If this collection has already been initialized with
1435     * an identical criteria, it returns the collection.
1436     * Otherwise if this IssueType has previously
1437     * been saved, it will retrieve related MITListItems from storage.
1438     * If this IssueType is new, it will return
1439     * an empty collection or the current collection, the criteria
1440     * is ignored on a new object.
1441     * This method takes in the Connection also as input so that
1442     * referenced objects can also be obtained using a Connection
1443     * that is taken as input
1444     */

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

1500    protected List JavaDoc getMITListItemsJoinMITList(Criteria criteria)
1501        throws TorqueException
1502    {
1503        if (collMITListItems == null)
1504        {
1505            if (isNew())
1506            {
1507               collMITListItems = new ArrayList JavaDoc();
1508            }
1509            else
1510            {
1511                            criteria.add(MITListItemPeer.ISSUE_TYPE_ID, getIssueTypeId() );
1512                            collMITListItems = MITListItemPeer.doSelectJoinMITList(criteria);
1513            }
1514        }
1515        else
1516        {
1517            // the following code is to determine if a new query is
1518
// called for. If the criteria is the same as the last
1519
// one, just return the collection.
1520

1521                            criteria.add(MITListItemPeer.ISSUE_TYPE_ID, getIssueTypeId() );
1522                        if (!lastMITListItemsCriteria.equals(criteria))
1523            {
1524                collMITListItems = MITListItemPeer.doSelectJoinMITList(criteria);
1525            }
1526        }
1527        lastMITListItemsCriteria = criteria;
1528
1529        return collMITListItems;
1530    }
1531                  
1532                    
1533                    
1534                                
1535                                                              
1536                                        
1537                    
1538                    
1539          
1540    /**
1541     * If this collection has already been initialized with
1542     * an identical criteria, it returns the collection.
1543     * Otherwise if this IssueType is new, it will return
1544     * an empty collection; or if this IssueType has previously
1545     * been saved, it will retrieve related MITListItems from storage.
1546     *
1547     * This method is protected by default in order to keep the public
1548     * api reasonable. You can provide public methods for those you
1549     * actually need in IssueType.
1550     */

1551    protected List JavaDoc getMITListItemsJoinScarabModule(Criteria criteria)
1552        throws TorqueException
1553    {
1554        if (collMITListItems == null)
1555        {
1556            if (isNew())
1557            {
1558               collMITListItems = new ArrayList JavaDoc();
1559            }
1560            else
1561            {
1562                            criteria.add(MITListItemPeer.ISSUE_TYPE_ID, getIssueTypeId() );
1563                            collMITListItems = MITListItemPeer.doSelectJoinScarabModule(criteria);
1564            }
1565        }
1566        else
1567        {
1568            // the following code is to determine if a new query is
1569
// called for. If the criteria is the same as the last
1570
// one, just return the collection.
1571

1572                            criteria.add(MITListItemPeer.ISSUE_TYPE_ID, getIssueTypeId() );
1573                        if (!lastMITListItemsCriteria.equals(criteria))
1574            {
1575                collMITListItems = MITListItemPeer.doSelectJoinScarabModule(criteria);
1576            }
1577        }
1578        lastMITListItemsCriteria = criteria;
1579
1580        return collMITListItems;
1581    }
1582                  
1583                    
1584                              
1585                                
1586                                                              
1587                                        
1588                    
1589                    
1590          
1591    /**
1592     * If this collection has already been initialized with
1593     * an identical criteria, it returns the collection.
1594     * Otherwise if this IssueType is new, it will return
1595     * an empty collection; or if this IssueType has previously
1596     * been saved, it will retrieve related MITListItems from storage.
1597     *
1598     * This method is protected by default in order to keep the public
1599     * api reasonable. You can provide public methods for those you
1600     * actually need in IssueType.
1601     */

1602    protected List JavaDoc getMITListItemsJoinIssueType(Criteria criteria)
1603        throws TorqueException
1604    {
1605        if (collMITListItems == null)
1606        {
1607            if (isNew())
1608            {
1609               collMITListItems = new ArrayList JavaDoc();
1610            }
1611            else
1612            {
1613                            criteria.add(MITListItemPeer.ISSUE_TYPE_ID, getIssueTypeId() );
1614                            collMITListItems = MITListItemPeer.doSelectJoinIssueType(criteria);
1615            }
1616        }
1617        else
1618        {
1619            // the following code is to determine if a new query is
1620
// called for. If the criteria is the same as the last
1621
// one, just return the collection.
1622

1623                            criteria.add(MITListItemPeer.ISSUE_TYPE_ID, getIssueTypeId() );
1624                        if (!lastMITListItemsCriteria.equals(criteria))
1625            {
1626                collMITListItems = MITListItemPeer.doSelectJoinIssueType(criteria);
1627            }
1628        }
1629        lastMITListItemsCriteria = criteria;
1630
1631        return collMITListItems;
1632    }
1633                            
1634
1635
1636                          
1637            
1638    /**
1639     * Collection to store aggregation of collRModuleAttributes
1640     */

1641    protected List JavaDoc collRModuleAttributes;
1642
1643    /**
1644     * Temporary storage of collRModuleAttributes to save a possible db hit in
1645     * the event objects are add to the collection, but the
1646     * complete collection is never requested.
1647     */

1648    protected void initRModuleAttributes()
1649    {
1650        if (collRModuleAttributes == null)
1651        {
1652            collRModuleAttributes = new ArrayList JavaDoc();
1653        }
1654    }
1655
1656            
1657    /**
1658     * Method called to associate a RModuleAttribute object to this object
1659     * through the RModuleAttribute foreign key attribute
1660     *
1661     * @param l RModuleAttribute
1662     * @throws TorqueException
1663     */

1664    public void addRModuleAttribute(RModuleAttribute l) throws TorqueException
1665    {
1666        getRModuleAttributes().add(l);
1667        l.setIssueType((IssueType)this);
1668    }
1669
1670    /**
1671     * The criteria used to select the current contents of collRModuleAttributes
1672     */

1673    private Criteria lastRModuleAttributesCriteria = null;
1674
1675    /**
1676     * If this collection has already been initialized, returns
1677     * the collection. Otherwise returns the results of
1678     * getRModuleAttributes(new Criteria())
1679     *
1680     * @throws TorqueException
1681     */

1682    public List JavaDoc getRModuleAttributes() throws TorqueException
1683    {
1684        if (collRModuleAttributes == null)
1685        {
1686            collRModuleAttributes = getRModuleAttributes(new Criteria(10));
1687        }
1688        return collRModuleAttributes;
1689    }
1690
1691    /**
1692     * If this collection has already been initialized with
1693     * an identical criteria, it returns the collection.
1694     * Otherwise if this IssueType has previously
1695     * been saved, it will retrieve related RModuleAttributes from storage.
1696     * If this IssueType is new, it will return
1697     * an empty collection or the current collection, the criteria
1698     * is ignored on a new object.
1699     *
1700     * @throws TorqueException
1701     */

1702    public List JavaDoc getRModuleAttributes(Criteria criteria) throws TorqueException
1703    {
1704        if (collRModuleAttributes == null)
1705        {
1706            if (isNew())
1707            {
1708               collRModuleAttributes = new ArrayList JavaDoc();
1709            }
1710            else
1711            {
1712                      criteria.add(RModuleAttributePeer.ISSUE_TYPE_ID, getIssueTypeId() );
1713                      collRModuleAttributes = RModuleAttributePeer.doSelect(criteria);
1714            }
1715        }
1716        else
1717        {
1718            // criteria has no effect for a new object
1719
if (!isNew())
1720            {
1721                // the following code is to determine if a new query is
1722
// called for. If the criteria is the same as the last
1723
// one, just return the collection.
1724
criteria.add(RModuleAttributePeer.ISSUE_TYPE_ID, getIssueTypeId() );
1725                      if (!lastRModuleAttributesCriteria.equals(criteria))
1726                {
1727                    collRModuleAttributes = RModuleAttributePeer.doSelect(criteria);
1728                }
1729            }
1730        }
1731        lastRModuleAttributesCriteria = criteria;
1732
1733        return collRModuleAttributes;
1734    }
1735
1736    /**
1737     * If this collection has already been initialized, returns
1738     * the collection. Otherwise returns the results of
1739     * getRModuleAttributes(new Criteria(),Connection)
1740     * This method takes in the Connection also as input so that
1741     * referenced objects can also be obtained using a Connection
1742     * that is taken as input
1743     */

1744    public List JavaDoc getRModuleAttributes(Connection JavaDoc con) throws TorqueException
1745    {
1746        if (collRModuleAttributes == null)
1747        {
1748            collRModuleAttributes = getRModuleAttributes(new Criteria(10),con);
1749        }
1750        return collRModuleAttributes;
1751    }
1752
1753    /**
1754     * If this collection has already been initialized with
1755     * an identical criteria, it returns the collection.
1756     * Otherwise if this IssueType has previously
1757     * been saved, it will retrieve related RModuleAttributes from storage.
1758     * If this IssueType is new, it will return
1759     * an empty collection or the current collection, the criteria
1760     * is ignored on a new object.
1761     * This method takes in the Connection also as input so that
1762     * referenced objects can also be obtained using a Connection
1763     * that is taken as input
1764     */

1765    public List JavaDoc getRModuleAttributes(Criteria criteria,Connection JavaDoc con) throws TorqueException
1766    {
1767        if (collRModuleAttributes == null)
1768        {
1769            if (isNew())
1770            {
1771               collRModuleAttributes = new ArrayList JavaDoc();
1772            }
1773            else
1774            {
1775                       criteria.add(RModuleAttributePeer.ISSUE_TYPE_ID, getIssueTypeId() );
1776                       collRModuleAttributes = RModuleAttributePeer.doSelect(criteria,con);
1777             }
1778         }
1779         else
1780         {
1781             // criteria has no effect for a new object
1782
if (!isNew())
1783             {
1784                 // the following code is to determine if a new query is
1785
// called for. If the criteria is the same as the last
1786
// one, just return the collection.
1787
criteria.add(RModuleAttributePeer.ISSUE_TYPE_ID, getIssueTypeId() );
1788                     if (!lastRModuleAttributesCriteria.equals(criteria))
1789                 {
1790                     collRModuleAttributes = RModuleAttributePeer.doSelect(criteria,con);
1791                 }
1792             }
1793         }
1794         lastRModuleAttributesCriteria = criteria;
1795
1796         return collRModuleAttributes;
1797     }
1798
1799                              
1800              
1801                    
1802                    
1803                                
1804                                                              
1805                                        
1806                    
1807                    
1808          
1809    /**
1810     * If this collection has already been initialized with
1811     * an identical criteria, it returns the collection.
1812     * Otherwise if this IssueType is new, it will return
1813     * an empty collection; or if this IssueType has previously
1814     * been saved, it will retrieve related RModuleAttributes from storage.
1815     *
1816     * This method is protected by default in order to keep the public
1817     * api reasonable. You can provide public methods for those you
1818     * actually need in IssueType.
1819     */

1820    protected List JavaDoc getRModuleAttributesJoinAttribute(Criteria criteria)
1821        throws TorqueException
1822    {
1823        if (collRModuleAttributes == null)
1824        {
1825            if (isNew())
1826            {
1827               collRModuleAttributes = new ArrayList JavaDoc();
1828            }
1829            else
1830            {
1831                            criteria.add(RModuleAttributePeer.ISSUE_TYPE_ID, getIssueTypeId() );
1832                            collRModuleAttributes = RModuleAttributePeer.doSelectJoinAttribute(criteria);
1833            }
1834        }
1835        else
1836        {
1837            // the following code is to determine if a new query is
1838
// called for. If the criteria is the same as the last
1839
// one, just return the collection.
1840

1841                            criteria.add(RModuleAttributePeer.ISSUE_TYPE_ID, getIssueTypeId() );
1842                        if (!lastRModuleAttributesCriteria.equals(criteria))
1843            {
1844                collRModuleAttributes = RModuleAttributePeer.doSelectJoinAttribute(criteria);
1845            }
1846        }
1847        lastRModuleAttributesCriteria = criteria;
1848
1849        return collRModuleAttributes;
1850    }
1851                  
1852                    
1853                    
1854                                
1855                                                              
1856                                        
1857                    
1858                    
1859          
1860    /**
1861     * If this collection has already been initialized with
1862     * an identical criteria, it returns the collection.
1863     * Otherwise if this IssueType is new, it will return
1864     * an empty collection; or if this IssueType has previously
1865     * been saved, it will retrieve related RModuleAttributes from storage.
1866     *
1867     * This method is protected by default in order to keep the public
1868     * api reasonable. You can provide public methods for those you
1869     * actually need in IssueType.
1870     */

1871    protected List JavaDoc getRModuleAttributesJoinScarabModule(Criteria criteria)
1872        throws TorqueException
1873    {
1874        if (collRModuleAttributes == null)
1875        {
1876            if (isNew())
1877            {
1878               collRModuleAttributes = new ArrayList JavaDoc();
1879            }
1880            else
1881            {
1882                            criteria.add(RModuleAttributePeer.ISSUE_TYPE_ID, getIssueTypeId() );
1883                            collRModuleAttributes = RModuleAttributePeer.doSelectJoinScarabModule(criteria);
1884            }
1885        }
1886        else
1887        {
1888            // the following code is to determine if a new query is
1889
// called for. If the criteria is the same as the last
1890
// one, just return the collection.
1891

1892                            criteria.add(RModuleAttributePeer.ISSUE_TYPE_ID, getIssueTypeId() );
1893                        if (!lastRModuleAttributesCriteria.equals(criteria))
1894            {
1895                collRModuleAttributes = RModuleAttributePeer.doSelectJoinScarabModule(criteria);
1896            }
1897        }
1898        lastRModuleAttributesCriteria = criteria;
1899
1900        return collRModuleAttributes;
1901    }
1902                  
1903                    
1904                              
1905                                
1906                                                              
1907                                        
1908                    
1909                    
1910          
1911    /**
1912     * If this collection has already been initialized with
1913     * an identical criteria, it returns the collection.
1914     * Otherwise if this IssueType is new, it will return
1915     * an empty collection; or if this IssueType has previously
1916     * been saved, it will retrieve related RModuleAttributes from storage.
1917     *
1918     * This method is protected by default in order to keep the public
1919     * api reasonable. You can provide public methods for those you
1920     * actually need in IssueType.
1921     */

1922    protected List JavaDoc getRModuleAttributesJoinIssueType(Criteria criteria)
1923        throws TorqueException
1924    {
1925        if (collRModuleAttributes == null)
1926        {
1927            if (isNew())
1928            {
1929               collRModuleAttributes = new ArrayList JavaDoc();
1930            }
1931            else
1932            {
1933                            criteria.add(RModuleAttributePeer.ISSUE_TYPE_ID, getIssueTypeId() );
1934                            collRModuleAttributes = RModuleAttributePeer.doSelectJoinIssueType(criteria);
1935            }
1936        }
1937        else
1938        {
1939            // the following code is to determine if a new query is
1940
// called for. If the criteria is the same as the last
1941
// one, just return the collection.
1942

1943                            criteria.add(RModuleAttributePeer.ISSUE_TYPE_ID, getIssueTypeId() );
1944                        if (!lastRModuleAttributesCriteria.equals(criteria))
1945            {
1946                collRModuleAttributes = RModuleAttributePeer.doSelectJoinIssueType(criteria);
1947            }
1948        }
1949        lastRModuleAttributesCriteria = criteria;
1950
1951        return collRModuleAttributes;
1952    }
1953                            
1954
1955
1956                          
1957            
1958    /**
1959     * Collection to store aggregation of collRIssueTypeAttributes
1960     */

1961    protected List JavaDoc collRIssueTypeAttributes;
1962
1963    /**
1964     * Temporary storage of collRIssueTypeAttributes to save a possible db hit in
1965     * the event objects are add to the collection, but the
1966     * complete collection is never requested.
1967     */

1968    protected void initRIssueTypeAttributes()
1969    {
1970        if (collRIssueTypeAttributes == null)
1971        {
1972            collRIssueTypeAttributes = new ArrayList JavaDoc();
1973        }
1974    }
1975
1976            
1977    /**
1978     * Method called to associate a RIssueTypeAttribute object to this object
1979     * through the RIssueTypeAttribute foreign key attribute
1980     *
1981     * @param l RIssueTypeAttribute
1982     * @throws TorqueException
1983     */

1984    public void addRIssueTypeAttribute(RIssueTypeAttribute l) throws TorqueException
1985    {
1986        getRIssueTypeAttributes().add(l);
1987        l.setIssueType((IssueType)this);
1988    }
1989
1990    /**
1991     * The criteria used to select the current contents of collRIssueTypeAttributes
1992     */

1993    private Criteria lastRIssueTypeAttributesCriteria = null;
1994
1995    /**
1996     * If this collection has already been initialized, returns
1997     * the collection. Otherwise returns the results of
1998     * getRIssueTypeAttributes(new Criteria())
1999     *
2000     * @throws TorqueException
2001     */

2002    public List JavaDoc getRIssueTypeAttributes() throws TorqueException
2003    {
2004        if (collRIssueTypeAttributes == null)
2005        {
2006            collRIssueTypeAttributes = getRIssueTypeAttributes(new Criteria(10));
2007        }
2008        return collRIssueTypeAttributes;
2009    }
2010
2011    /**
2012     * If this collection has already been initialized with
2013     * an identical criteria, it returns the collection.
2014     * Otherwise if this IssueType has previously
2015     * been saved, it will retrieve related RIssueTypeAttributes from storage.
2016     * If this IssueType is new, it will return
2017     * an empty collection or the current collection, the criteria
2018     * is ignored on a new object.
2019     *
2020     * @throws TorqueException
2021     */

2022    public List JavaDoc getRIssueTypeAttributes(Criteria criteria) throws TorqueException
2023    {
2024        if (collRIssueTypeAttributes == null)
2025        {
2026            if (isNew())
2027            {
2028               collRIssueTypeAttributes = new ArrayList JavaDoc();
2029            }
2030            else
2031            {
2032                      criteria.add(RIssueTypeAttributePeer.ISSUE_TYPE_ID, getIssueTypeId() );
2033                      collRIssueTypeAttributes = RIssueTypeAttributePeer.doSelect(criteria);
2034            }
2035        }
2036        else
2037        {
2038            // criteria has no effect for a new object
2039
if (!isNew())
2040            {
2041                // the following code is to determine if a new query is
2042
// called for. If the criteria is the same as the last
2043
// one, just return the collection.
2044
criteria.add(RIssueTypeAttributePeer.ISSUE_TYPE_ID, getIssueTypeId() );
2045                      if (!lastRIssueTypeAttributesCriteria.equals(criteria))
2046                {
2047                    collRIssueTypeAttributes = RIssueTypeAttributePeer.doSelect(criteria);
2048                }
2049            }
2050        }
2051        lastRIssueTypeAttributesCriteria = criteria;
2052
2053        return collRIssueTypeAttributes;
2054    }
2055
2056    /**
2057     * If this collection has already been initialized, returns
2058     * the collection. Otherwise returns the results of
2059     * getRIssueTypeAttributes(new Criteria(),Connection)
2060     * This method takes in the Connection also as input so that
2061     * referenced objects can also be obtained using a Connection
2062     * that is taken as input
2063     */

2064    public List JavaDoc getRIssueTypeAttributes(Connection JavaDoc con) throws TorqueException
2065    {
2066        if (collRIssueTypeAttributes == null)
2067        {
2068            collRIssueTypeAttributes = getRIssueTypeAttributes(new Criteria(10),con);
2069        }
2070        return collRIssueTypeAttributes;
2071    }
2072
2073    /**
2074     * If this collection has already been initialized with
2075     * an identical criteria, it returns the collection.
2076     * Otherwise if this IssueType has previously
2077     * been saved, it will retrieve related RIssueTypeAttributes from storage.
2078     * If this IssueType is new, it will return
2079     * an empty collection or the current collection, the criteria
2080     * is ignored on a new object.
2081     * This method takes in the Connection also as input so that
2082     * referenced objects can also be obtained using a Connection
2083     * that is taken as input
2084     */

2085    public List JavaDoc getRIssueTypeAttributes(Criteria criteria,Connection JavaDoc con) throws TorqueException
2086    {
2087        if (collRIssueTypeAttributes == null)
2088        {
2089            if (isNew())
2090            {
2091               collRIssueTypeAttributes = new ArrayList JavaDoc();
2092            }
2093            else
2094            {
2095                       criteria.add(RIssueTypeAttributePeer.ISSUE_TYPE_ID, getIssueTypeId() );
2096                       collRIssueTypeAttributes = RIssueTypeAttributePeer.doSelect(criteria,con);
2097             }
2098         }
2099         else
2100         {
2101             // criteria has no effect for a new object
2102
if (!isNew())
2103             {
2104                 // the following code is to determine if a new query is
2105
// called for. If the criteria is the same as the last
2106
// one, just return the collection.
2107
criteria.add(RIssueTypeAttributePeer.ISSUE_TYPE_ID, getIssueTypeId() );
2108                     if (!lastRIssueTypeAttributesCriteria.equals(criteria))
2109                 {
2110                     collRIssueTypeAttributes = RIssueTypeAttributePeer.doSelect(criteria,con);
2111                 }
2112             }
2113         }
2114         lastRIssueTypeAttributesCriteria = criteria;
2115
2116         return collRIssueTypeAttributes;
2117     }
2118
2119                        
2120              
2121                    
2122                    
2123                                
2124                                                              
2125                                        
2126                    
2127                    
2128          
2129    /**
2130     * If this collection has already been initialized with
2131     * an identical criteria, it returns the collection.
2132     * Otherwise if this IssueType is new, it will return
2133     * an empty collection; or if this IssueType has previously
2134     * been saved, it will retrieve related RIssueTypeAttributes from storage.
2135     *
2136     * This method is protected by default in order to keep the public
2137     * api reasonable. You can provide public methods for those you
2138     * actually need in IssueType.
2139     */

2140    protected List JavaDoc getRIssueTypeAttributesJoinAttribute(Criteria criteria)
2141        throws TorqueException
2142    {
2143        if (collRIssueTypeAttributes == null)
2144        {
2145            if (isNew())
2146            {
2147               collRIssueTypeAttributes = new ArrayList JavaDoc();
2148            }
2149            else
2150            {
2151                            criteria.add(RIssueTypeAttributePeer.ISSUE_TYPE_ID, getIssueTypeId() );
2152                            collRIssueTypeAttributes = RIssueTypeAttributePeer.doSelectJoinAttribute(criteria);
2153            }
2154        }
2155        else
2156        {
2157            // the following code is to determine if a new query is
2158
// called for. If the criteria is the same as the last
2159
// one, just return the collection.
2160

2161                            criteria.add(RIssueTypeAttributePeer.ISSUE_TYPE_ID, getIssueTypeId() );
2162                        if (!lastRIssueTypeAttributesCriteria.equals(criteria))
2163            {
2164                collRIssueTypeAttributes = RIssueTypeAttributePeer.doSelectJoinAttribute(criteria);
2165            }
2166        }
2167        lastRIssueTypeAttributesCriteria = criteria;
2168
2169        return collRIssueTypeAttributes;
2170    }
2171                  
2172                    
2173                              
2174                                
2175                                                              
2176                                        
2177                    
2178                    
2179          
2180    /**
2181     * If this collection has already been initialized with
2182     * an identical criteria, it returns the collection.
2183     * Otherwise if this IssueType is new, it will return
2184     * an empty collection; or if this IssueType has previously
2185     * been saved, it will retrieve related RIssueTypeAttributes from storage.
2186     *
2187     * This method is protected by default in order to keep the public
2188     * api reasonable. You can provide public methods for those you
2189     * actually need in IssueType.
2190     */

2191    protected List JavaDoc getRIssueTypeAttributesJoinIssueType(Criteria criteria)
2192        throws TorqueException
2193    {
2194        if (collRIssueTypeAttributes == null)
2195        {
2196            if (isNew())
2197            {
2198               collRIssueTypeAttributes = new ArrayList JavaDoc();
2199            }
2200            else
2201            {
2202                            criteria.add(RIssueTypeAttributePeer.ISSUE_TYPE_ID, getIssueTypeId() );
2203                            collRIssueTypeAttributes = RIssueTypeAttributePeer.doSelectJoinIssueType(criteria);
2204            }
2205        }
2206        else
2207        {
2208            // the following code is to determine if a new query is
2209
// called for. If the criteria is the same as the last
2210
// one, just return the collection.
2211

2212                            criteria.add(RIssueTypeAttributePeer.ISSUE_TYPE_ID, getIssueTypeId() );
2213                        if (!lastRIssueTypeAttributesCriteria.equals(criteria))
2214            {
2215                collRIssueTypeAttributes = RIssueTypeAttributePeer.doSelectJoinIssueType(criteria);
2216            }
2217        }
2218        lastRIssueTypeAttributesCriteria = criteria;
2219
2220        return collRIssueTypeAttributes;
2221    }
2222                            
2223
2224
2225                          
2226            
2227    /**
2228     * Collection to store aggregation of collRModuleOptions
2229     */

2230    protected List JavaDoc collRModuleOptions;
2231
2232    /**
2233     * Temporary storage of collRModuleOptions to save a possible db hit in
2234     * the event objects are add to the collection, but the
2235     * complete collection is never requested.
2236     */

2237    protected void initRModuleOptions()
2238    {
2239        if (collRModuleOptions == null)
2240        {
2241            collRModuleOptions = new ArrayList JavaDoc();
2242        }
2243    }
2244
2245            
2246    /**
2247     * Method called to associate a RModuleOption object to this object
2248     * through the RModuleOption foreign key attribute
2249     *
2250     * @param l RModuleOption
2251     * @throws TorqueException
2252     */

2253    public void addRModuleOption(RModuleOption l) throws TorqueException
2254    {
2255        getRModuleOptions().add(l);
2256        l.setIssueType((IssueType)this);
2257    }
2258
2259    /**
2260     * The criteria used to select the current contents of collRModuleOptions
2261     */

2262    private Criteria lastRModuleOptionsCriteria = null;
2263
2264    /**
2265     * If this collection has already been initialized, returns
2266     * the collection. Otherwise returns the results of
2267     * getRModuleOptions(new Criteria())
2268     *
2269     * @throws TorqueException
2270     */

2271    public List JavaDoc getRModuleOptions() throws TorqueException
2272    {
2273        if (collRModuleOptions == null)
2274        {
2275            collRModuleOptions = getRModuleOptions(new Criteria(10));
2276        }
2277        return collRModuleOptions;
2278    }
2279
2280    /**
2281     * If this collection has already been initialized with
2282     * an identical criteria, it returns the collection.
2283     * Otherwise if this IssueType has previously
2284     * been saved, it will retrieve related RModuleOptions from storage.
2285     * If this IssueType is new, it will return
2286     * an empty collection or the current collection, the criteria
2287     * is ignored on a new object.
2288     *
2289     * @throws TorqueException
2290     */

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

2333    public List JavaDoc getRModuleOptions(Connection JavaDoc con) throws TorqueException
2334    {
2335        if (collRModuleOptions == null)
2336        {
2337            collRModuleOptions = getRModuleOptions(new Criteria(10),con);
2338        }
2339        return collRModuleOptions;
2340    }
2341
2342    /**
2343     * If this collection has already been initialized with
2344     * an identical criteria, it returns the collection.
2345     * Otherwise if this IssueType has previously
2346     * been saved, it will retrieve related RModuleOptions from storage.
2347     * If this IssueType is new, it will return
2348     * an empty collection or the current collection, the criteria
2349     * is ignored on a new object.
2350     * This method takes in the Connection also as input so that
2351     * referenced objects can also be obtained using a Connection
2352     * that is taken as input
2353     */

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

2409    protected List JavaDoc getRModuleOptionsJoinAttributeOption(Criteria criteria)
2410        throws TorqueException
2411    {
2412        if (collRModuleOptions == null)
2413        {
2414            if (isNew())
2415            {
2416               collRModuleOptions = new ArrayList JavaDoc();
2417            }
2418            else
2419            {
2420                            criteria.add(RModuleOptionPeer.ISSUE_TYPE_ID, getIssueTypeId() );
2421                            collRModuleOptions = RModuleOptionPeer.doSelectJoinAttributeOption(criteria);
2422            }
2423        }
2424        else
2425        {
2426            // the following code is to determine if a new query is
2427
// called for. If the criteria is the same as the last
2428
// one, just return the collection.
2429

2430                            criteria.add(RModuleOptionPeer.ISSUE_TYPE_ID, getIssueTypeId() );
2431                        if (!lastRModuleOptionsCriteria.equals(criteria))
2432            {
2433                collRModuleOptions = RModuleOptionPeer.doSelectJoinAttributeOption(criteria);
2434            }
2435        }
2436        lastRModuleOptionsCriteria = criteria;
2437
2438        return collRModuleOptions;
2439    }
2440                  
2441                    
2442                    
2443                                
2444                                                              
2445                                        
2446                    
2447                    
2448          
2449    /**
2450     * If this collection has already been initialized with
2451     * an identical criteria, it returns the collection.
2452     * Otherwise if this IssueType is new, it will return
2453     * an empty collection; or if this IssueType has previously
2454     * been saved, it will retrieve related RModuleOptions from storage.
2455     *
2456     * This method is protected by default in order to keep the public
2457     * api reasonable. You can provide public methods for those you
2458     * actually need in IssueType.
2459     */

2460    protected List JavaDoc getRModuleOptionsJoinScarabModule(Criteria criteria)
2461        throws TorqueException
2462    {
2463        if (collRModuleOptions == null)
2464        {
2465            if (isNew())
2466            {
2467               collRModuleOptions = new ArrayList JavaDoc();
2468            }
2469            else
2470            {
2471                            criteria.add(RModuleOptionPeer.ISSUE_TYPE_ID, getIssueTypeId() );
2472                            collRModuleOptions = RModuleOptionPeer.doSelectJoinScarabModule(criteria);
2473            }
2474        }
2475        else
2476        {
2477            // the following code is to determine if a new query is
2478
// called for. If the criteria is the same as the last
2479
// one, just return the collection.
2480

2481                            criteria.add(RModuleOptionPeer.ISSUE_TYPE_ID, getIssueTypeId() );
2482                        if (!lastRModuleOptionsCriteria.equals(criteria))
2483            {
2484                collRModuleOptions = RModuleOptionPeer.doSelectJoinScarabModule(criteria);
2485            }
2486        }
2487        lastRModuleOptionsCriteria = criteria;
2488
2489        return collRModuleOptions;
2490    }
2491                  
2492                    
2493                              
2494                                
2495                                                              
2496                                        
2497                    
2498                    
2499          
2500    /**
2501     * If this collection has already been initialized with
2502     * an identical criteria, it returns the collection.
2503     * Otherwise if this IssueType is new, it will return
2504     * an empty collection; or if this IssueType has previously
2505     * been saved, it will retrieve related RModuleOptions from storage.
2506     *
2507     * This method is protected by default in order to keep the public
2508     * api reasonable. You can provide public methods for those you
2509     * actually need in IssueType.
2510     */

2511    protected List JavaDoc getRModuleOptionsJoinIssueType(Criteria criteria)
2512        throws TorqueException
2513    {
2514        if (collRModuleOptions == null)
2515        {
2516            if (isNew())
2517            {
2518               collRModuleOptions = new ArrayList JavaDoc();
2519            }
2520            else
2521            {
2522                            criteria.add(RModuleOptionPeer.ISSUE_TYPE_ID, getIssueTypeId() );
2523                            collRModuleOptions = RModuleOptionPeer.doSelectJoinIssueType(criteria);
2524            }
2525        }
2526        else
2527        {
2528            // the following code is to determine if a new query is
2529
// called for. If the criteria is the same as the last
2530
// one, just return the collection.
2531

2532                            criteria.add(RModuleOptionPeer.ISSUE_TYPE_ID, getIssueTypeId() );
2533                        if (!lastRModuleOptionsCriteria.equals(criteria))
2534            {
2535                collRModuleOptions = RModuleOptionPeer.doSelectJoinIssueType(criteria);
2536            }
2537        }
2538        lastRModuleOptionsCriteria = criteria;
2539
2540        return collRModuleOptions;
2541    }
2542                            
2543
2544
2545                          
2546            
2547    /**
2548     * Collection to store aggregation of collRIssueTypeOptions
2549     */

2550    protected List JavaDoc collRIssueTypeOptions;
2551
2552    /**
2553     * Temporary storage of collRIssueTypeOptions to save a possible db hit in
2554     * the event objects are add to the collection, but the
2555     * complete collection is never requested.
2556     */

2557    protected void initRIssueTypeOptions()
2558    {
2559        if (collRIssueTypeOptions == null)
2560        {
2561            collRIssueTypeOptions = new ArrayList JavaDoc();
2562        }
2563    }
2564
2565            
2566    /**
2567     * Method called to associate a RIssueTypeOption object to this object
2568     * through the RIssueTypeOption foreign key attribute
2569     *
2570     * @param l RIssueTypeOption
2571     * @throws TorqueException
2572     */

2573    public void addRIssueTypeOption(RIssueTypeOption l) throws TorqueException
2574    {
2575        getRIssueTypeOptions().add(l);
2576        l.setIssueType((IssueType)this);
2577    }
2578
2579    /**
2580     * The criteria used to select the current contents of collRIssueTypeOptions
2581     */

2582    private Criteria lastRIssueTypeOptionsCriteria = null;
2583
2584    /**
2585     * If this collection has already been initialized, returns
2586     * the collection. Otherwise returns the results of
2587     * getRIssueTypeOptions(new Criteria())
2588     *
2589     * @throws TorqueException
2590     */

2591    public List JavaDoc getRIssueTypeOptions() throws TorqueException
2592    {
2593        if (collRIssueTypeOptions == null)
2594        {
2595            collRIssueTypeOptions = getRIssueTypeOptions(new Criteria(10));
2596        }
2597        return collRIssueTypeOptions;
2598    }
2599
2600    /**
2601     * If this collection has already been initialized with
2602     * an identical criteria, it returns the collection.
2603     * Otherwise if this IssueType has previously
2604     * been saved, it will retrieve related RIssueTypeOptions from storage.
2605     * If this IssueType is new, it will return
2606     * an empty collection or the current collection, the criteria
2607     * is ignored on a new object.
2608     *
2609     * @throws TorqueException
2610     */

2611    public List JavaDoc getRIssueTypeOptions(Criteria criteria) throws TorqueException
2612    {
2613        if (collRIssueTypeOptions == null)
2614        {
2615            if (isNew())
2616            {
2617               collRIssueTypeOptions = new ArrayList JavaDoc();
2618            }
2619            else
2620            {
2621                      criteria.add(RIssueTypeOptionPeer.ISSUE_TYPE_ID, getIssueTypeId() );
2622                      collRIssueTypeOptions = RIssueTypeOptionPeer.doSelect(criteria);
2623            }
2624        }
2625        else
2626        {
2627            // criteria has no effect for a new object
2628
if (!isNew())
2629            {
2630                // the following code is to determine if a new query is
2631
// called for. If the criteria is the same as the last
2632
// one, just return the collection.
2633
criteria.add(RIssueTypeOptionPeer.ISSUE_TYPE_ID, getIssueTypeId() );
2634                      if (!lastRIssueTypeOptionsCriteria.equals(criteria))
2635                {
2636                    collRIssueTypeOptions = RIssueTypeOptionPeer.doSelect(criteria);
2637                }
2638            }
2639        }
2640        lastRIssueTypeOptionsCriteria = criteria;
2641
2642        return collRIssueTypeOptions;
2643    }
2644
2645    /**
2646     * If this collection has already been initialized, returns
2647     * the collection. Otherwise returns the results of
2648     * getRIssueTypeOptions(new Criteria(),Connection)
2649     * This method takes in the Connection also as input so that
2650     * referenced objects can also be obtained using a Connection
2651     * that is taken as input
2652     */

2653    public List JavaDoc getRIssueTypeOptions(Connection JavaDoc con) throws TorqueException
2654    {
2655        if (collRIssueTypeOptions == null)
2656        {
2657            collRIssueTypeOptions = getRIssueTypeOptions(new Criteria(10),con);
2658        }
2659        return collRIssueTypeOptions;
2660    }
2661
2662    /**
2663     * If this collection has already been initialized with
2664     * an identical criteria, it returns the collection.
2665     * Otherwise if this IssueType has previously
2666     * been saved, it will retrieve related RIssueTypeOptions from storage.
2667     * If this IssueType is new, it will return
2668     * an empty collection or the current collection, the criteria
2669     * is ignored on a new object.
2670     * This method takes in the Connection also as input so that
2671     * referenced objects can also be obtained using a Connection
2672     * that is taken as input
2673     */

2674    public List JavaDoc getRIssueTypeOptions(Criteria criteria,Connection JavaDoc con) throws TorqueException
2675    {
2676        if (collRIssueTypeOptions == null)
2677        {
2678            if (isNew())
2679            {
2680               collRIssueTypeOptions = new ArrayList JavaDoc();
2681            }
2682            else
2683            {
2684                       criteria.add(RIssueTypeOptionPeer.ISSUE_TYPE_ID, getIssueTypeId() );
2685                       collRIssueTypeOptions = RIssueTypeOptionPeer.doSelect(criteria,con);
2686             }
2687         }
2688         else
2689         {
2690             // criteria has no effect for a new object
2691
if (!isNew())
2692             {
2693                 // the following code is to determine if a new query is
2694
// called for. If the criteria is the same as the last
2695
// one, just return the collection.
2696
criteria.add(RIssueTypeOptionPeer.ISSUE_TYPE_ID, getIssueTypeId() );
2697                     if (!lastRIssueTypeOptionsCriteria.equals(criteria))
2698                 {
2699                     collRIssueTypeOptions = RIssueTypeOptionPeer.doSelect(criteria,con);
2700                 }
2701             }
2702         }
2703         lastRIssueTypeOptionsCriteria = criteria;
2704
2705         return collRIssueTypeOptions;
2706     }
2707
2708                        
2709              
2710                    
2711                    
2712                                
2713                                                              
2714                                        
2715                    
2716                    
2717          
2718    /**
2719     * If this collection has already been initialized with
2720     * an identical criteria, it returns the collection.
2721     * Otherwise if this IssueType is new, it will return
2722     * an empty collection; or if this IssueType has previously
2723     * been saved, it will retrieve related RIssueTypeOptions from storage.
2724     *
2725     * This method is protected by default in order to keep the public
2726     * api reasonable. You can provide public methods for those you
2727     * actually need in IssueType.
2728     */

2729    protected List JavaDoc getRIssueTypeOptionsJoinAttributeOption(Criteria criteria)
2730        throws TorqueException
2731    {
2732        if (collRIssueTypeOptions == null)
2733        {
2734            if (isNew())
2735            {
2736               collRIssueTypeOptions = new ArrayList JavaDoc();
2737            }
2738            else
2739            {
2740                            criteria.add(RIssueTypeOptionPeer.ISSUE_TYPE_ID, getIssueTypeId() );
2741                            collRIssueTypeOptions = RIssueTypeOptionPeer.doSelectJoinAttributeOption(criteria);
2742            }
2743        }
2744        else
2745        {
2746            // the following code is to determine if a new query is
2747
// called for. If the criteria is the same as the last
2748
// one, just return the collection.
2749

2750                            criteria.add(RIssueTypeOptionPeer.ISSUE_TYPE_ID, getIssueTypeId() );
2751                        if (!lastRIssueTypeOptionsCriteria.equals(criteria))
2752            {
2753                collRIssueTypeOptions = RIssueTypeOptionPeer.doSelectJoinAttributeOption(criteria);
2754            }
2755        }
2756        lastRIssueTypeOptionsCriteria = criteria;
2757
2758        return collRIssueTypeOptions;
2759    }
2760                  
2761                    
2762                              
2763                                
2764                                                              
2765                                        
2766                    
2767                    
2768          
2769    /**
2770     * If this collection has already been initialized with
2771     * an identical criteria, it returns the collection.
2772     * Otherwise if this IssueType is new, it will return
2773     * an empty collection; or if this IssueType has previously
2774     * been saved, it will retrieve related RIssueTypeOptions from storage.
2775     *
2776     * This method is protected by default in order to keep the public
2777     * api reasonable. You can provide public methods for those you
2778     * actually need in IssueType.
2779     */

2780    protected List JavaDoc getRIssueTypeOptionsJoinIssueType(Criteria criteria)
2781        throws TorqueException
2782    {
2783        if (collRIssueTypeOptions == null)
2784        {
2785            if (isNew())
2786            {
2787               collRIssueTypeOptions = new ArrayList JavaDoc();
2788            }
2789            else
2790            {
2791                            criteria.add(RIssueTypeOptionPeer.ISSUE_TYPE_ID, getIssueTypeId() );
2792                            collRIssueTypeOptions = RIssueTypeOptionPeer.doSelectJoinIssueType(criteria);
2793            }
2794        }
2795        else
2796        {
2797            // the following code is to determine if a new query is
2798
// called for. If the criteria is the same as the last
2799
// one, just return the collection.
2800

2801                            criteria.add(RIssueTypeOptionPeer.ISSUE_TYPE_ID, getIssueTypeId() );
2802                        if (!lastRIssueTypeOptionsCriteria.equals(criteria))
2803            {
2804                collRIssueTypeOptions = RIssueTypeOptionPeer.doSelectJoinIssueType(criteria);
2805            }
2806        }
2807        lastRIssueTypeOptionsCriteria = criteria;
2808
2809        return collRIssueTypeOptions;
2810    }
2811                            
2812
2813
2814                          
2815            
2816    /**
2817     * Collection to store aggregation of collRModuleUserAttributes
2818     */

2819    protected List JavaDoc collRModuleUserAttributes;
2820
2821    /**
2822     * Temporary storage of collRModuleUserAttributes to save a possible db hit in
2823     * the event objects are add to the collection, but the
2824     * complete collection is never requested.
2825     */

2826    protected void initRModuleUserAttributes()
2827    {
2828        if (collRModuleUserAttributes == null)
2829        {
2830            collRModuleUserAttributes = new ArrayList JavaDoc();
2831        }
2832    }
2833
2834            
2835    /**
2836     * Method called to associate a RModuleUserAttribute object to this object
2837     * through the RModuleUserAttribute foreign key attribute
2838     *
2839     * @param l RModuleUserAttribute
2840     * @throws TorqueException
2841     */

2842    public void addRModuleUserAttribute(RModuleUserAttribute l) throws TorqueException
2843    {
2844        getRModuleUserAttributes().add(l);
2845        l.setIssueType((IssueType)this);
2846    }
2847
2848    /**
2849     * The criteria used to select the current contents of collRModuleUserAttributes
2850     */

2851    private Criteria lastRModuleUserAttributesCriteria = null;
2852
2853    /**
2854     * If this collection has already been initialized, returns
2855     * the collection. Otherwise returns the results of
2856     * getRModuleUserAttributes(new Criteria())
2857     *
2858     * @throws TorqueException
2859     */

2860    public List JavaDoc getRModuleUserAttributes() throws TorqueException
2861    {
2862        if (collRModuleUserAttributes == null)
2863        {
2864            collRModuleUserAttributes = getRModuleUserAttributes(new Criteria(10));
2865        }
2866        return collRModuleUserAttributes;
2867    }
2868
2869    /**
2870     * If this collection has already been initialized with
2871     * an identical criteria, it returns the collection.
2872     * Otherwise if this IssueType has previously
2873     * been saved, it will retrieve related RModuleUserAttributes from storage.
2874     * If this IssueType is new, it will return
2875     * an empty collection or the current collection, the criteria
2876     * is ignored on a new object.
2877     *
2878     * @throws TorqueException
2879     */

2880    public List JavaDoc getRModuleUserAttributes(Criteria criteria) throws TorqueException
2881    {
2882        if (collRModuleUserAttributes == null)
2883        {
2884            if (isNew())
2885            {
2886               collRModuleUserAttributes = new ArrayList JavaDoc();
2887            }
2888            else
2889            {
2890                      criteria.add(RModuleUserAttributePeer.ISSUE_TYPE_ID, getIssueTypeId() );
2891                      collRModuleUserAttributes = RModuleUserAttributePeer.doSelect(criteria);
2892            }
2893        }
2894        else
2895        {
2896            // criteria has no effect for a new object
2897
if (!isNew())
2898            {
2899                // the following code is to determine if a new query is
2900
// called for. If the criteria is the same as the last
2901
// one, just return the collection.
2902
criteria.add(RModuleUserAttributePeer.ISSUE_TYPE_ID, getIssueTypeId() );
2903                      if (!lastRModuleUserAttributesCriteria.equals(criteria))
2904                {
2905                    collRModuleUserAttributes = RModuleUserAttributePeer.doSelect(criteria);
2906                }
2907            }
2908        }
2909        lastRModuleUserAttributesCriteria = criteria;
2910
2911        return collRModuleUserAttributes;
2912    }
2913
2914    /**
2915     * If this collection has already been initialized, returns
2916     * the collection. Otherwise returns the results of
2917     * getRModuleUserAttributes(new Criteria(),Connection)
2918     * This method takes in the Connection also as input so that
2919     * referenced objects can also be obtained using a Connection
2920     * that is taken as input
2921     */

2922    public List JavaDoc getRModuleUserAttributes(Connection JavaDoc con) throws TorqueException
2923    {
2924        if (collRModuleUserAttributes == null)
2925        {
2926            collRModuleUserAttributes = getRModuleUserAttributes(new Criteria(10),con);
2927        }
2928        return collRModuleUserAttributes;
2929    }
2930
2931    /**
2932     * If this collection has already been initialized with
2933     * an identical criteria, it returns the collection.
2934     * Otherwise if this IssueType has previously
2935     * been saved, it will retrieve related RModuleUserAttributes from storage.
2936     * If this IssueType is new, it will return
2937     * an empty collection or the current collection, the criteria
2938     * is ignored on a new object.
2939     * This method takes in the Connection also as input so that
2940     * referenced objects can also be obtained using a Connection
2941     * that is taken as input
2942     */

2943    public List JavaDoc getRModuleUserAttributes(Criteria criteria,Connection JavaDoc con) throws TorqueException
2944    {
2945        if (collRModuleUserAttributes == null)
2946        {
2947            if (isNew())
2948            {
2949               collRModuleUserAttributes = new ArrayList JavaDoc();
2950            }
2951            else
2952            {
2953                       criteria.add(RModuleUserAttributePeer.ISSUE_TYPE_ID, getIssueTypeId() );
2954                       collRModuleUserAttributes = RModuleUserAttributePeer.doSelect(criteria,con);
2955             }
2956         }
2957         else
2958         {
2959             // criteria has no effect for a new object
2960
if (!isNew())
2961             {
2962                 // the following code is to determine if a new query is
2963
// called for. If the criteria is the same as the last
2964
// one, just return the collection.
2965
criteria.add(RModuleUserAttributePeer.ISSUE_TYPE_ID, getIssueTypeId() );
2966                     if (!lastRModuleUserAttributesCriteria.equals(criteria))
2967                 {
2968                     collRModuleUserAttributes = RModuleUserAttributePeer.doSelect(criteria,con);
2969                 }
2970             }
2971         }
2972         lastRModuleUserAttributesCriteria = criteria;
2973
2974         return collRModuleUserAttributes;
2975     }
2976
2977                                          
2978              
2979                    
2980                    
2981                                
2982                                                              
2983                                        
2984                    
2985                    
2986          
2987    /**
2988     * If this collection has already been initialized with
2989     * an identical criteria, it returns the collection.
2990     * Otherwise if this IssueType is new, it will return
2991     * an empty collection; or if this IssueType has previously
2992     * been saved, it will retrieve related RModuleUserAttributes from storage.
2993     *
2994     * This method is protected by default in order to keep the public
2995     * api reasonable. You can provide public methods for those you
2996     * actually need in IssueType.
2997     */

2998    protected List JavaDoc getRModuleUserAttributesJoinMITList(Criteria criteria)
2999        throws TorqueException
3000    {
3001        if (collRModuleUserAttributes == null)
3002        {
3003            if (isNew())
3004            {
3005               collRModuleUserAttributes = new ArrayList JavaDoc();
3006            }
3007            else
3008            {
3009                            criteria.add(RModuleUserAttributePeer.ISSUE_TYPE_ID, getIssueTypeId() );
3010                            collRModuleUserAttributes = RModuleUserAttributePeer.doSelectJoinMITList(criteria);
3011            }
3012        }
3013        else
3014        {
3015            // the following code is to determine if a new query is
3016
// called for. If the criteria is the same as the last
3017
// one, just return the collection.
3018

3019                            criteria.add(RModuleUserAttributePeer.ISSUE_TYPE_ID, getIssueTypeId() );
3020                        if (!lastRModuleUserAttributesCriteria.equals(criteria))
3021            {
3022                collRModuleUserAttributes = RModuleUserAttributePeer.doSelectJoinMITList(criteria);
3023            }
3024        }
3025        lastRModuleUserAttributesCriteria = criteria;
3026
3027        return collRModuleUserAttributes;
3028    }
3029                  
3030                    
3031                    
3032                                
3033                                                              
3034                                        
3035                    
3036                    
3037          
3038    /**
3039     * If this collection has already been initialized with
3040     * an identical criteria, it returns the collection.
3041     * Otherwise if this IssueType is new, it will return
3042     * an empty collection; or if this IssueType has previously
3043     * been saved, it will retrieve related RModuleUserAttributes from storage.
3044     *
3045     * This method is protected by default in order to keep the public
3046     * api reasonable. You can provide public methods for those you
3047     * actually need in IssueType.
3048     */

3049    protected List JavaDoc getRModuleUserAttributesJoinScarabModule(Criteria criteria)
3050        throws TorqueException
3051    {
3052        if (collRModuleUserAttributes == null)
3053        {
3054            if (isNew())
3055            {
3056               collRModuleUserAttributes = new ArrayList JavaDoc();
3057            }
3058            else
3059            {
3060                            criteria.add(RModuleUserAttributePeer.ISSUE_TYPE_ID, getIssueTypeId() );
3061                            collRModuleUserAttributes = RModuleUserAttributePeer.doSelectJoinScarabModule(criteria);
3062            }
3063        }
3064        else
3065        {
3066            // the following code is to determine if a new query is
3067
// called for. If the criteria is the same as the last
3068
// one, just return the collection.
3069

3070                            criteria.add(RModuleUserAttributePeer.ISSUE_TYPE_ID, getIssueTypeId() );
3071                        if (!lastRModuleUserAttributesCriteria.equals(criteria))
3072            {
3073                collRModuleUserAttributes = RModuleUserAttributePeer.doSelectJoinScarabModule(criteria);
3074            }
3075        }
3076        lastRModuleUserAttributesCriteria = criteria;
3077
3078        return collRModuleUserAttributes;
3079    }
3080                  
3081                    
3082                    
3083                                
3084                                                              
3085                                        
3086                    
3087                    
3088          
3089    /**
3090     * If this collection has already been initialized with
3091     * an identical criteria, it returns the collection.
3092     * Otherwise if this IssueType is new, it will return
3093     * an empty collection; or if this IssueType has previously
3094     * been saved, it will retrieve related RModuleUserAttributes from storage.
3095     *
3096     * This method is protected by default in order to keep the public
3097     * api reasonable. You can provide public methods for those you
3098     * actually need in IssueType.
3099     */

3100    protected List JavaDoc getRModuleUserAttributesJoinScarabUserImpl(Criteria criteria)
3101        throws TorqueException
3102    {
3103        if (collRModuleUserAttributes == null)
3104        {
3105            if (isNew())
3106            {
3107               collRModuleUserAttributes = new ArrayList JavaDoc();
3108            }
3109            else
3110            {
3111                            criteria.add(RModuleUserAttributePeer.ISSUE_TYPE_ID, getIssueTypeId() );
3112                            collRModuleUserAttributes = RModuleUserAttributePeer.doSelectJoinScarabUserImpl(criteria);
3113            }
3114        }
3115        else
3116        {
3117            // the following code is to determine if a new query is
3118
// called for. If the criteria is the same as the last
3119
// one, just return the collection.
3120

3121                            criteria.add(RModuleUserAttributePeer.ISSUE_TYPE_ID, getIssueTypeId() );
3122                        if (!lastRModuleUserAttributesCriteria.equals(criteria))
3123            {
3124                collRModuleUserAttributes = RModuleUserAttributePeer.doSelectJoinScarabUserImpl(criteria);
3125            }
3126        }
3127        lastRModuleUserAttributesCriteria = criteria;
3128
3129        return collRModuleUserAttributes;
3130    }
3131                  
3132                    
3133                              
3134                                
3135                                                              
3136                                        
3137                    
3138                    
3139          
3140    /**
3141     * If this collection has already been initialized with
3142     * an identical criteria, it returns the collection.
3143     * Otherwise if this IssueType is new, it will return
3144     * an empty collection; or if this IssueType has previously
3145     * been saved, it will retrieve related RModuleUserAttributes from storage.
3146     *
3147     * This method is protected by default in order to keep the public
3148     * api reasonable. You can provide public methods for those you
3149     * actually need in IssueType.
3150     */

3151    protected List JavaDoc getRModuleUserAttributesJoinIssueType(Criteria criteria)
3152        throws TorqueException
3153    {
3154        if (collRModuleUserAttributes == null)
3155        {
3156            if (isNew())
3157            {
3158               collRModuleUserAttributes = new ArrayList JavaDoc();
3159            }
3160            else
3161            {
3162                            criteria.add(RModuleUserAttributePeer.ISSUE_TYPE_ID, getIssueTypeId() );
3163                            collRModuleUserAttributes = RModuleUserAttributePeer.doSelectJoinIssueType(criteria);
3164            }
3165        }
3166        else
3167        {
3168            // the following code is to determine if a new query is
3169
// called for. If the criteria is the same as the last
3170
// one, just return the collection.
3171

3172                            criteria.add(RModuleUserAttributePeer.ISSUE_TYPE_ID, getIssueTypeId() );
3173                        if (!lastRModuleUserAttributesCriteria.equals(criteria))
3174            {
3175                collRModuleUserAttributes = RModuleUserAttributePeer.doSelectJoinIssueType(criteria);
3176            }
3177        }
3178        lastRModuleUserAttributesCriteria = criteria;
3179
3180        return collRModuleUserAttributes;
3181    }
3182                  
3183                    
3184                    
3185                                
3186                                                              
3187                                        
3188                    
3189                    
3190          
3191    /**
3192     * If this collection has already been initialized with
3193     * an identical criteria, it returns the collection.
3194     * Otherwise if this IssueType is new, it will return
3195     * an empty collection; or if this IssueType has previously
3196     * been saved, it will retrieve related RModuleUserAttributes from storage.
3197     *
3198     * This method is protected by default in order to keep the public
3199     * api reasonable. You can provide public methods for those you
3200     * actually need in IssueType.
3201     */

3202    protected List JavaDoc getRModuleUserAttributesJoinAttribute(Criteria criteria)
3203        throws TorqueException
3204    {
3205        if (collRModuleUserAttributes == null)
3206        {
3207            if (isNew())
3208            {
3209               collRModuleUserAttributes = new ArrayList JavaDoc();
3210            }
3211            else
3212            {
3213                            criteria.add(RModuleUserAttributePeer.ISSUE_TYPE_ID, getIssueTypeId() );
3214                            collRModuleUserAttributes = RModuleUserAttributePeer.doSelectJoinAttribute(criteria);
3215            }
3216        }
3217        else
3218        {
3219            // the following code is to determine if a new query is
3220
// called for. If the criteria is the same as the last
3221
// one, just return the collection.
3222

3223                            criteria.add(RModuleUserAttributePeer.ISSUE_TYPE_ID, getIssueTypeId() );
3224                        if (!lastRModuleUserAttributesCriteria.equals(criteria))
3225            {
3226                collRModuleUserAttributes = RModuleUserAttributePeer.doSelectJoinAttribute(criteria);
3227            }
3228        }
3229        lastRModuleUserAttributesCriteria = criteria;
3230
3231        return collRModuleUserAttributes;
3232    }
3233                            
3234
3235
3236                          
3237            
3238    /**
3239     * Collection to store aggregation of collQuerys
3240     */

3241    protected List JavaDoc collQuerys;
3242
3243    /**
3244     * Temporary storage of collQuerys to save a possible db hit in
3245     * the event objects are add to the collection, but the
3246     * complete collection is never requested.
3247     */

3248    protected void initQuerys()
3249    {
3250        if (collQuerys == null)
3251        {
3252            collQuerys = new ArrayList JavaDoc();
3253        }
3254    }
3255
3256            
3257    /**
3258     * Method called to associate a Query object to this object
3259     * through the Query foreign key attribute
3260     *
3261     * @param l Query
3262     * @throws TorqueException
3263     */

3264    public void addQuery(Query l) throws TorqueException
3265    {
3266        getQuerys().add(l);
3267        l.setIssueType((IssueType)this);
3268    }
3269
3270    /**
3271     * The criteria used to select the current contents of collQuerys
3272     */

3273    private Criteria lastQuerysCriteria = null;
3274
3275    /**
3276     * If this collection has already been initialized, returns
3277     * the collection. Otherwise returns the results of
3278     * getQuerys(new Criteria())
3279     *
3280     * @throws TorqueException
3281     */

3282    public List JavaDoc getQuerys() throws TorqueException
3283    {
3284        if (collQuerys == null)
3285        {
3286            collQuerys = getQuerys(new Criteria(10));
3287        }
3288        return collQuerys;
3289    }
3290
3291    /**
3292     * If this collection has already been initialized with
3293     * an identical criteria, it returns the collection.
3294     * Otherwise if this IssueType has previously
3295     * been saved, it will retrieve related Querys from storage.
3296     * If this IssueType is new, it will return
3297     * an empty collection or the current collection, the criteria
3298     * is ignored on a new object.
3299     *
3300     * @throws TorqueException
3301     */

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

3344    public List JavaDoc getQuerys(Connection JavaDoc con) throws TorqueException
3345    {
3346        if (collQuerys == null)
3347        {
3348            collQuerys = getQuerys(new Criteria(10),con);
3349        }
3350        return collQuerys;
3351    }
3352
3353    /**
3354     * If this collection has already been initialized with
3355     * an identical criteria, it returns the collection.
3356     * Otherwise if this IssueType has previously
3357     * been saved, it will retrieve related Querys from storage.
3358     * If this IssueType is new, it will return
3359     * an empty collection or the current collection, the criteria
3360     * is ignored on a new object.
3361     * This method takes in the Connection also as input so that
3362     * referenced objects can also be obtained using a Connection
3363     * that is taken as input
3364     */

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

3420    protected List JavaDoc getQuerysJoinScarabUserImpl(Criteria criteria)
3421        throws TorqueException
3422    {
3423        if (collQuerys == null)
3424        {
3425            if (isNew())
3426            {
3427               collQuerys = new ArrayList JavaDoc();
3428            }
3429            else
3430            {
3431                            criteria.add(QueryPeer.ISSUE_TYPE_ID, getIssueTypeId() );
3432                            collQuerys = QueryPeer.doSelectJoinScarabUserImpl(criteria);
3433            }
3434        }
3435        else
3436        {
3437            // the following code is to determine if a new query is
3438
// called for. If the criteria is the same as the last
3439
// one, just return the collection.
3440

3441                            criteria.add(QueryPeer.ISSUE_TYPE_ID, getIssueTypeId() );
3442                        if (!lastQuerysCriteria.equals(criteria))
3443            {
3444                collQuerys = QueryPeer.doSelectJoinScarabUserImpl(criteria);
3445            }
3446        }
3447        lastQuerysCriteria = criteria;
3448
3449        return collQuerys;
3450    }
3451                  
3452                    
3453                    
3454                                
3455                                                              
3456                                        
3457                    
3458                    
3459          
3460    /**
3461     * If this collection has already been initialized with
3462     * an identical criteria, it returns the collection.
3463     * Otherwise if this IssueType is new, it will return
3464     * an empty collection; or if this IssueType has previously
3465     * been saved, it will retrieve related Querys from storage.
3466     *
3467     * This method is protected by default in order to keep the public
3468     * api reasonable. You can provide public methods for those you
3469     * actually need in IssueType.
3470     */

3471    protected List JavaDoc getQuerysJoinScope(Criteria criteria)
3472        throws TorqueException
3473    {
3474        if (collQuerys == null)
3475        {
3476            if (isNew())
3477            {
3478               collQuerys = new ArrayList JavaDoc();
3479            }
3480            else
3481            {
3482                            criteria.add(QueryPeer.ISSUE_TYPE_ID, getIssueTypeId() );
3483                            collQuerys = QueryPeer.doSelectJoinScope(criteria);
3484            }
3485        }
3486        else
3487        {
3488            // the following code is to determine if a new query is
3489
// called for. If the criteria is the same as the last
3490
// one, just return the collection.
3491

3492                            criteria.add(QueryPeer.ISSUE_TYPE_ID, getIssueTypeId() );
3493                        if (!lastQuerysCriteria.equals(criteria))
3494            {
3495                collQuerys = QueryPeer.doSelectJoinScope(criteria);
3496            }
3497        }
3498        lastQuerysCriteria = criteria;
3499
3500        return collQuerys;
3501    }
3502                  
3503                    
3504                    
3505                                
3506                                                              
3507                                        
3508                    
3509                    
3510          
3511    /**
3512     * If this collection has already been initialized with
3513     * an identical criteria, it returns the collection.
3514     * Otherwise if this IssueType is new, it will return
3515     * an empty collection; or if this IssueType has previously
3516     * been saved, it will retrieve related Querys from storage.
3517     *
3518     * This method is protected by default in order to keep the public
3519     * api reasonable. You can provide public methods for those you
3520     * actually need in IssueType.
3521     */

3522    protected List JavaDoc getQuerysJoinScarabModule(Criteria criteria)
3523        throws TorqueException
3524    {
3525        if (collQuerys == null)
3526        {
3527            if (isNew())
3528            {
3529               collQuerys = new ArrayList JavaDoc();
3530            }
3531            else
3532            {
3533                            criteria.add(QueryPeer.ISSUE_TYPE_ID, getIssueTypeId() );
3534                            collQuerys = QueryPeer.doSelectJoinScarabModule(criteria);
3535            }
3536        }
3537        else
3538        {
3539            // the following code is to determine if a new query is
3540
// called for. If the criteria is the same as the last
3541
// one, just return the collection.
3542

3543                            criteria.add(QueryPeer.ISSUE_TYPE_ID, getIssueTypeId() );
3544                        if (!lastQuerysCriteria.equals(criteria))
3545            {
3546                collQuerys = QueryPeer.doSelectJoinScarabModule(criteria);
3547            }
3548        }
3549        lastQuerysCriteria = criteria;
3550
3551        return collQuerys;
3552    }
3553                  
3554                    
3555                              
3556                                
3557                                                              
3558                                        
3559                    
3560                    
3561          
3562    /**
3563     * If this collection has already been initialized with
3564     * an identical criteria, it returns the collection.
3565     * Otherwise if this IssueType is new, it will return
3566     * an empty collection; or if this IssueType has previously
3567     * been saved, it will retrieve related Querys from storage.
3568     *
3569     * This method is protected by default in order to keep the public
3570     * api reasonable. You can provide public methods for those you
3571     * actually need in IssueType.
3572     */

3573    protected List JavaDoc getQuerysJoinIssueType(Criteria criteria)
3574        throws TorqueException
3575    {
3576        if (collQuerys == null)
3577        {
3578            if (isNew())
3579            {
3580               collQuerys = new ArrayList JavaDoc();
3581            }
3582            else
3583            {
3584                            criteria.add(QueryPeer.ISSUE_TYPE_ID, getIssueTypeId() );
3585                            collQuerys = QueryPeer.doSelectJoinIssueType(criteria);
3586            }
3587        }
3588        else
3589        {
3590            // the following code is to determine if a new query is
3591
// called for. If the criteria is the same as the last
3592
// one, just return the collection.
3593

3594                            criteria.add(QueryPeer.ISSUE_TYPE_ID, getIssueTypeId() );
3595                        if (!lastQuerysCriteria.equals(criteria))
3596            {
3597                collQuerys = QueryPeer.doSelectJoinIssueType(criteria);
3598            }
3599        }
3600        lastQuerysCriteria = criteria;
3601
3602        return collQuerys;
3603    }
3604                  
3605                    
3606                    
3607                                
3608                                                              
3609                                        
3610                    
3611                    
3612          
3613    /**
3614     * If this collection has already been initialized with
3615     * an identical criteria, it returns the collection.
3616     * Otherwise if this IssueType is new, it will return
3617     * an empty collection; or if this IssueType has previously
3618     * been saved, it will retrieve related Querys from storage.
3619     *
3620     * This method is protected by default in order to keep the public
3621     * api reasonable. You can provide public methods for those you
3622     * actually need in IssueType.
3623     */

3624    protected List JavaDoc getQuerysJoinMITList(Criteria criteria)
3625        throws TorqueException
3626    {
3627        if (collQuerys == null)
3628        {
3629            if (isNew())
3630            {
3631               collQuerys = new ArrayList JavaDoc();
3632            }
3633            else
3634            {
3635                            criteria.add(QueryPeer.ISSUE_TYPE_ID, getIssueTypeId() );
3636                            collQuerys = QueryPeer.doSelectJoinMITList(criteria);
3637            }
3638        }
3639        else
3640        {
3641            // the following code is to determine if a new query is
3642
// called for. If the criteria is the same as the last
3643
// one, just return the collection.
3644

3645                            criteria.add(QueryPeer.ISSUE_TYPE_ID, getIssueTypeId() );
3646                        if (!lastQuerysCriteria.equals(criteria))
3647            {
3648                collQuerys = QueryPeer.doSelectJoinMITList(criteria);
3649            }
3650        }
3651        lastQuerysCriteria = criteria;
3652
3653        return collQuerys;
3654    }
3655                  
3656                    
3657                    
3658                                
3659                                                              
3660                                        
3661                    
3662                    
3663          
3664    /**
3665     * If this collection has already been initialized with
3666     * an identical criteria, it returns the collection.
3667     * Otherwise if this IssueType is new, it will return
3668     * an empty collection; or if this IssueType has previously
3669     * been saved, it will retrieve related Querys from storage.
3670     *
3671     * This method is protected by default in order to keep the public
3672     * api reasonable. You can provide public methods for those you
3673     * actually need in IssueType.
3674     */

3675    protected List JavaDoc getQuerysJoinFrequency(Criteria criteria)
3676        throws TorqueException
3677    {
3678        if (collQuerys == null)
3679        {
3680            if (isNew())
3681            {
3682               collQuerys = new ArrayList JavaDoc();
3683            }
3684            else
3685            {
3686                            criteria.add(QueryPeer.ISSUE_TYPE_ID, getIssueTypeId() );
3687                            collQuerys = QueryPeer.doSelectJoinFrequency(criteria);
3688            }
3689        }
3690        else
3691        {
3692            // the following code is to determine if a new query is
3693
// called for. If the criteria is the same as the last
3694
// one, just return the collection.
3695

3696                            criteria.add(QueryPeer.ISSUE_TYPE_ID, getIssueTypeId() );
3697                        if (!lastQuerysCriteria.equals(criteria))
3698            {
3699                collQuerys = QueryPeer.doSelectJoinFrequency(criteria);
3700            }
3701        }
3702        lastQuerysCriteria = criteria;
3703
3704        return collQuerys;
3705    }
3706                            
3707
3708
3709                          
3710            
3711    /**
3712     * Collection to store aggregation of collReports
3713     */

3714    protected List JavaDoc collReports;
3715
3716    /**
3717     * Temporary storage of collReports to save a possible db hit in
3718     * the event objects are add to the collection, but the
3719     * complete collection is never requested.
3720     */

3721    protected void initReports()
3722    {
3723        if (collReports == null)
3724        {
3725            collReports = new ArrayList JavaDoc();
3726        }
3727    }
3728
3729            
3730    /**
3731     * Method called to associate a Report object to this object
3732     * through the Report foreign key attribute
3733     *
3734     * @param l Report
3735     * @throws TorqueException
3736     */

3737    public void addReport(Report l) throws TorqueException
3738    {
3739        getReports().add(l);
3740        l.setIssueType((IssueType)this);
3741    }
3742
3743    /**
3744     * The criteria used to select the current contents of collReports
3745     */

3746    private Criteria lastReportsCriteria = null;
3747
3748    /**
3749     * If this collection has already been initialized, returns
3750     * the collection. Otherwise returns the results of
3751     * getReports(new Criteria())
3752     *
3753     * @throws TorqueException
3754     */

3755    public List JavaDoc getReports() throws TorqueException
3756    {
3757        if (collReports == null)
3758        {
3759            collReports = getReports(new Criteria(10));
3760        }
3761        return collReports;
3762    }
3763
3764    /**
3765     * If this collection has already been initialized with
3766     * an identical criteria, it returns the collection.
3767     * Otherwise if this IssueType has previously
3768     * been saved, it will retrieve related Reports from storage.
3769     * If this IssueType is new, it will return
3770     * an empty collection or the current collection, the criteria
3771     * is ignored on a new object.
3772     *
3773     * @throws TorqueException
3774     */

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

3817    public List JavaDoc getReports(Connection JavaDoc con) throws TorqueException
3818    {
3819        if (collReports == null)
3820        {
3821            collReports = getReports(new Criteria(10),con);
3822        }
3823        return collReports;
3824    }
3825
3826    /**
3827     * If this collection has already been initialized with
3828     * an identical criteria, it returns the collection.
3829     * Otherwise if this IssueType has previously
3830     * been saved, it will retrieve related Reports from storage.
3831     * If this IssueType is new, it will return
3832     * an empty collection or the current collection, the criteria
3833     * is ignored on a new object.
3834     * This method takes in the Connection also as input so that
3835     * referenced objects can also be obtained using a Connection
3836     * that is taken as input
3837     */

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

3893    protected List JavaDoc getReportsJoinIssueType(Criteria criteria)
3894        throws TorqueException
3895    {
3896        if (collReports == null)
3897        {
3898            if (isNew())
3899            {
3900               collReports = new ArrayList JavaDoc();
3901            }
3902            else
3903            {
3904                            criteria.add(ReportPeer.ISSUE_TYPE_ID, getIssueTypeId() );
3905                            collReports = ReportPeer.doSelectJoinIssueType(criteria);
3906            }
3907        }
3908        else
3909        {
3910            // the following code is to determine if a new query is
3911
// called for. If the criteria is the same as the last
3912
// one, just return the collection.
3913

3914                            criteria.add(ReportPeer.ISSUE_TYPE_ID, getIssueTypeId() );
3915                        if (!lastReportsCriteria.equals(criteria))
3916            {
3917                collReports = ReportPeer.doSelectJoinIssueType(criteria);
3918            }
3919        }
3920        lastReportsCriteria = criteria;
3921
3922        return collReports;
3923    }
3924                  
3925                    
3926                    
3927                                
3928                                                              
3929                                        
3930                    
3931                    
3932          
3933    /**
3934     * If this collection has already been initialized with
3935     * an identical criteria, it returns the collection.
3936     * Otherwise if this IssueType is new, it will return
3937     * an empty collection; or if this IssueType has previously
3938     * been saved, it will retrieve related Reports from storage.
3939     *
3940     * This method is protected by default in order to keep the public
3941     * api reasonable. You can provide public methods for those you
3942     * actually need in IssueType.
3943     */

3944    protected List JavaDoc getReportsJoinScarabUserImpl(Criteria criteria)
3945        throws TorqueException
3946    {
3947        if (collReports == null)
3948        {
3949            if (isNew())
3950            {
3951               collReports = new ArrayList JavaDoc();
3952            }
3953            else
3954            {
3955                            criteria.add(ReportPeer.ISSUE_TYPE_ID, getIssueTypeId() );
3956                            collReports = ReportPeer.doSelectJoinScarabUserImpl(criteria);
3957            }
3958        }
3959        else
3960        {
3961            // the following code is to determine if a new query is
3962
// called for. If the criteria is the same as the last
3963
// one, just return the collection.
3964

3965                            criteria.add(ReportPeer.ISSUE_TYPE_ID, getIssueTypeId() );
3966                        if (!lastReportsCriteria.equals(criteria))
3967            {
3968                collReports = ReportPeer.doSelectJoinScarabUserImpl(criteria);
3969            }
3970        }
3971        lastReportsCriteria = criteria;
3972
3973        return collReports;
3974    }
3975                  
3976                    
3977                    
3978                                
3979                                                              
3980                                        
3981                    
3982                    
3983          
3984    /**
3985     * If this collection has already been initialized with
3986     * an identical criteria, it returns the collection.
3987     * Otherwise if this IssueType is new, it will return
3988     * an empty collection; or if this IssueType has previously
3989     * been saved, it will retrieve related Reports from storage.
3990     *
3991     * This method is protected by default in order to keep the public
3992     * api reasonable. You can provide public methods for those you
3993     * actually need in IssueType.
3994     */

3995    protected List JavaDoc getReportsJoinScarabModule(Criteria criteria)
3996        throws TorqueException
3997    {
3998        if (collReports == null)
3999        {
4000            if (isNew())
4001            {
4002               collReports = new ArrayList JavaDoc();
4003            }
4004            else
4005            {
4006                            criteria.add(ReportPeer.ISSUE_TYPE_ID, getIssueTypeId() );
4007                            collReports = ReportPeer.doSelectJoinScarabModule(criteria);
4008            }
4009        }
4010        else
4011        {
4012            // the following code is to determine if a new query is
4013
// called for. If the criteria is the same as the last
4014
// one, just return the collection.
4015

4016                            criteria.add(ReportPeer.ISSUE_TYPE_ID, getIssueTypeId() );
4017                        if (!lastReportsCriteria.equals(criteria))
4018            {
4019                collReports = ReportPeer.doSelectJoinScarabModule(criteria);
4020            }
4021        }
4022        lastReportsCriteria = criteria;
4023
4024        return collReports;
4025    }
4026                  
4027                    
4028                    
4029                                
4030                                                              
4031                                        
4032                    
4033                    
4034          
4035    /**
4036     * If this collection has already been initialized with
4037     * an identical criteria, it returns the collection.
4038     * Otherwise if this IssueType is new, it will return
4039     * an empty collection; or if this IssueType has previously
4040     * been saved, it will retrieve related Reports from storage.
4041     *
4042     * This method is protected by default in order to keep the public
4043     * api reasonable. You can provide public methods for those you
4044     * actually need in IssueType.
4045     */

4046    protected List JavaDoc getReportsJoinScope(Criteria criteria)
4047        throws TorqueException
4048    {
4049        if (collReports == null)
4050        {
4051            if (isNew())
4052            {
4053               collReports = new ArrayList JavaDoc();
4054            }
4055            else
4056            {
4057                            criteria.add(ReportPeer.ISSUE_TYPE_ID, getIssueTypeId() );
4058                            collReports = ReportPeer.doSelectJoinScope(criteria);
4059            }
4060        }
4061        else
4062        {
4063            // the following code is to determine if a new query is
4064
// called for. If the criteria is the same as the last
4065
// one, just return the collection.
4066

4067                            criteria.add(ReportPeer.ISSUE_TYPE_ID, getIssueTypeId() );
4068                        if (!lastReportsCriteria.equals(criteria))
4069            {
4070                collReports = ReportPeer.doSelectJoinScope(criteria);
4071            }
4072        }
4073        lastReportsCriteria = criteria;
4074
4075        return collReports;
4076    }
4077                            
4078
4079
4080          
4081    private static List JavaDoc fieldNames = null;
4082
4083    /**
4084     * Generate a list of field names.
4085     *
4086     * @return a list of field names
4087     */

4088    public static synchronized List JavaDoc getFieldNames()
4089    {
4090        if (fieldNames == null)
4091        {
4092            fieldNames = new ArrayList JavaDoc();
4093              fieldNames.add("IssueTypeId");
4094              fieldNames.add("Name");
4095              fieldNames.add("Description");
4096              fieldNames.add("ParentId");
4097              fieldNames.add("Dedupe");
4098              fieldNames.add("Deleted");
4099              fieldNames.add("Locked");
4100              fieldNames.add("Isdefault");
4101              fieldNames = Collections.unmodifiableList(fieldNames);
4102        }
4103        return fieldNames;
4104    }
4105
4106    /**
4107     * Retrieves a field from the object by name passed in as a String.
4108     *
4109     * @param name field name
4110     * @return value
4111     */

4112    public Object JavaDoc getByName(String JavaDoc name)
4113    {
4114          if (name.equals("IssueTypeId"))
4115        {
4116                return getIssueTypeId();
4117            }
4118          if (name.equals("Name"))
4119        {
4120                return getName();
4121            }
4122          if (name.equals("Description"))
4123        {
4124                return getDescription();
4125            }
4126          if (name.equals("ParentId"))
4127        {
4128                return getParentId();
4129            }
4130          if (name.equals("Dedupe"))
4131        {
4132                return Boolean.valueOf(getDedupe());
4133            }
4134          if (name.equals("Deleted"))
4135        {
4136                return Boolean.valueOf(getDeleted());
4137            }
4138          if (name.equals("Locked"))
4139        {
4140                return Boolean.valueOf(getLocked());
4141            }
4142          if (name.equals("Isdefault"))
4143        {
4144                return Boolean.valueOf(getIsdefault());
4145            }
4146          return null;
4147    }
4148    
4149    /**
4150     * Retrieves a field from the object by name passed in
4151     * as a String. The String must be one of the static
4152     * Strings defined in this Class' Peer.
4153     *
4154     * @param name peer name
4155     * @return value
4156     */

4157    public Object JavaDoc getByPeerName(String JavaDoc name)
4158    {
4159          if (name.equals(IssueTypePeer.ISSUE_TYPE_ID))
4160        {
4161                return getIssueTypeId();
4162            }
4163          if (name.equals(IssueTypePeer.NAME))
4164        {
4165                return getName();
4166            }
4167          if (name.equals(IssueTypePeer.DESCRIPTION))
4168        {
4169                return getDescription();
4170            }
4171          if (name.equals(IssueTypePeer.PARENT_ID))
4172        {
4173                return getParentId();
4174            }
4175          if (name.equals(IssueTypePeer.DEDUPE))
4176        {
4177                return Boolean.valueOf(getDedupe());
4178            }
4179          if (name.equals(IssueTypePeer.DELETED))
4180        {
4181                return Boolean.valueOf(getDeleted());
4182            }
4183          if (name.equals(IssueTypePeer.LOCKED))
4184        {
4185                return Boolean.valueOf(getLocked());
4186            }
4187          if (name.equals(IssueTypePeer.ISDEFAULT))
4188        {
4189                return Boolean.valueOf(getIsdefault());
4190            }
4191          return null;
4192    }
4193
4194    /**
4195     * Retrieves a field from the object by Position as specified
4196     * in the xml schema. Zero-based.
4197     *
4198     * @param pos position in xml schema
4199     * @return value
4200     */

4201    public Object JavaDoc getByPosition(int pos)
4202    {
4203            if (pos == 0)
4204        {
4205                return getIssueTypeId();
4206            }
4207              if (pos == 1)
4208        {
4209                return getName();
4210            }
4211              if (pos == 2)
4212        {
4213                return getDescription();
4214            }
4215              if (pos == 3)
4216        {
4217                return getParentId();
4218            }
4219              if (pos == 4)
4220        {
4221                return Boolean.valueOf(getDedupe());
4222            }
4223              if (pos == 5)
4224        {
4225                return Boolean.valueOf(getDeleted());
4226            }
4227              if (pos == 6)
4228        {
4229                return Boolean.valueOf(getLocked());
4230            }
4231              if (pos == 7)
4232        {
4233                return Boolean.valueOf(getIsdefault());
4234            }
4235              return null;
4236    }
4237     
4238    /**
4239     * Stores the object in the database. If the object is new,
4240     * it inserts it; otherwise an update is performed.
4241     *
4242     * @throws Exception
4243     */

4244    public void save() throws Exception JavaDoc
4245    {
4246          save(IssueTypePeer.getMapBuilder()
4247                .getDatabaseMap().getName());
4248      }
4249
4250    /**
4251     * Stores the object in the database. If the object is new,
4252     * it inserts it; otherwise an update is performed.
4253       * Note: this code is here because the method body is
4254     * auto-generated conditionally and therefore needs to be
4255     * in this file instead of in the super class, BaseObject.
4256       *
4257     * @param dbName
4258     * @throws TorqueException
4259     */

4260    public void save(String JavaDoc dbName) throws TorqueException
4261    {
4262        Connection JavaDoc con = null;
4263          try
4264        {
4265            con = Transaction.begin(dbName);
4266            save(con);
4267            Transaction.commit(con);
4268        }
4269        catch(TorqueException e)
4270        {
4271            Transaction.safeRollback(con);
4272            throw e;
4273        }
4274      }
4275
4276      /** flag to prevent endless save loop, if this object is referenced
4277        by another object which falls in this transaction. */

4278    private boolean alreadyInSave = false;
4279      /**
4280     * Stores the object in the database. If the object is new,
4281     * it inserts it; otherwise an update is performed. This method
4282     * is meant to be used as part of a transaction, otherwise use
4283     * the save() method and the connection details will be handled
4284     * internally
4285     *
4286     * @param con
4287     * @throws TorqueException
4288     */

4289    public void save(Connection JavaDoc con) throws TorqueException
4290    {
4291          if (!alreadyInSave)
4292        {
4293            alreadyInSave = true;
4294
4295
4296  
4297            // If this object has been modified, then save it to the database.
4298
if (isModified())
4299            {
4300                if (isNew())
4301                {
4302                    IssueTypePeer.doInsert((IssueType)this, con);
4303                    setNew(false);
4304                }
4305                else
4306                {
4307                    IssueTypePeer.doUpdate((IssueType)this, con);
4308                }
4309
4310                      if (isCacheOnSave())
4311                {
4312                    IssueTypeManager.putInstance(this);
4313                }
4314              }
4315
4316                                      
4317                            if (collAttributeGroups != null)
4318            {
4319                for (int i = 0; i < collAttributeGroups.size(); i++)
4320                {
4321                    ((AttributeGroup)collAttributeGroups.get(i)).save(con);
4322                }
4323            }
4324                                          
4325                            if (collIssues != null)
4326            {
4327                for (int i = 0; i < collIssues.size(); i++)
4328                {
4329                    ((Issue)collIssues.get(i)).save(con);
4330                }
4331            }
4332                                                    
4333                            if (collRModuleIssueTypes != null)
4334            {
4335                for (int i = 0; i < collRModuleIssueTypes.size(); i++)
4336                {
4337                    ((RModuleIssueType)collRModuleIssueTypes.get(i)).save(con);
4338                }
4339            }
4340                                          
4341                            if (collMITListItems != null)
4342            {
4343                for (int i = 0; i < collMITListItems.size(); i++)
4344                {
4345                    ((MITListItem)collMITListItems.get(i)).save(con);
4346                }
4347            }
4348                                          
4349                            if (collRModuleAttributes != null)
4350            {
4351                for (int i = 0; i < collRModuleAttributes.size(); i++)
4352                {
4353                    ((RModuleAttribute)collRModuleAttributes.get(i)).save(con);
4354                }
4355            }
4356                                          
4357                            if (collRIssueTypeAttributes != null)
4358            {
4359                for (int i = 0; i < collRIssueTypeAttributes.size(); i++)
4360                {
4361                    ((RIssueTypeAttribute)collRIssueTypeAttributes.get(i)).save(con);
4362                }
4363            }
4364                                          
4365                            if (collRModuleOptions != null)
4366            {
4367                for (int i = 0; i < collRModuleOptions.size(); i++)
4368                {
4369                    ((RModuleOption)collRModuleOptions.get(i)).save(con);
4370                }
4371            }
4372                                          
4373                            if (collRIssueTypeOptions != null)
4374            {
4375                for (int i = 0; i < collRIssueTypeOptions.size(); i++)
4376                {
4377                    ((RIssueTypeOption)collRIssueTypeOptions.get(i)).save(con);
4378                }
4379            }
4380                                          
4381                            if (collRModuleUserAttributes != null)
4382            {
4383                for (int i = 0; i < collRModuleUserAttributes.size(); i++)
4384                {
4385                    ((RModuleUserAttribute)collRModuleUserAttributes.get(i)).save(con);
4386                }
4387            }
4388                                          
4389                            if (collQuerys != null)
4390            {
4391                for (int i = 0; i < collQuerys.size(); i++)
4392                {
4393                    ((Query)collQuerys.get(i)).save(con);
4394                }
4395            }
4396                                          
4397                            if (collReports != null)
4398            {
4399                for (int i = 0; i < collReports.size(); i++)
4400                {
4401                    ((Report)collReports.get(i)).save(con);
4402                }
4403            }
4404                          alreadyInSave = false;
4405        }
4406      }
4407
4408    /**
4409     * Specify whether to cache the object after saving to the db.
4410     * This method returns false
4411     */

4412    protected boolean isCacheOnSave()
4413    {
4414        return true;
4415    }
4416
4417                        
4418      /**
4419     * Set the PrimaryKey using ObjectKey.
4420     *
4421     * @param issueTypeId ObjectKey
4422     */

4423    public void setPrimaryKey(ObjectKey issueTypeId)
4424        throws TorqueException {
4425            setIssueTypeId(new Integer JavaDoc(((NumberKey)issueTypeId).intValue()));
4426        }
4427
4428    /**
4429     * Set the PrimaryKey using a String.
4430     *
4431     * @param key
4432     */

4433    public void setPrimaryKey(String JavaDoc key) throws TorqueException
4434    {
4435            setIssueTypeId(new Integer JavaDoc(key));
4436        }
4437
4438  
4439    /**
4440     * returns an id that differentiates this object from others
4441     * of its class.
4442     */

4443    public ObjectKey getPrimaryKey()
4444    {
4445          return SimpleKey.keyFor(getIssueTypeId());
4446      }
4447 
4448    /**
4449     * get an id that differentiates this object from others
4450     * of its class.
4451     */

4452    public String JavaDoc getQueryKey()
4453    {
4454        if (getPrimaryKey() == null)
4455        {
4456            return "";
4457        }
4458        else
4459        {
4460            return getPrimaryKey().toString();
4461        }
4462    }
4463
4464    /**
4465     * set an id that differentiates this object from others
4466     * of its class.
4467     */

4468    public void setQueryKey(String JavaDoc key)
4469        throws TorqueException
4470    {
4471        setPrimaryKey(key);
4472    }
4473
4474    /**
4475     * Makes a copy of this object.
4476     * It creates a new object filling in the simple attributes.
4477       * It then fills all the association collections and sets the
4478     * related objects to isNew=true.
4479       */

4480      public IssueType copy() throws TorqueException
4481    {
4482        IssueType copyObj = new IssueType();
4483            copyObj.setIssueTypeId(issueTypeId);
4484          copyObj.setName(name);
4485          copyObj.setDescription(description);
4486          copyObj.setParentId(parentId);
4487          copyObj.setDedupe(dedupe);
4488          copyObj.setDeleted(deleted);
4489          copyObj.setLocked(locked);
4490          copyObj.setIsdefault(isdefault);
4491  
4492                      copyObj.setIssueTypeId((Integer JavaDoc)null);
4493                                                      
4494                                      
4495                
4496        List JavaDoc v = getAttributeGroups();
4497        for (int i = 0; i < v.size(); i++)
4498        {
4499            AttributeGroup obj = (AttributeGroup) v.get(i);
4500            copyObj.addAttributeGroup(obj.copy());
4501        }
4502                                                  
4503                
4504        v = getIssues();
4505        for (int i = 0; i < v.size(); i++)
4506        {
4507            Issue obj = (Issue) v.get(i);
4508            copyObj.addIssue(obj.copy());
4509        }
4510                                                            
4511                
4512        v = getRModuleIssueTypes();
4513        for (int i = 0; i < v.size(); i++)
4514        {
4515            RModuleIssueType obj = (RModuleIssueType) v.get(i);
4516            copyObj.addRModuleIssueType(obj.copy());
4517        }
4518                                                  
4519                
4520        v = getMITListItems();
4521        for (int i = 0; i < v.size(); i++)
4522        {
4523            MITListItem obj = (MITListItem) v.get(i);
4524            copyObj.addMITListItem(obj.copy());
4525        }
4526                                                  
4527                
4528        v = getRModuleAttributes();
4529        for (int i = 0; i < v.size(); i++)
4530        {
4531            RModuleAttribute obj = (RModuleAttribute) v.get(i);
4532            copyObj.addRModuleAttribute(obj.copy());
4533        }
4534                                                  
4535                
4536        v = getRIssueTypeAttributes();
4537        for (int i = 0; i < v.size(); i++)
4538        {
4539            RIssueTypeAttribute obj = (RIssueTypeAttribute) v.get(i);
4540            copyObj.addRIssueTypeAttribute(obj.copy());
4541        }
4542                                                  
4543                
4544        v = getRModuleOptions();
4545        for (int i = 0; i < v.size(); i++)
4546        {
4547            RModuleOption obj = (RModuleOption) v.get(i);
4548            copyObj.addRModuleOption(obj.copy());
4549        }
4550                                                  
4551                
4552        v = getRIssueTypeOptions();
4553        for (int i = 0; i < v.size(); i++)
4554        {
4555            RIssueTypeOption obj = (RIssueTypeOption) v.get(i);
4556            copyObj.addRIssueTypeOption(obj.copy());
4557        }
4558                                                  
4559                
4560        v = getRModuleUserAttributes();
4561        for (int i = 0; i < v.size(); i++)
4562        {
4563            RModuleUserAttribute obj = (RModuleUserAttribute) v.get(i);
4564            copyObj.addRModuleUserAttribute(obj.copy());
4565        }
4566                                                  
4567                
4568        v = getQuerys();
4569        for (int i = 0; i < v.size(); i++)
4570        {
4571            Query obj = (Query) v.get(i);
4572            copyObj.addQuery(obj.copy());
4573        }
4574                                                  
4575                
4576        v = getReports();
4577        for (int i = 0; i < v.size(); i++)
4578        {
4579            Report obj = (Report) v.get(i);
4580            copyObj.addReport(obj.copy());
4581        }
4582                            return copyObj;
4583    }
4584
4585    /**
4586     * returns a peer instance associated with this om. Since Peer classes
4587     * are not to have any instance attributes, this method returns the
4588     * same instance for all member of this class. The method could therefore
4589     * be static, but this would prevent one from overriding the behavior.
4590     */

4591    public IssueTypePeer getPeer()
4592    {
4593        return peer;
4594    }
4595
4596    public String JavaDoc toString()
4597    {
4598        StringBuffer JavaDoc str = new StringBuffer JavaDoc();
4599        str.append("IssueType:\n");
4600        str.append("IssueTypeId = ")
4601               .append(getIssueTypeId())
4602             .append("\n");
4603        str.append("Name = ")
4604               .append(getName())
4605             .append("\n");
4606        str.append("Description = ")
4607               .append(getDescription())
4608             .append("\n");
4609        str.append("ParentId = ")
4610               .append(getParentId())
4611             .append("\n");
4612        str.append("Dedupe = ")
4613               .append(getDedupe())
4614             .append("\n");
4615        str.append("Deleted = ")
4616               .append(getDeleted())
4617             .append("\n");
4618        str.append("Locked = ")
4619               .append(getLocked())
4620             .append("\n");
4621        str.append("Isdefault = ")
4622               .append(getIsdefault())
4623             .append("\n");
4624        return(str.toString());
4625    }
4626}
4627
Popular Tags