KickJava   Java API By Example, From Geeks To Geeks.

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


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 AttributeOption
30  */

31 public abstract class BaseAttributeOption extends BaseObject
32     implements org.apache.fulcrum.intake.Retrievable
33 {
34     /** The Peer class */
35     private static final AttributeOptionPeer peer =
36         new AttributeOptionPeer();
37
38         
39     /** The value for the optionId field */
40     private Integer JavaDoc optionId;
41       
42     /** The value for the attributeId field */
43     private Integer JavaDoc attributeId;
44       
45     /** The value for the name field */
46     private String JavaDoc name;
47                                                                 
48     /** The value for the deleted field */
49     private boolean deleted = false;
50   
51     
52     /**
53      * Get the OptionId
54      *
55      * @return Integer
56      */

57     public Integer JavaDoc getOptionId()
58     {
59         return optionId;
60     }
61
62                                               
63     /**
64      * Set the value of OptionId
65      *
66      * @param v new value
67      */

68     public void setOptionId(Integer JavaDoc v) throws TorqueException
69     {
70     
71                   if (!ObjectUtils.equals(this.optionId, v))
72               {
73             this.optionId = v;
74             setModified(true);
75         }
76     
77           
78                                   
79         // update associated Activity
80
if (collActivitysRelatedByOldOptionId != null)
81         {
82             for (int i = 0; i < collActivitysRelatedByOldOptionId.size(); i++)
83             {
84                 ((Activity) collActivitysRelatedByOldOptionId.get(i))
85                         .setOldOptionId(v);
86             }
87         }
88                                           
89         // update associated Activity
90
if (collActivitysRelatedByNewOptionId != null)
91         {
92             for (int i = 0; i < collActivitysRelatedByNewOptionId.size(); i++)
93             {
94                 ((Activity) collActivitysRelatedByNewOptionId.get(i))
95                         .setNewOptionId(v);
96             }
97         }
98                                           
99         // update associated Attribute
100
if (collAttributes != null)
101         {
102             for (int i = 0; i < collAttributes.size(); i++)
103             {
104                 ((Attribute) collAttributes.get(i))
105                         .setRequiredOptionId(v);
106             }
107         }
108                                           
109         // update associated Condition
110
if (collConditions != null)
111         {
112             for (int i = 0; i < collConditions.size(); i++)
113             {
114                 ((Condition) collConditions.get(i))
115                         .setOptionId(v);
116             }
117         }
118                                           
119         // update associated AttributeValue
120
if (collAttributeValues != null)
121         {
122             for (int i = 0; i < collAttributeValues.size(); i++)
123             {
124                 ((AttributeValue) collAttributeValues.get(i))
125                         .setOptionId(v);
126             }
127         }
128                                           
129         // update associated RModuleOption
130
if (collRModuleOptions != null)
131         {
132             for (int i = 0; i < collRModuleOptions.size(); i++)
133             {
134                 ((RModuleOption) collRModuleOptions.get(i))
135                         .setOptionId(v);
136             }
137         }
138                                           
139         // update associated RIssueTypeOption
140
if (collRIssueTypeOptions != null)
141         {
142             for (int i = 0; i < collRIssueTypeOptions.size(); i++)
143             {
144                 ((RIssueTypeOption) collRIssueTypeOptions.get(i))
145                         .setOptionId(v);
146             }
147         }
148                                           
149         // update associated ROptionOption
150
if (collROptionOptionsRelatedByOption1Id != null)
151         {
152             for (int i = 0; i < collROptionOptionsRelatedByOption1Id.size(); i++)
153             {
154                 ((ROptionOption) collROptionOptionsRelatedByOption1Id.get(i))
155                         .setOption1Id(v);
156             }
157         }
158                                           
159         // update associated ROptionOption
160
if (collROptionOptionsRelatedByOption2Id != null)
161         {
162             for (int i = 0; i < collROptionOptionsRelatedByOption2Id.size(); i++)
163             {
164                 ((ROptionOption) collROptionOptionsRelatedByOption2Id.get(i))
165                         .setOption2Id(v);
166             }
167         }
168                                           
169         // update associated Transition
170
if (collTransitionsRelatedByFromOptionId != null)
171         {
172             for (int i = 0; i < collTransitionsRelatedByFromOptionId.size(); i++)
173             {
174                 ((Transition) collTransitionsRelatedByFromOptionId.get(i))
175                         .setFromOptionId(v);
176             }
177         }
178                                           
179         // update associated Transition
180
if (collTransitionsRelatedByToOptionId != null)
181         {
182             for (int i = 0; i < collTransitionsRelatedByToOptionId.size(); i++)
183             {
184                 ((Transition) collTransitionsRelatedByToOptionId.get(i))
185                         .setToOptionId(v);
186             }
187         }
188                       }
189   
190     /**
191      * Get the AttributeId
192      *
193      * @return Integer
194      */

195     public Integer JavaDoc getAttributeId()
196     {
197         return attributeId;
198     }
199
200                               
201     /**
202      * Set the value of AttributeId
203      *
204      * @param v new value
205      */

206     public void setAttributeId(Integer JavaDoc v) throws TorqueException
207     {
208     
209                   if (!ObjectUtils.equals(this.attributeId, v))
210               {
211             this.attributeId = v;
212             setModified(true);
213         }
214     
215                                   
216                 if (aAttribute != null && !ObjectUtils.equals(aAttribute.getAttributeId(), v))
217                 {
218             aAttribute = null;
219         }
220       
221               }
222   
223     /**
224      * Get the Name
225      *
226      * @return String
227      */

228     public String JavaDoc getName()
229     {
230         return name;
231     }
232
233                         
234     /**
235      * Set the value of Name
236      *
237      * @param v new value
238      */

239     public void setName(String JavaDoc v)
240     {
241     
242                   if (!ObjectUtils.equals(this.name, v))
243               {
244             this.name = v;
245             setModified(true);
246         }
247     
248           
249               }
250   
251     /**
252      * Get the Deleted
253      *
254      * @return boolean
255      */

256     public boolean getDeleted()
257     {
258         return deleted;
259     }
260
261                         
262     /**
263      * Set the value of Deleted
264      *
265      * @param v new value
266      */

267     public void setDeleted(boolean v)
268     {
269     
270                   if (this.deleted != v)
271               {
272             this.deleted = v;
273             setModified(true);
274         }
275     
276           
277               }
278   
279       
280         
281                   
282         private Attribute aAttribute;
283
284     /**
285      * Declares an association between this object and a Attribute object
286      *
287      * @param v Attribute
288      * @throws TorqueException
289      */

290     public void setAttribute(Attribute v) throws TorqueException
291     {
292             if (v == null)
293         {
294                   setAttributeId((Integer JavaDoc) null);
295               }
296         else
297         {
298             setAttributeId(v.getAttributeId());
299         }
300             aAttribute = v;
301     }
302
303                         
304     /**
305      * Get the associated Attribute object
306      *
307      * @return the associated Attribute object
308      * @throws TorqueException
309      */

310     public Attribute getAttribute() throws TorqueException
311     {
312         if ( !ObjectUtils.equals(getAttributeId(), null) )
313         {
314                 return AttributeManager.getInstance(SimpleKey.keyFor(getAttributeId()));
315             }
316         return aAttribute;
317     }
318
319     /**
320      * Provides convenient way to set a relationship based on a
321      * ObjectKey, for example
322      * <code>bar.setFooKey(foo.getPrimaryKey())</code>
323      *
324          */

325     public void setAttributeKey(ObjectKey key) throws TorqueException
326     {
327     
328                     setAttributeId(new Integer JavaDoc(((NumberKey) key).intValue()));
329               }
330      
331                                         
332             
333     /**
334      * Collection to store aggregation of collActivitysRelatedByOldOptionId
335      */

336     protected List JavaDoc collActivitysRelatedByOldOptionId;
337
338     /**
339      * Temporary storage of collActivitysRelatedByOldOptionId to save a possible db hit in
340      * the event objects are add to the collection, but the
341      * complete collection is never requested.
342      */

343     protected void initActivitysRelatedByOldOptionId()
344     {
345         if (collActivitysRelatedByOldOptionId == null)
346         {
347             collActivitysRelatedByOldOptionId = new ArrayList JavaDoc();
348         }
349     }
350
351             
352     /**
353      * Method called to associate a Activity object to this object
354      * through the Activity foreign key attribute
355      *
356      * @param l Activity
357      * @throws TorqueException
358      */

359     public void addActivityRelatedByOldOptionId(Activity l) throws TorqueException
360     {
361         getActivitysRelatedByOldOptionId().add(l);
362         l.setAttributeOptionRelatedByOldOptionId((AttributeOption)this);
363     }
364
365     /**
366      * The criteria used to select the current contents of collActivitysRelatedByOldOptionId
367      */

368     private Criteria lastActivitysRelatedByOldOptionIdCriteria = null;
369
370     /**
371      * If this collection has already been initialized, returns
372      * the collection. Otherwise returns the results of
373      * getActivitysRelatedByOldOptionId(new Criteria())
374      *
375      * @throws TorqueException
376      */

377     public List JavaDoc getActivitysRelatedByOldOptionId() throws TorqueException
378     {
379         if (collActivitysRelatedByOldOptionId == null)
380         {
381             collActivitysRelatedByOldOptionId = getActivitysRelatedByOldOptionId(new Criteria(10));
382         }
383         return collActivitysRelatedByOldOptionId;
384     }
385
386     /**
387      * If this collection has already been initialized with
388      * an identical criteria, it returns the collection.
389      * Otherwise if this AttributeOption has previously
390      * been saved, it will retrieve related ActivitysRelatedByOldOptionId from storage.
391      * If this AttributeOption is new, it will return
392      * an empty collection or the current collection, the criteria
393      * is ignored on a new object.
394      *
395      * @throws TorqueException
396      */

397     public List JavaDoc getActivitysRelatedByOldOptionId(Criteria criteria) throws TorqueException
398     {
399         if (collActivitysRelatedByOldOptionId == null)
400         {
401             if (isNew())
402             {
403                collActivitysRelatedByOldOptionId = new ArrayList JavaDoc();
404             }
405             else
406             {
407                       criteria.add(ActivityPeer.OLD_OPTION_ID, getOptionId() );
408                       collActivitysRelatedByOldOptionId = ActivityPeer.doSelect(criteria);
409             }
410         }
411         else
412         {
413             // criteria has no effect for a new object
414
if (!isNew())
415             {
416                 // the following code is to determine if a new query is
417
// called for. If the criteria is the same as the last
418
// one, just return the collection.
419
criteria.add(ActivityPeer.OLD_OPTION_ID, getOptionId() );
420                       if (!lastActivitysRelatedByOldOptionIdCriteria.equals(criteria))
421                 {
422                     collActivitysRelatedByOldOptionId = ActivityPeer.doSelect(criteria);
423                 }
424             }
425         }
426         lastActivitysRelatedByOldOptionIdCriteria = criteria;
427
428         return collActivitysRelatedByOldOptionId;
429     }
430
431     /**
432      * If this collection has already been initialized, returns
433      * the collection. Otherwise returns the results of
434      * getActivitysRelatedByOldOptionId(new Criteria(),Connection)
435      * This method takes in the Connection also as input so that
436      * referenced objects can also be obtained using a Connection
437      * that is taken as input
438      */

439     public List JavaDoc getActivitysRelatedByOldOptionId(Connection JavaDoc con) throws TorqueException
440     {
441         if (collActivitysRelatedByOldOptionId == null)
442         {
443             collActivitysRelatedByOldOptionId = getActivitysRelatedByOldOptionId(new Criteria(10),con);
444         }
445         return collActivitysRelatedByOldOptionId;
446     }
447
448     /**
449      * If this collection has already been initialized with
450      * an identical criteria, it returns the collection.
451      * Otherwise if this AttributeOption has previously
452      * been saved, it will retrieve related ActivitysRelatedByOldOptionId from storage.
453      * If this AttributeOption is new, it will return
454      * an empty collection or the current collection, the criteria
455      * is ignored on a new object.
456      * This method takes in the Connection also as input so that
457      * referenced objects can also be obtained using a Connection
458      * that is taken as input
459      */

460     public List JavaDoc getActivitysRelatedByOldOptionId(Criteria criteria,Connection JavaDoc con) throws TorqueException
461     {
462         if (collActivitysRelatedByOldOptionId == null)
463         {
464             if (isNew())
465             {
466                collActivitysRelatedByOldOptionId = new ArrayList JavaDoc();
467             }
468             else
469             {
470                        criteria.add(ActivityPeer.OLD_OPTION_ID, getOptionId() );
471                        collActivitysRelatedByOldOptionId = ActivityPeer.doSelect(criteria,con);
472              }
473          }
474          else
475          {
476              // criteria has no effect for a new object
477
if (!isNew())
478              {
479                  // the following code is to determine if a new query is
480
// called for. If the criteria is the same as the last
481
// one, just return the collection.
482
criteria.add(ActivityPeer.OLD_OPTION_ID, getOptionId() );
483                      if (!lastActivitysRelatedByOldOptionIdCriteria.equals(criteria))
484                  {
485                      collActivitysRelatedByOldOptionId = ActivityPeer.doSelect(criteria,con);
486                  }
487              }
488          }
489          lastActivitysRelatedByOldOptionIdCriteria = criteria;
490
491          return collActivitysRelatedByOldOptionId;
492      }
493
494                                                                   
495               
496                     
497                     
498                                 
499                                                               
500                                         
501                     
502                                 
503           
504     /**
505      * If this collection has already been initialized with
506      * an identical criteria, it returns the collection.
507      * Otherwise if this AttributeOption is new, it will return
508      * an empty collection; or if this AttributeOption has previously
509      * been saved, it will retrieve related ActivitysRelatedByOldOptionId from storage.
510      *
511      * This method is protected by default in order to keep the public
512      * api reasonable. You can provide public methods for those you
513      * actually need in AttributeOption.
514      */

515     protected List JavaDoc getActivitysRelatedByOldOptionIdJoinIssue(Criteria criteria)
516         throws TorqueException
517     {
518         if (collActivitysRelatedByOldOptionId == null)
519         {
520             if (isNew())
521             {
522                collActivitysRelatedByOldOptionId = new ArrayList JavaDoc();
523             }
524             else
525             {
526                             criteria.add(ActivityPeer.OLD_OPTION_ID, getOptionId() );
527                             collActivitysRelatedByOldOptionId = ActivityPeer.doSelectJoinIssue(criteria);
528             }
529         }
530         else
531         {
532             // the following code is to determine if a new query is
533
// called for. If the criteria is the same as the last
534
// one, just return the collection.
535

536                             criteria.add(ActivityPeer.OLD_OPTION_ID, getOptionId() );
537                         if (!lastActivitysRelatedByOldOptionIdCriteria.equals(criteria))
538             {
539                 collActivitysRelatedByOldOptionId = ActivityPeer.doSelectJoinIssue(criteria);
540             }
541         }
542         lastActivitysRelatedByOldOptionIdCriteria = criteria;
543
544         return collActivitysRelatedByOldOptionId;
545     }
546                   
547                     
548                     
549                                 
550                                                               
551                                         
552                     
553                                 
554           
555     /**
556      * If this collection has already been initialized with
557      * an identical criteria, it returns the collection.
558      * Otherwise if this AttributeOption is new, it will return
559      * an empty collection; or if this AttributeOption has previously
560      * been saved, it will retrieve related ActivitysRelatedByOldOptionId from storage.
561      *
562      * This method is protected by default in order to keep the public
563      * api reasonable. You can provide public methods for those you
564      * actually need in AttributeOption.
565      */

566     protected List JavaDoc getActivitysRelatedByOldOptionIdJoinAttribute(Criteria criteria)
567         throws TorqueException
568     {
569         if (collActivitysRelatedByOldOptionId == null)
570         {
571             if (isNew())
572             {
573                collActivitysRelatedByOldOptionId = new ArrayList JavaDoc();
574             }
575             else
576             {
577                             criteria.add(ActivityPeer.OLD_OPTION_ID, getOptionId() );
578                             collActivitysRelatedByOldOptionId = ActivityPeer.doSelectJoinAttribute(criteria);
579             }
580         }
581         else
582         {
583             // the following code is to determine if a new query is
584
// called for. If the criteria is the same as the last
585
// one, just return the collection.
586

587                             criteria.add(ActivityPeer.OLD_OPTION_ID, getOptionId() );
588                         if (!lastActivitysRelatedByOldOptionIdCriteria.equals(criteria))
589             {
590                 collActivitysRelatedByOldOptionId = ActivityPeer.doSelectJoinAttribute(criteria);
591             }
592         }
593         lastActivitysRelatedByOldOptionIdCriteria = criteria;
594
595         return collActivitysRelatedByOldOptionId;
596     }
597                   
598                     
599                     
600                                 
601                                                               
602                                         
603                     
604                                 
605           
606     /**
607      * If this collection has already been initialized with
608      * an identical criteria, it returns the collection.
609      * Otherwise if this AttributeOption is new, it will return
610      * an empty collection; or if this AttributeOption has previously
611      * been saved, it will retrieve related ActivitysRelatedByOldOptionId from storage.
612      *
613      * This method is protected by default in order to keep the public
614      * api reasonable. You can provide public methods for those you
615      * actually need in AttributeOption.
616      */

617     protected List JavaDoc getActivitysRelatedByOldOptionIdJoinActivitySet(Criteria criteria)
618         throws TorqueException
619     {
620         if (collActivitysRelatedByOldOptionId == null)
621         {
622             if (isNew())
623             {
624                collActivitysRelatedByOldOptionId = new ArrayList JavaDoc();
625             }
626             else
627             {
628                             criteria.add(ActivityPeer.OLD_OPTION_ID, getOptionId() );
629                             collActivitysRelatedByOldOptionId = ActivityPeer.doSelectJoinActivitySet(criteria);
630             }
631         }
632         else
633         {
634             // the following code is to determine if a new query is
635
// called for. If the criteria is the same as the last
636
// one, just return the collection.
637

638                             criteria.add(ActivityPeer.OLD_OPTION_ID, getOptionId() );
639                         if (!lastActivitysRelatedByOldOptionIdCriteria.equals(criteria))
640             {
641                 collActivitysRelatedByOldOptionId = ActivityPeer.doSelectJoinActivitySet(criteria);
642             }
643         }
644         lastActivitysRelatedByOldOptionIdCriteria = criteria;
645
646         return collActivitysRelatedByOldOptionId;
647     }
648                   
649                     
650                     
651                                             
652                                                                           
653                                         
654                     
655                                 
656           
657     /**
658      * If this collection has already been initialized with
659      * an identical criteria, it returns the collection.
660      * Otherwise if this AttributeOption is new, it will return
661      * an empty collection; or if this AttributeOption has previously
662      * been saved, it will retrieve related ActivitysRelatedByOldOptionId from storage.
663      *
664      * This method is protected by default in order to keep the public
665      * api reasonable. You can provide public methods for those you
666      * actually need in AttributeOption.
667      */

668     protected List JavaDoc getActivitysRelatedByOldOptionIdJoinScarabUserImplRelatedByOldUserId(Criteria criteria)
669         throws TorqueException
670     {
671         if (collActivitysRelatedByOldOptionId == null)
672         {
673             if (isNew())
674             {
675                collActivitysRelatedByOldOptionId = new ArrayList JavaDoc();
676             }
677             else
678             {
679                             criteria.add(ActivityPeer.OLD_OPTION_ID, getOptionId() );
680                             collActivitysRelatedByOldOptionId = ActivityPeer.doSelectJoinScarabUserImplRelatedByOldUserId(criteria);
681             }
682         }
683         else
684         {
685             // the following code is to determine if a new query is
686
// called for. If the criteria is the same as the last
687
// one, just return the collection.
688

689                             criteria.add(ActivityPeer.OLD_OPTION_ID, getOptionId() );
690                         if (!lastActivitysRelatedByOldOptionIdCriteria.equals(criteria))
691             {
692                 collActivitysRelatedByOldOptionId = ActivityPeer.doSelectJoinScarabUserImplRelatedByOldUserId(criteria);
693             }
694         }
695         lastActivitysRelatedByOldOptionIdCriteria = criteria;
696
697         return collActivitysRelatedByOldOptionId;
698     }
699                   
700                     
701                     
702                                             
703                                                                           
704                                         
705                     
706                                 
707           
708     /**
709      * If this collection has already been initialized with
710      * an identical criteria, it returns the collection.
711      * Otherwise if this AttributeOption is new, it will return
712      * an empty collection; or if this AttributeOption has previously
713      * been saved, it will retrieve related ActivitysRelatedByOldOptionId from storage.
714      *
715      * This method is protected by default in order to keep the public
716      * api reasonable. You can provide public methods for those you
717      * actually need in AttributeOption.
718      */

719     protected List JavaDoc getActivitysRelatedByOldOptionIdJoinScarabUserImplRelatedByNewUserId(Criteria criteria)
720         throws TorqueException
721     {
722         if (collActivitysRelatedByOldOptionId == null)
723         {
724             if (isNew())
725             {
726                collActivitysRelatedByOldOptionId = new ArrayList JavaDoc();
727             }
728             else
729             {
730                             criteria.add(ActivityPeer.OLD_OPTION_ID, getOptionId() );
731                             collActivitysRelatedByOldOptionId = ActivityPeer.doSelectJoinScarabUserImplRelatedByNewUserId(criteria);
732             }
733         }
734         else
735         {
736             // the following code is to determine if a new query is
737
// called for. If the criteria is the same as the last
738
// one, just return the collection.
739

740                             criteria.add(ActivityPeer.OLD_OPTION_ID, getOptionId() );
741                         if (!lastActivitysRelatedByOldOptionIdCriteria.equals(criteria))
742             {
743                 collActivitysRelatedByOldOptionId = ActivityPeer.doSelectJoinScarabUserImplRelatedByNewUserId(criteria);
744             }
745         }
746         lastActivitysRelatedByOldOptionIdCriteria = criteria;
747
748         return collActivitysRelatedByOldOptionId;
749     }
750                   
751                     
752                               
753                                             
754                                                                           
755                                         
756                     
757                                             
758                   
759                     
760                               
761                                             
762                                                                           
763                                         
764                     
765                                 
766           
767     /**
768      * If this collection has already been initialized with
769      * an identical criteria, it returns the collection.
770      * Otherwise if this AttributeOption is new, it will return
771      * an empty collection; or if this AttributeOption has previously
772      * been saved, it will retrieve related ActivitysRelatedByOldOptionId from storage.
773      *
774      * This method is protected by default in order to keep the public
775      * api reasonable. You can provide public methods for those you
776      * actually need in AttributeOption.
777      */

778     protected List JavaDoc getActivitysRelatedByOldOptionIdJoinAttributeOptionRelatedByNewOptionId(Criteria criteria)
779         throws TorqueException
780     {
781         if (collActivitysRelatedByOldOptionId == null)
782         {
783             if (isNew())
784             {
785                collActivitysRelatedByOldOptionId = new ArrayList JavaDoc();
786             }
787             else
788             {
789                             criteria.add(ActivityPeer.OLD_OPTION_ID, getOptionId() );
790                             collActivitysRelatedByOldOptionId = ActivityPeer.doSelectJoinAttributeOptionRelatedByNewOptionId(criteria);
791             }
792         }
793         else
794         {
795             // the following code is to determine if a new query is
796
// called for. If the criteria is the same as the last
797
// one, just return the collection.
798

799                             criteria.add(ActivityPeer.OLD_OPTION_ID, getOptionId() );
800                         if (!lastActivitysRelatedByOldOptionIdCriteria.equals(criteria))
801             {
802                 collActivitysRelatedByOldOptionId = ActivityPeer.doSelectJoinAttributeOptionRelatedByNewOptionId(criteria);
803             }
804         }
805         lastActivitysRelatedByOldOptionIdCriteria = criteria;
806
807         return collActivitysRelatedByOldOptionId;
808     }
809                   
810                     
811                     
812                                 
813                                                               
814                                         
815                     
816                                 
817           
818     /**
819      * If this collection has already been initialized with
820      * an identical criteria, it returns the collection.
821      * Otherwise if this AttributeOption is new, it will return
822      * an empty collection; or if this AttributeOption has previously
823      * been saved, it will retrieve related ActivitysRelatedByOldOptionId from storage.
824      *
825      * This method is protected by default in order to keep the public
826      * api reasonable. You can provide public methods for those you
827      * actually need in AttributeOption.
828      */

829     protected List JavaDoc getActivitysRelatedByOldOptionIdJoinAttachment(Criteria criteria)
830         throws TorqueException
831     {
832         if (collActivitysRelatedByOldOptionId == null)
833         {
834             if (isNew())
835             {
836                collActivitysRelatedByOldOptionId = new ArrayList JavaDoc();
837             }
838             else
839             {
840                             criteria.add(ActivityPeer.OLD_OPTION_ID, getOptionId() );
841                             collActivitysRelatedByOldOptionId = ActivityPeer.doSelectJoinAttachment(criteria);
842             }
843         }
844         else
845         {
846             // the following code is to determine if a new query is
847
// called for. If the criteria is the same as the last
848
// one, just return the collection.
849

850                             criteria.add(ActivityPeer.OLD_OPTION_ID, getOptionId() );
851                         if (!lastActivitysRelatedByOldOptionIdCriteria.equals(criteria))
852             {
853                 collActivitysRelatedByOldOptionId = ActivityPeer.doSelectJoinAttachment(criteria);
854             }
855         }
856         lastActivitysRelatedByOldOptionIdCriteria = criteria;
857
858         return collActivitysRelatedByOldOptionId;
859     }
860                   
861                     
862                     
863                                 
864                                                               
865                                         
866                     
867                                 
868           
869     /**
870      * If this collection has already been initialized with
871      * an identical criteria, it returns the collection.
872      * Otherwise if this AttributeOption is new, it will return
873      * an empty collection; or if this AttributeOption has previously
874      * been saved, it will retrieve related ActivitysRelatedByOldOptionId from storage.
875      *
876      * This method is protected by default in order to keep the public
877      * api reasonable. You can provide public methods for those you
878      * actually need in AttributeOption.
879      */

880     protected List JavaDoc getActivitysRelatedByOldOptionIdJoinDepend(Criteria criteria)
881         throws TorqueException
882     {
883         if (collActivitysRelatedByOldOptionId == null)
884         {
885             if (isNew())
886             {
887                collActivitysRelatedByOldOptionId = new ArrayList JavaDoc();
888             }
889             else
890             {
891                             criteria.add(ActivityPeer.OLD_OPTION_ID, getOptionId() );
892                             collActivitysRelatedByOldOptionId = ActivityPeer.doSelectJoinDepend(criteria);
893             }
894         }
895         else
896         {
897             // the following code is to determine if a new query is
898
// called for. If the criteria is the same as the last
899
// one, just return the collection.
900

901                             criteria.add(ActivityPeer.OLD_OPTION_ID, getOptionId() );
902                         if (!lastActivitysRelatedByOldOptionIdCriteria.equals(criteria))
903             {
904                 collActivitysRelatedByOldOptionId = ActivityPeer.doSelectJoinDepend(criteria);
905             }
906         }
907         lastActivitysRelatedByOldOptionIdCriteria = criteria;
908
909         return collActivitysRelatedByOldOptionId;
910     }
911                             
912
913
914                                   
915             
916     /**
917      * Collection to store aggregation of collActivitysRelatedByNewOptionId
918      */

919     protected List JavaDoc collActivitysRelatedByNewOptionId;
920
921     /**
922      * Temporary storage of collActivitysRelatedByNewOptionId to save a possible db hit in
923      * the event objects are add to the collection, but the
924      * complete collection is never requested.
925      */

926     protected void initActivitysRelatedByNewOptionId()
927     {
928         if (collActivitysRelatedByNewOptionId == null)
929         {
930             collActivitysRelatedByNewOptionId = new ArrayList JavaDoc();
931         }
932     }
933
934             
935     /**
936      * Method called to associate a Activity object to this object
937      * through the Activity foreign key attribute
938      *
939      * @param l Activity
940      * @throws TorqueException
941      */

942     public void addActivityRelatedByNewOptionId(Activity l) throws TorqueException
943     {
944         getActivitysRelatedByNewOptionId().add(l);
945         l.setAttributeOptionRelatedByNewOptionId((AttributeOption)this);
946     }
947
948     /**
949      * The criteria used to select the current contents of collActivitysRelatedByNewOptionId
950      */

951     private Criteria lastActivitysRelatedByNewOptionIdCriteria = null;
952
953     /**
954      * If this collection has already been initialized, returns
955      * the collection. Otherwise returns the results of
956      * getActivitysRelatedByNewOptionId(new Criteria())
957      *
958      * @throws TorqueException
959      */

960     public List JavaDoc getActivitysRelatedByNewOptionId() throws TorqueException
961     {
962         if (collActivitysRelatedByNewOptionId == null)
963         {
964             collActivitysRelatedByNewOptionId = getActivitysRelatedByNewOptionId(new Criteria(10));
965         }
966         return collActivitysRelatedByNewOptionId;
967     }
968
969     /**
970      * If this collection has already been initialized with
971      * an identical criteria, it returns the collection.
972      * Otherwise if this AttributeOption has previously
973      * been saved, it will retrieve related ActivitysRelatedByNewOptionId from storage.
974      * If this AttributeOption is new, it will return
975      * an empty collection or the current collection, the criteria
976      * is ignored on a new object.
977      *
978      * @throws TorqueException
979      */

980     public List JavaDoc getActivitysRelatedByNewOptionId(Criteria criteria) throws TorqueException
981     {
982         if (collActivitysRelatedByNewOptionId == null)
983         {
984             if (isNew())
985             {
986                collActivitysRelatedByNewOptionId = new ArrayList JavaDoc();
987             }
988             else
989             {
990                       criteria.add(ActivityPeer.NEW_OPTION_ID, getOptionId() );
991                       collActivitysRelatedByNewOptionId = ActivityPeer.doSelect(criteria);
992             }
993         }
994         else
995         {
996             // criteria has no effect for a new object
997
if (!isNew())
998             {
999                 // the following code is to determine if a new query is
1000
// called for. If the criteria is the same as the last
1001
// one, just return the collection.
1002
criteria.add(ActivityPeer.NEW_OPTION_ID, getOptionId() );
1003                      if (!lastActivitysRelatedByNewOptionIdCriteria.equals(criteria))
1004                {
1005                    collActivitysRelatedByNewOptionId = ActivityPeer.doSelect(criteria);
1006                }
1007            }
1008        }
1009        lastActivitysRelatedByNewOptionIdCriteria = criteria;
1010
1011        return collActivitysRelatedByNewOptionId;
1012    }
1013
1014    /**
1015     * If this collection has already been initialized, returns
1016     * the collection. Otherwise returns the results of
1017     * getActivitysRelatedByNewOptionId(new Criteria(),Connection)
1018     * This method takes in the Connection also as input so that
1019     * referenced objects can also be obtained using a Connection
1020     * that is taken as input
1021     */

1022    public List JavaDoc getActivitysRelatedByNewOptionId(Connection JavaDoc con) throws TorqueException
1023    {
1024        if (collActivitysRelatedByNewOptionId == null)
1025        {
1026            collActivitysRelatedByNewOptionId = getActivitysRelatedByNewOptionId(new Criteria(10),con);
1027        }
1028        return collActivitysRelatedByNewOptionId;
1029    }
1030
1031    /**
1032     * If this collection has already been initialized with
1033     * an identical criteria, it returns the collection.
1034     * Otherwise if this AttributeOption has previously
1035     * been saved, it will retrieve related ActivitysRelatedByNewOptionId from storage.
1036     * If this AttributeOption is new, it will return
1037     * an empty collection or the current collection, the criteria
1038     * is ignored on a new object.
1039     * This method takes in the Connection also as input so that
1040     * referenced objects can also be obtained using a Connection
1041     * that is taken as input
1042     */

1043    public List JavaDoc getActivitysRelatedByNewOptionId(Criteria criteria,Connection JavaDoc con) throws TorqueException
1044    {
1045        if (collActivitysRelatedByNewOptionId == null)
1046        {
1047            if (isNew())
1048            {
1049               collActivitysRelatedByNewOptionId = new ArrayList JavaDoc();
1050            }
1051            else
1052            {
1053                       criteria.add(ActivityPeer.NEW_OPTION_ID, getOptionId() );
1054                       collActivitysRelatedByNewOptionId = ActivityPeer.doSelect(criteria,con);
1055             }
1056         }
1057         else
1058         {
1059             // criteria has no effect for a new object
1060
if (!isNew())
1061             {
1062                 // the following code is to determine if a new query is
1063
// called for. If the criteria is the same as the last
1064
// one, just return the collection.
1065
criteria.add(ActivityPeer.NEW_OPTION_ID, getOptionId() );
1066                     if (!lastActivitysRelatedByNewOptionIdCriteria.equals(criteria))
1067                 {
1068                     collActivitysRelatedByNewOptionId = ActivityPeer.doSelect(criteria,con);
1069                 }
1070             }
1071         }
1072         lastActivitysRelatedByNewOptionIdCriteria = criteria;
1073
1074         return collActivitysRelatedByNewOptionId;
1075     }
1076
1077                                                                  
1078              
1079                    
1080                    
1081                                
1082                                                              
1083                                        
1084                    
1085                                
1086          
1087    /**
1088     * If this collection has already been initialized with
1089     * an identical criteria, it returns the collection.
1090     * Otherwise if this AttributeOption is new, it will return
1091     * an empty collection; or if this AttributeOption has previously
1092     * been saved, it will retrieve related ActivitysRelatedByNewOptionId from storage.
1093     *
1094     * This method is protected by default in order to keep the public
1095     * api reasonable. You can provide public methods for those you
1096     * actually need in AttributeOption.
1097     */

1098    protected List JavaDoc getActivitysRelatedByNewOptionIdJoinIssue(Criteria criteria)
1099        throws TorqueException
1100    {
1101        if (collActivitysRelatedByNewOptionId == null)
1102        {
1103            if (isNew())
1104            {
1105               collActivitysRelatedByNewOptionId = new ArrayList JavaDoc();
1106            }
1107            else
1108            {
1109                            criteria.add(ActivityPeer.NEW_OPTION_ID, getOptionId() );
1110                            collActivitysRelatedByNewOptionId = ActivityPeer.doSelectJoinIssue(criteria);
1111            }
1112        }
1113        else
1114        {
1115            // the following code is to determine if a new query is
1116
// called for. If the criteria is the same as the last
1117
// one, just return the collection.
1118

1119                            criteria.add(ActivityPeer.NEW_OPTION_ID, getOptionId() );
1120                        if (!lastActivitysRelatedByNewOptionIdCriteria.equals(criteria))
1121            {
1122                collActivitysRelatedByNewOptionId = ActivityPeer.doSelectJoinIssue(criteria);
1123            }
1124        }
1125        lastActivitysRelatedByNewOptionIdCriteria = criteria;
1126
1127        return collActivitysRelatedByNewOptionId;
1128    }
1129                  
1130                    
1131                    
1132                                
1133                                                              
1134                                        
1135                    
1136                                
1137          
1138    /**
1139     * If this collection has already been initialized with
1140     * an identical criteria, it returns the collection.
1141     * Otherwise if this AttributeOption is new, it will return
1142     * an empty collection; or if this AttributeOption has previously
1143     * been saved, it will retrieve related ActivitysRelatedByNewOptionId from storage.
1144     *
1145     * This method is protected by default in order to keep the public
1146     * api reasonable. You can provide public methods for those you
1147     * actually need in AttributeOption.
1148     */

1149    protected List JavaDoc getActivitysRelatedByNewOptionIdJoinAttribute(Criteria criteria)
1150        throws TorqueException
1151    {
1152        if (collActivitysRelatedByNewOptionId == null)
1153        {
1154            if (isNew())
1155            {
1156               collActivitysRelatedByNewOptionId = new ArrayList JavaDoc();
1157            }
1158            else
1159            {
1160                            criteria.add(ActivityPeer.NEW_OPTION_ID, getOptionId() );
1161                            collActivitysRelatedByNewOptionId = ActivityPeer.doSelectJoinAttribute(criteria);
1162            }
1163        }
1164        else
1165        {
1166            // the following code is to determine if a new query is
1167
// called for. If the criteria is the same as the last
1168
// one, just return the collection.
1169

1170                            criteria.add(ActivityPeer.NEW_OPTION_ID, getOptionId() );
1171                        if (!lastActivitysRelatedByNewOptionIdCriteria.equals(criteria))
1172            {
1173                collActivitysRelatedByNewOptionId = ActivityPeer.doSelectJoinAttribute(criteria);
1174            }
1175        }
1176        lastActivitysRelatedByNewOptionIdCriteria = criteria;
1177
1178        return collActivitysRelatedByNewOptionId;
1179    }
1180                  
1181                    
1182                    
1183                                
1184                                                              
1185                                        
1186                    
1187                                
1188          
1189    /**
1190     * If this collection has already been initialized with
1191     * an identical criteria, it returns the collection.
1192     * Otherwise if this AttributeOption is new, it will return
1193     * an empty collection; or if this AttributeOption has previously
1194     * been saved, it will retrieve related ActivitysRelatedByNewOptionId from storage.
1195     *
1196     * This method is protected by default in order to keep the public
1197     * api reasonable. You can provide public methods for those you
1198     * actually need in AttributeOption.
1199     */

1200    protected List JavaDoc getActivitysRelatedByNewOptionIdJoinActivitySet(Criteria criteria)
1201        throws TorqueException
1202    {
1203        if (collActivitysRelatedByNewOptionId == null)
1204        {
1205            if (isNew())
1206            {
1207               collActivitysRelatedByNewOptionId = new ArrayList JavaDoc();
1208            }
1209            else
1210            {
1211                            criteria.add(ActivityPeer.NEW_OPTION_ID, getOptionId() );
1212                            collActivitysRelatedByNewOptionId = ActivityPeer.doSelectJoinActivitySet(criteria);
1213            }
1214        }
1215        else
1216        {
1217            // the following code is to determine if a new query is
1218
// called for. If the criteria is the same as the last
1219
// one, just return the collection.
1220

1221                            criteria.add(ActivityPeer.NEW_OPTION_ID, getOptionId() );
1222                        if (!lastActivitysRelatedByNewOptionIdCriteria.equals(criteria))
1223            {
1224                collActivitysRelatedByNewOptionId = ActivityPeer.doSelectJoinActivitySet(criteria);
1225            }
1226        }
1227        lastActivitysRelatedByNewOptionIdCriteria = criteria;
1228
1229        return collActivitysRelatedByNewOptionId;
1230    }
1231                  
1232                    
1233                    
1234                                            
1235                                                                          
1236                                        
1237                    
1238                                
1239          
1240    /**
1241     * If this collection has already been initialized with
1242     * an identical criteria, it returns the collection.
1243     * Otherwise if this AttributeOption is new, it will return
1244     * an empty collection; or if this AttributeOption has previously
1245     * been saved, it will retrieve related ActivitysRelatedByNewOptionId from storage.
1246     *
1247     * This method is protected by default in order to keep the public
1248     * api reasonable. You can provide public methods for those you
1249     * actually need in AttributeOption.
1250     */

1251    protected List JavaDoc getActivitysRelatedByNewOptionIdJoinScarabUserImplRelatedByOldUserId(Criteria criteria)
1252        throws TorqueException
1253    {
1254        if (collActivitysRelatedByNewOptionId == null)
1255        {
1256            if (isNew())
1257            {
1258               collActivitysRelatedByNewOptionId = new ArrayList JavaDoc();
1259            }
1260            else
1261            {
1262                            criteria.add(ActivityPeer.NEW_OPTION_ID, getOptionId() );
1263                            collActivitysRelatedByNewOptionId = ActivityPeer.doSelectJoinScarabUserImplRelatedByOldUserId(criteria);
1264            }
1265        }
1266        else
1267        {
1268            // the following code is to determine if a new query is
1269
// called for. If the criteria is the same as the last
1270
// one, just return the collection.
1271

1272                            criteria.add(ActivityPeer.NEW_OPTION_ID, getOptionId() );
1273                        if (!lastActivitysRelatedByNewOptionIdCriteria.equals(criteria))
1274            {
1275                collActivitysRelatedByNewOptionId = ActivityPeer.doSelectJoinScarabUserImplRelatedByOldUserId(criteria);
1276            }
1277        }
1278        lastActivitysRelatedByNewOptionIdCriteria = criteria;
1279
1280        return collActivitysRelatedByNewOptionId;
1281    }
1282                  
1283                    
1284                    
1285                                            
1286                                                                          
1287                                        
1288                    
1289                                
1290          
1291    /**
1292     * If this collection has already been initialized with
1293     * an identical criteria, it returns the collection.
1294     * Otherwise if this AttributeOption is new, it will return
1295     * an empty collection; or if this AttributeOption has previously
1296     * been saved, it will retrieve related ActivitysRelatedByNewOptionId from storage.
1297     *
1298     * This method is protected by default in order to keep the public
1299     * api reasonable. You can provide public methods for those you
1300     * actually need in AttributeOption.
1301     */

1302    protected List JavaDoc getActivitysRelatedByNewOptionIdJoinScarabUserImplRelatedByNewUserId(Criteria criteria)
1303        throws TorqueException
1304    {
1305        if (collActivitysRelatedByNewOptionId == null)
1306        {
1307            if (isNew())
1308            {
1309               collActivitysRelatedByNewOptionId = new ArrayList JavaDoc();
1310            }
1311            else
1312            {
1313                            criteria.add(ActivityPeer.NEW_OPTION_ID, getOptionId() );
1314                            collActivitysRelatedByNewOptionId = ActivityPeer.doSelectJoinScarabUserImplRelatedByNewUserId(criteria);
1315            }
1316        }
1317        else
1318        {
1319            // the following code is to determine if a new query is
1320
// called for. If the criteria is the same as the last
1321
// one, just return the collection.
1322

1323                            criteria.add(ActivityPeer.NEW_OPTION_ID, getOptionId() );
1324                        if (!lastActivitysRelatedByNewOptionIdCriteria.equals(criteria))
1325            {
1326                collActivitysRelatedByNewOptionId = ActivityPeer.doSelectJoinScarabUserImplRelatedByNewUserId(criteria);
1327            }
1328        }
1329        lastActivitysRelatedByNewOptionIdCriteria = criteria;
1330
1331        return collActivitysRelatedByNewOptionId;
1332    }
1333                  
1334                    
1335                              
1336                                            
1337                                                                          
1338                                        
1339                    
1340                                
1341          
1342    /**
1343     * If this collection has already been initialized with
1344     * an identical criteria, it returns the collection.
1345     * Otherwise if this AttributeOption is new, it will return
1346     * an empty collection; or if this AttributeOption has previously
1347     * been saved, it will retrieve related ActivitysRelatedByNewOptionId from storage.
1348     *
1349     * This method is protected by default in order to keep the public
1350     * api reasonable. You can provide public methods for those you
1351     * actually need in AttributeOption.
1352     */

1353    protected List JavaDoc getActivitysRelatedByNewOptionIdJoinAttributeOptionRelatedByOldOptionId(Criteria criteria)
1354        throws TorqueException
1355    {
1356        if (collActivitysRelatedByNewOptionId == null)
1357        {
1358            if (isNew())
1359            {
1360               collActivitysRelatedByNewOptionId = new ArrayList JavaDoc();
1361            }
1362            else
1363            {
1364                            criteria.add(ActivityPeer.NEW_OPTION_ID, getOptionId() );
1365                            collActivitysRelatedByNewOptionId = ActivityPeer.doSelectJoinAttributeOptionRelatedByOldOptionId(criteria);
1366            }
1367        }
1368        else
1369        {
1370            // the following code is to determine if a new query is
1371
// called for. If the criteria is the same as the last
1372
// one, just return the collection.
1373

1374                            criteria.add(ActivityPeer.NEW_OPTION_ID, getOptionId() );
1375                        if (!lastActivitysRelatedByNewOptionIdCriteria.equals(criteria))
1376            {
1377                collActivitysRelatedByNewOptionId = ActivityPeer.doSelectJoinAttributeOptionRelatedByOldOptionId(criteria);
1378            }
1379        }
1380        lastActivitysRelatedByNewOptionIdCriteria = criteria;
1381
1382        return collActivitysRelatedByNewOptionId;
1383    }
1384                  
1385                    
1386                              
1387                                            
1388                                                                          
1389                                        
1390                    
1391                                            
1392                  
1393                    
1394                    
1395                                
1396                                                              
1397                                        
1398                    
1399                                
1400          
1401    /**
1402     * If this collection has already been initialized with
1403     * an identical criteria, it returns the collection.
1404     * Otherwise if this AttributeOption is new, it will return
1405     * an empty collection; or if this AttributeOption has previously
1406     * been saved, it will retrieve related ActivitysRelatedByNewOptionId from storage.
1407     *
1408     * This method is protected by default in order to keep the public
1409     * api reasonable. You can provide public methods for those you
1410     * actually need in AttributeOption.
1411     */

1412    protected List JavaDoc getActivitysRelatedByNewOptionIdJoinAttachment(Criteria criteria)
1413        throws TorqueException
1414    {
1415        if (collActivitysRelatedByNewOptionId == null)
1416        {
1417            if (isNew())
1418            {
1419               collActivitysRelatedByNewOptionId = new ArrayList JavaDoc();
1420            }
1421            else
1422            {
1423                            criteria.add(ActivityPeer.NEW_OPTION_ID, getOptionId() );
1424                            collActivitysRelatedByNewOptionId = ActivityPeer.doSelectJoinAttachment(criteria);
1425            }
1426        }
1427        else
1428        {
1429            // the following code is to determine if a new query is
1430
// called for. If the criteria is the same as the last
1431
// one, just return the collection.
1432

1433                            criteria.add(ActivityPeer.NEW_OPTION_ID, getOptionId() );
1434                        if (!lastActivitysRelatedByNewOptionIdCriteria.equals(criteria))
1435            {
1436                collActivitysRelatedByNewOptionId = ActivityPeer.doSelectJoinAttachment(criteria);
1437            }
1438        }
1439        lastActivitysRelatedByNewOptionIdCriteria = criteria;
1440
1441        return collActivitysRelatedByNewOptionId;
1442    }
1443                  
1444                    
1445                    
1446                                
1447                                                              
1448                                        
1449                    
1450                                
1451          
1452    /**
1453     * If this collection has already been initialized with
1454     * an identical criteria, it returns the collection.
1455     * Otherwise if this AttributeOption is new, it will return
1456     * an empty collection; or if this AttributeOption has previously
1457     * been saved, it will retrieve related ActivitysRelatedByNewOptionId from storage.
1458     *
1459     * This method is protected by default in order to keep the public
1460     * api reasonable. You can provide public methods for those you
1461     * actually need in AttributeOption.
1462     */

1463    protected List JavaDoc getActivitysRelatedByNewOptionIdJoinDepend(Criteria criteria)
1464        throws TorqueException
1465    {
1466        if (collActivitysRelatedByNewOptionId == null)
1467        {
1468            if (isNew())
1469            {
1470               collActivitysRelatedByNewOptionId = new ArrayList JavaDoc();
1471            }
1472            else
1473            {
1474                            criteria.add(ActivityPeer.NEW_OPTION_ID, getOptionId() );
1475                            collActivitysRelatedByNewOptionId = ActivityPeer.doSelectJoinDepend(criteria);
1476            }
1477        }
1478        else
1479        {
1480            // the following code is to determine if a new query is
1481
// called for. If the criteria is the same as the last
1482
// one, just return the collection.
1483

1484                            criteria.add(ActivityPeer.NEW_OPTION_ID, getOptionId() );
1485                        if (!lastActivitysRelatedByNewOptionIdCriteria.equals(criteria))
1486            {
1487                collActivitysRelatedByNewOptionId = ActivityPeer.doSelectJoinDepend(criteria);
1488            }
1489        }
1490        lastActivitysRelatedByNewOptionIdCriteria = criteria;
1491
1492        return collActivitysRelatedByNewOptionId;
1493    }
1494                            
1495
1496
1497                          
1498            
1499    /**
1500     * Collection to store aggregation of collAttributes
1501     */

1502    protected List JavaDoc collAttributes;
1503
1504    /**
1505     * Temporary storage of collAttributes to save a possible db hit in
1506     * the event objects are add to the collection, but the
1507     * complete collection is never requested.
1508     */

1509    protected void initAttributes()
1510    {
1511        if (collAttributes == null)
1512        {
1513            collAttributes = new ArrayList JavaDoc();
1514        }
1515    }
1516
1517            
1518    /**
1519     * Method called to associate a Attribute object to this object
1520     * through the Attribute foreign key attribute
1521     *
1522     * @param l Attribute
1523     * @throws TorqueException
1524     */

1525    public void addAttribute(Attribute l) throws TorqueException
1526    {
1527        getAttributes().add(l);
1528        l.setAttributeOption((AttributeOption)this);
1529    }
1530
1531    /**
1532     * The criteria used to select the current contents of collAttributes
1533     */

1534    private Criteria lastAttributesCriteria = null;
1535
1536    /**
1537     * If this collection has already been initialized, returns
1538     * the collection. Otherwise returns the results of
1539     * getAttributes(new Criteria())
1540     *
1541     * @throws TorqueException
1542     */

1543    public List JavaDoc getAttributes() throws TorqueException
1544    {
1545        if (collAttributes == null)
1546        {
1547            collAttributes = getAttributes(new Criteria(10));
1548        }
1549        return collAttributes;
1550    }
1551
1552    /**
1553     * If this collection has already been initialized with
1554     * an identical criteria, it returns the collection.
1555     * Otherwise if this AttributeOption has previously
1556     * been saved, it will retrieve related Attributes from storage.
1557     * If this AttributeOption is new, it will return
1558     * an empty collection or the current collection, the criteria
1559     * is ignored on a new object.
1560     *
1561     * @throws TorqueException
1562     */

1563    public List JavaDoc getAttributes(Criteria criteria) throws TorqueException
1564    {
1565        if (collAttributes == null)
1566        {
1567            if (isNew())
1568            {
1569               collAttributes = new ArrayList JavaDoc();
1570            }
1571            else
1572            {
1573                      criteria.add(AttributePeer.REQUIRED_OPTION_ID, getOptionId() );
1574                      collAttributes = AttributePeer.doSelect(criteria);
1575            }
1576        }
1577        else
1578        {
1579            // criteria has no effect for a new object
1580
if (!isNew())
1581            {
1582                // the following code is to determine if a new query is
1583
// called for. If the criteria is the same as the last
1584
// one, just return the collection.
1585
criteria.add(AttributePeer.REQUIRED_OPTION_ID, getOptionId() );
1586                      if (!lastAttributesCriteria.equals(criteria))
1587                {
1588                    collAttributes = AttributePeer.doSelect(criteria);
1589                }
1590            }
1591        }
1592        lastAttributesCriteria = criteria;
1593
1594        return collAttributes;
1595    }
1596
1597    /**
1598     * If this collection has already been initialized, returns
1599     * the collection. Otherwise returns the results of
1600     * getAttributes(new Criteria(),Connection)
1601     * This method takes in the Connection also as input so that
1602     * referenced objects can also be obtained using a Connection
1603     * that is taken as input
1604     */

1605    public List JavaDoc getAttributes(Connection JavaDoc con) throws TorqueException
1606    {
1607        if (collAttributes == null)
1608        {
1609            collAttributes = getAttributes(new Criteria(10),con);
1610        }
1611        return collAttributes;
1612    }
1613
1614    /**
1615     * If this collection has already been initialized with
1616     * an identical criteria, it returns the collection.
1617     * Otherwise if this AttributeOption has previously
1618     * been saved, it will retrieve related Attributes from storage.
1619     * If this AttributeOption is new, it will return
1620     * an empty collection or the current collection, the criteria
1621     * is ignored on a new object.
1622     * This method takes in the Connection also as input so that
1623     * referenced objects can also be obtained using a Connection
1624     * that is taken as input
1625     */

1626    public List JavaDoc getAttributes(Criteria criteria,Connection JavaDoc con) throws TorqueException
1627    {
1628        if (collAttributes == null)
1629        {
1630            if (isNew())
1631            {
1632               collAttributes = new ArrayList JavaDoc();
1633            }
1634            else
1635            {
1636                       criteria.add(AttributePeer.REQUIRED_OPTION_ID, getOptionId() );
1637                       collAttributes = AttributePeer.doSelect(criteria,con);
1638             }
1639         }
1640         else
1641         {
1642             // criteria has no effect for a new object
1643
if (!isNew())
1644             {
1645                 // the following code is to determine if a new query is
1646
// called for. If the criteria is the same as the last
1647
// one, just return the collection.
1648
criteria.add(AttributePeer.REQUIRED_OPTION_ID, getOptionId() );
1649                     if (!lastAttributesCriteria.equals(criteria))
1650                 {
1651                     collAttributes = AttributePeer.doSelect(criteria,con);
1652                 }
1653             }
1654         }
1655         lastAttributesCriteria = criteria;
1656
1657         return collAttributes;
1658     }
1659
1660                              
1661              
1662                    
1663                    
1664                                
1665                                                              
1666                                        
1667                    
1668                    
1669          
1670    /**
1671     * If this collection has already been initialized with
1672     * an identical criteria, it returns the collection.
1673     * Otherwise if this AttributeOption is new, it will return
1674     * an empty collection; or if this AttributeOption has previously
1675     * been saved, it will retrieve related Attributes from storage.
1676     *
1677     * This method is protected by default in order to keep the public
1678     * api reasonable. You can provide public methods for those you
1679     * actually need in AttributeOption.
1680     */

1681    protected List JavaDoc getAttributesJoinAttributeType(Criteria criteria)
1682        throws TorqueException
1683    {
1684        if (collAttributes == null)
1685        {
1686            if (isNew())
1687            {
1688               collAttributes = new ArrayList JavaDoc();
1689            }
1690            else
1691            {
1692                            criteria.add(AttributePeer.REQUIRED_OPTION_ID, getOptionId() );
1693                            collAttributes = AttributePeer.doSelectJoinAttributeType(criteria);
1694            }
1695        }
1696        else
1697        {
1698            // the following code is to determine if a new query is
1699
// called for. If the criteria is the same as the last
1700
// one, just return the collection.
1701

1702                            criteria.add(AttributePeer.REQUIRED_OPTION_ID, getOptionId() );
1703                        if (!lastAttributesCriteria.equals(criteria))
1704            {
1705                collAttributes = AttributePeer.doSelectJoinAttributeType(criteria);
1706            }
1707        }
1708        lastAttributesCriteria = criteria;
1709
1710        return collAttributes;
1711    }
1712                  
1713                    
1714                              
1715                                
1716                                                              
1717                                        
1718                    
1719                    
1720          
1721    /**
1722     * If this collection has already been initialized with
1723     * an identical criteria, it returns the collection.
1724     * Otherwise if this AttributeOption is new, it will return
1725     * an empty collection; or if this AttributeOption has previously
1726     * been saved, it will retrieve related Attributes from storage.
1727     *
1728     * This method is protected by default in order to keep the public
1729     * api reasonable. You can provide public methods for those you
1730     * actually need in AttributeOption.
1731     */

1732    protected List JavaDoc getAttributesJoinAttributeOption(Criteria criteria)
1733        throws TorqueException
1734    {
1735        if (collAttributes == null)
1736        {
1737            if (isNew())
1738            {
1739               collAttributes = new ArrayList JavaDoc();
1740            }
1741            else
1742            {
1743                            criteria.add(AttributePeer.REQUIRED_OPTION_ID, getOptionId() );
1744                            collAttributes = AttributePeer.doSelectJoinAttributeOption(criteria);
1745            }
1746        }
1747        else
1748        {
1749            // the following code is to determine if a new query is
1750
// called for. If the criteria is the same as the last
1751
// one, just return the collection.
1752

1753                            criteria.add(AttributePeer.REQUIRED_OPTION_ID, getOptionId() );
1754                        if (!lastAttributesCriteria.equals(criteria))
1755            {
1756                collAttributes = AttributePeer.doSelectJoinAttributeOption(criteria);
1757            }
1758        }
1759        lastAttributesCriteria = criteria;
1760
1761        return collAttributes;
1762    }
1763                  
1764                    
1765                    
1766                                
1767                                                              
1768                                        
1769                    
1770                    
1771          
1772    /**
1773     * If this collection has already been initialized with
1774     * an identical criteria, it returns the collection.
1775     * Otherwise if this AttributeOption is new, it will return
1776     * an empty collection; or if this AttributeOption has previously
1777     * been saved, it will retrieve related Attributes from storage.
1778     *
1779     * This method is protected by default in order to keep the public
1780     * api reasonable. You can provide public methods for those you
1781     * actually need in AttributeOption.
1782     */

1783    protected List JavaDoc getAttributesJoinScarabUserImpl(Criteria criteria)
1784        throws TorqueException
1785    {
1786        if (collAttributes == null)
1787        {
1788            if (isNew())
1789            {
1790               collAttributes = new ArrayList JavaDoc();
1791            }
1792            else
1793            {
1794                            criteria.add(AttributePeer.REQUIRED_OPTION_ID, getOptionId() );
1795                            collAttributes = AttributePeer.doSelectJoinScarabUserImpl(criteria);
1796            }
1797        }
1798        else
1799        {
1800            // the following code is to determine if a new query is
1801
// called for. If the criteria is the same as the last
1802
// one, just return the collection.
1803

1804                            criteria.add(AttributePeer.REQUIRED_OPTION_ID, getOptionId() );
1805                        if (!lastAttributesCriteria.equals(criteria))
1806            {
1807                collAttributes = AttributePeer.doSelectJoinScarabUserImpl(criteria);
1808            }
1809        }
1810        lastAttributesCriteria = criteria;
1811
1812        return collAttributes;
1813    }
1814                            
1815
1816
1817                          
1818            
1819    /**
1820     * Collection to store aggregation of collConditions
1821     */

1822    protected List JavaDoc collConditions;
1823
1824    /**
1825     * Temporary storage of collConditions to save a possible db hit in
1826     * the event objects are add to the collection, but the
1827     * complete collection is never requested.
1828     */

1829    protected void initConditions()
1830    {
1831        if (collConditions == null)
1832        {
1833            collConditions = new ArrayList JavaDoc();
1834        }
1835    }
1836
1837            
1838    /**
1839     * Method called to associate a Condition object to this object
1840     * through the Condition foreign key attribute
1841     *
1842     * @param l Condition
1843     * @throws TorqueException
1844     */

1845    public void addCondition(Condition l) throws TorqueException
1846    {
1847        getConditions().add(l);
1848        l.setAttributeOption((AttributeOption)this);
1849    }
1850
1851    /**
1852     * The criteria used to select the current contents of collConditions
1853     */

1854    private Criteria lastConditionsCriteria = null;
1855
1856    /**
1857     * If this collection has already been initialized, returns
1858     * the collection. Otherwise returns the results of
1859     * getConditions(new Criteria())
1860     *
1861     * @throws TorqueException
1862     */

1863    public List JavaDoc getConditions() throws TorqueException
1864    {
1865        if (collConditions == null)
1866        {
1867            collConditions = getConditions(new Criteria(10));
1868        }
1869        return collConditions;
1870    }
1871
1872    /**
1873     * If this collection has already been initialized with
1874     * an identical criteria, it returns the collection.
1875     * Otherwise if this AttributeOption has previously
1876     * been saved, it will retrieve related Conditions from storage.
1877     * If this AttributeOption is new, it will return
1878     * an empty collection or the current collection, the criteria
1879     * is ignored on a new object.
1880     *
1881     * @throws TorqueException
1882     */

1883    public List JavaDoc getConditions(Criteria criteria) throws TorqueException
1884    {
1885        if (collConditions == null)
1886        {
1887            if (isNew())
1888            {
1889               collConditions = new ArrayList JavaDoc();
1890            }
1891            else
1892            {
1893                      criteria.add(ConditionPeer.OPTION_ID, getOptionId() );
1894                      collConditions = ConditionPeer.doSelect(criteria);
1895            }
1896        }
1897        else
1898        {
1899            // criteria has no effect for a new object
1900
if (!isNew())
1901            {
1902                // the following code is to determine if a new query is
1903
// called for. If the criteria is the same as the last
1904
// one, just return the collection.
1905
criteria.add(ConditionPeer.OPTION_ID, getOptionId() );
1906                      if (!lastConditionsCriteria.equals(criteria))
1907                {
1908                    collConditions = ConditionPeer.doSelect(criteria);
1909                }
1910            }
1911        }
1912        lastConditionsCriteria = criteria;
1913
1914        return collConditions;
1915    }
1916
1917    /**
1918     * If this collection has already been initialized, returns
1919     * the collection. Otherwise returns the results of
1920     * getConditions(new Criteria(),Connection)
1921     * This method takes in the Connection also as input so that
1922     * referenced objects can also be obtained using a Connection
1923     * that is taken as input
1924     */

1925    public List JavaDoc getConditions(Connection JavaDoc con) throws TorqueException
1926    {
1927        if (collConditions == null)
1928        {
1929            collConditions = getConditions(new Criteria(10),con);
1930        }
1931        return collConditions;
1932    }
1933
1934    /**
1935     * If this collection has already been initialized with
1936     * an identical criteria, it returns the collection.
1937     * Otherwise if this AttributeOption has previously
1938     * been saved, it will retrieve related Conditions from storage.
1939     * If this AttributeOption is new, it will return
1940     * an empty collection or the current collection, the criteria
1941     * is ignored on a new object.
1942     * This method takes in the Connection also as input so that
1943     * referenced objects can also be obtained using a Connection
1944     * that is taken as input
1945     */

1946    public List JavaDoc getConditions(Criteria criteria,Connection JavaDoc con) throws TorqueException
1947    {
1948        if (collConditions == null)
1949        {
1950            if (isNew())
1951            {
1952               collConditions = new ArrayList JavaDoc();
1953            }
1954            else
1955            {
1956                       criteria.add(ConditionPeer.OPTION_ID, getOptionId() );
1957                       collConditions = ConditionPeer.doSelect(criteria,con);
1958             }
1959         }
1960         else
1961         {
1962             // criteria has no effect for a new object
1963
if (!isNew())
1964             {
1965                 // the following code is to determine if a new query is
1966
// called for. If the criteria is the same as the last
1967
// one, just return the collection.
1968
criteria.add(ConditionPeer.OPTION_ID, getOptionId() );
1969                     if (!lastConditionsCriteria.equals(criteria))
1970                 {
1971                     collConditions = ConditionPeer.doSelect(criteria,con);
1972                 }
1973             }
1974         }
1975         lastConditionsCriteria = criteria;
1976
1977         return collConditions;
1978     }
1979
1980                                          
1981              
1982                    
1983                    
1984                                                                            
1985                                                                                                          
1986                                        
1987                    
1988                    
1989          
1990    /**
1991     * If this collection has already been initialized with
1992     * an identical criteria, it returns the collection.
1993     * Otherwise if this AttributeOption is new, it will return
1994     * an empty collection; or if this AttributeOption has previously
1995     * been saved, it will retrieve related Conditions from storage.
1996     *
1997     * This method is protected by default in order to keep the public
1998     * api reasonable. You can provide public methods for those you
1999     * actually need in AttributeOption.
2000     */

2001    protected List JavaDoc getConditionsJoinRModuleAttribute(Criteria criteria)
2002        throws TorqueException
2003    {
2004        if (collConditions == null)
2005        {
2006            if (isNew())
2007            {
2008               collConditions = new ArrayList JavaDoc();
2009            }
2010            else
2011            {
2012                            criteria.add(ConditionPeer.OPTION_ID, getOptionId() );
2013                            collConditions = ConditionPeer.doSelectJoinRModuleAttribute(criteria);
2014            }
2015        }
2016        else
2017        {
2018            // the following code is to determine if a new query is
2019
// called for. If the criteria is the same as the last
2020
// one, just return the collection.
2021

2022                            criteria.add(ConditionPeer.OPTION_ID, getOptionId() );
2023                        if (!lastConditionsCriteria.equals(criteria))
2024            {
2025                collConditions = ConditionPeer.doSelectJoinRModuleAttribute(criteria);
2026            }
2027        }
2028        lastConditionsCriteria = criteria;
2029
2030        return collConditions;
2031    }
2032                  
2033                    
2034                    
2035                                
2036                                                              
2037                                        
2038                    
2039                    
2040          
2041    /**
2042     * If this collection has already been initialized with
2043     * an identical criteria, it returns the collection.
2044     * Otherwise if this AttributeOption is new, it will return
2045     * an empty collection; or if this AttributeOption has previously
2046     * been saved, it will retrieve related Conditions from storage.
2047     *
2048     * This method is protected by default in order to keep the public
2049     * api reasonable. You can provide public methods for those you
2050     * actually need in AttributeOption.
2051     */

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

2073                            criteria.add(ConditionPeer.OPTION_ID, getOptionId() );
2074                        if (!lastConditionsCriteria.equals(criteria))
2075            {
2076                collConditions = ConditionPeer.doSelectJoinTransition(criteria);
2077            }
2078        }
2079        lastConditionsCriteria = criteria;
2080
2081        return collConditions;
2082    }
2083                  
2084                    
2085                    
2086                                
2087                                                              
2088                                        
2089                    
2090                    
2091          
2092    /**
2093     * If this collection has already been initialized with
2094     * an identical criteria, it returns the collection.
2095     * Otherwise if this AttributeOption is new, it will return
2096     * an empty collection; or if this AttributeOption has previously
2097     * been saved, it will retrieve related Conditions from storage.
2098     *
2099     * This method is protected by default in order to keep the public
2100     * api reasonable. You can provide public methods for those you
2101     * actually need in AttributeOption.
2102     */

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

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

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

2175                            criteria.add(ConditionPeer.OPTION_ID, getOptionId() );
2176                        if (!lastConditionsCriteria.equals(criteria))
2177            {
2178                collConditions = ConditionPeer.doSelectJoinAttributeOption(criteria);
2179            }
2180        }
2181        lastConditionsCriteria = criteria;
2182
2183        return collConditions;
2184    }
2185                  
2186                    
2187                    
2188                                                      
2189                                                                                    
2190                                        
2191                    
2192                    
2193          
2194    /**
2195     * If this collection has already been initialized with
2196     * an identical criteria, it returns the collection.
2197     * Otherwise if this AttributeOption is new, it will return
2198     * an empty collection; or if this AttributeOption has previously
2199     * been saved, it will retrieve related Conditions from storage.
2200     *
2201     * This method is protected by default in order to keep the public
2202     * api reasonable. You can provide public methods for those you
2203     * actually need in AttributeOption.
2204     */

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

2226                            criteria.add(ConditionPeer.OPTION_ID, getOptionId() );
2227                        if (!lastConditionsCriteria.equals(criteria))
2228            {
2229                collConditions = ConditionPeer.doSelectJoinRModuleIssueType(criteria);
2230            }
2231        }
2232        lastConditionsCriteria = criteria;
2233
2234        return collConditions;
2235    }
2236                            
2237
2238
2239                          
2240            
2241    /**
2242     * Collection to store aggregation of collAttributeValues
2243     */

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

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

2267    public void addAttributeValue(AttributeValue l) throws TorqueException
2268    {
2269        getAttributeValues().add(l);
2270        l.setAttributeOption((AttributeOption)this);
2271    }
2272
2273    /**
2274     * The criteria used to select the current contents of collAttributeValues
2275     */

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

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

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

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

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

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

2444                            criteria.add(AttributeValuePeer.OPTION_ID, getOptionId() );
2445                        if (!lastAttributeValuesCriteria.equals(criteria))
2446            {
2447                collAttributeValues = AttributeValuePeer.doSelectJoinIssue(criteria);
2448            }
2449        }
2450        lastAttributeValuesCriteria = criteria;
2451
2452        return collAttributeValues;
2453    }
2454                  
2455                    
2456                    
2457                                
2458                                                              
2459                                        
2460                    
2461                    
2462          
2463    /**
2464     * If this collection has already been initialized with
2465     * an identical criteria, it returns the collection.
2466     * Otherwise if this AttributeOption is new, it will return
2467     * an empty collection; or if this AttributeOption has previously
2468     * been saved, it will retrieve related AttributeValues from storage.
2469     *
2470     * This method is protected by default in order to keep the public
2471     * api reasonable. You can provide public methods for those you
2472     * actually need in AttributeOption.
2473     */

2474    protected List JavaDoc getAttributeValuesJoinAttribute(Criteria criteria)
2475        throws TorqueException
2476    {
2477        if (collAttributeValues == null)
2478        {
2479            if (isNew())
2480            {
2481               collAttributeValues = new ArrayList JavaDoc();
2482            }
2483            else
2484            {
2485                            criteria.add(AttributeValuePeer.OPTION_ID, getOptionId() );
2486                            collAttributeValues = AttributeValuePeer.doSelectJoinAttribute(criteria);
2487            }
2488        }
2489        else
2490        {
2491            // the following code is to determine if a new query is
2492
// called for. If the criteria is the same as the last
2493
// one, just return the collection.
2494

2495                            criteria.add(AttributeValuePeer.OPTION_ID, getOptionId() );
2496                        if (!lastAttributeValuesCriteria.equals(criteria))
2497            {
2498                collAttributeValues = AttributeValuePeer.doSelectJoinAttribute(criteria);
2499            }
2500        }
2501        lastAttributeValuesCriteria = criteria;
2502
2503        return collAttributeValues;
2504    }
2505                  
2506                    
2507                              
2508                                
2509                                                              
2510                                        
2511                    
2512                    
2513          
2514    /**
2515     * If this collection has already been initialized with
2516     * an identical criteria, it returns the collection.
2517     * Otherwise if this AttributeOption is new, it will return
2518     * an empty collection; or if this AttributeOption has previously
2519     * been saved, it will retrieve related AttributeValues from storage.
2520     *
2521     * This method is protected by default in order to keep the public
2522     * api reasonable. You can provide public methods for those you
2523     * actually need in AttributeOption.
2524     */

2525    protected List JavaDoc getAttributeValuesJoinAttributeOption(Criteria criteria)
2526        throws TorqueException
2527    {
2528        if (collAttributeValues == null)
2529        {
2530            if (isNew())
2531            {
2532               collAttributeValues = new ArrayList JavaDoc();
2533            }
2534            else
2535            {
2536                            criteria.add(AttributeValuePeer.OPTION_ID, getOptionId() );
2537                            collAttributeValues = AttributeValuePeer.doSelectJoinAttributeOption(criteria);
2538            }
2539        }
2540        else
2541        {
2542            // the following code is to determine if a new query is
2543
// called for. If the criteria is the same as the last
2544
// one, just return the collection.
2545

2546                            criteria.add(AttributeValuePeer.OPTION_ID, getOptionId() );
2547                        if (!lastAttributeValuesCriteria.equals(criteria))
2548            {
2549                collAttributeValues = AttributeValuePeer.doSelectJoinAttributeOption(criteria);
2550            }
2551        }
2552        lastAttributeValuesCriteria = criteria;
2553
2554        return collAttributeValues;
2555    }
2556                  
2557                    
2558                    
2559                                
2560                                                              
2561                                        
2562                    
2563                    
2564          
2565    /**
2566     * If this collection has already been initialized with
2567     * an identical criteria, it returns the collection.
2568     * Otherwise if this AttributeOption is new, it will return
2569     * an empty collection; or if this AttributeOption has previously
2570     * been saved, it will retrieve related AttributeValues from storage.
2571     *
2572     * This method is protected by default in order to keep the public
2573     * api reasonable. You can provide public methods for those you
2574     * actually need in AttributeOption.
2575     */

2576    protected List JavaDoc getAttributeValuesJoinScarabUserImpl(Criteria criteria)
2577        throws TorqueException
2578    {
2579        if (collAttributeValues == null)
2580        {
2581            if (isNew())
2582            {
2583               collAttributeValues = new ArrayList JavaDoc();
2584            }
2585            else
2586            {
2587                            criteria.add(AttributeValuePeer.OPTION_ID, getOptionId() );
2588                            collAttributeValues = AttributeValuePeer.doSelectJoinScarabUserImpl(criteria);
2589            }
2590        }
2591        else
2592        {
2593            // the following code is to determine if a new query is
2594
// called for. If the criteria is the same as the last
2595
// one, just return the collection.
2596

2597                            criteria.add(AttributeValuePeer.OPTION_ID, getOptionId() );
2598                        if (!lastAttributeValuesCriteria.equals(criteria))
2599            {
2600                collAttributeValues = AttributeValuePeer.doSelectJoinScarabUserImpl(criteria);
2601            }
2602        }
2603        lastAttributeValuesCriteria = criteria;
2604
2605        return collAttributeValues;
2606    }
2607                            
2608
2609
2610                          
2611            
2612    /**
2613     * Collection to store aggregation of collRModuleOptions
2614     */

2615    protected List JavaDoc collRModuleOptions;
2616
2617    /**
2618     * Temporary storage of collRModuleOptions to save a possible db hit in
2619     * the event objects are add to the collection, but the
2620     * complete collection is never requested.
2621     */

2622    protected void initRModuleOptions()
2623    {
2624        if (collRModuleOptions == null)
2625        {
2626            collRModuleOptions = new ArrayList JavaDoc();
2627        }
2628    }
2629
2630            
2631    /**
2632     * Method called to associate a RModuleOption object to this object
2633     * through the RModuleOption foreign key attribute
2634     *
2635     * @param l RModuleOption
2636     * @throws TorqueException
2637     */

2638    public void addRModuleOption(RModuleOption l) throws TorqueException
2639    {
2640        getRModuleOptions().add(l);
2641        l.setAttributeOption((AttributeOption)this);
2642    }
2643
2644    /**
2645     * The criteria used to select the current contents of collRModuleOptions
2646     */

2647    private Criteria lastRModuleOptionsCriteria = null;
2648
2649    /**
2650     * If this collection has already been initialized, returns
2651     * the collection. Otherwise returns the results of
2652     * getRModuleOptions(new Criteria())
2653     *
2654     * @throws TorqueException
2655     */

2656    public List JavaDoc getRModuleOptions() throws TorqueException
2657    {
2658        if (collRModuleOptions == null)
2659        {
2660            collRModuleOptions = getRModuleOptions(new Criteria(10));
2661        }
2662        return collRModuleOptions;
2663    }
2664
2665    /**
2666     * If this collection has already been initialized with
2667     * an identical criteria, it returns the collection.
2668     * Otherwise if this AttributeOption has previously
2669     * been saved, it will retrieve related RModuleOptions from storage.
2670     * If this AttributeOption is new, it will return
2671     * an empty collection or the current collection, the criteria
2672     * is ignored on a new object.
2673     *
2674     * @throws TorqueException
2675     */

2676    public List JavaDoc getRModuleOptions(Criteria criteria) throws TorqueException
2677    {
2678        if (collRModuleOptions == null)
2679        {
2680            if (isNew())
2681            {
2682               collRModuleOptions = new ArrayList JavaDoc();
2683            }
2684            else
2685            {
2686                      criteria.add(RModuleOptionPeer.OPTION_ID, getOptionId() );
2687                      collRModuleOptions = RModuleOptionPeer.doSelect(criteria);
2688            }
2689        }
2690        else
2691        {
2692            // criteria has no effect for a new object
2693
if (!isNew())
2694            {
2695                // the following code is to determine if a new query is
2696
// called for. If the criteria is the same as the last
2697
// one, just return the collection.
2698
criteria.add(RModuleOptionPeer.OPTION_ID, getOptionId() );
2699                      if (!lastRModuleOptionsCriteria.equals(criteria))
2700                {
2701                    collRModuleOptions = RModuleOptionPeer.doSelect(criteria);
2702                }
2703            }
2704        }
2705        lastRModuleOptionsCriteria = criteria;
2706
2707        return collRModuleOptions;
2708    }
2709
2710    /**
2711     * If this collection has already been initialized, returns
2712     * the collection. Otherwise returns the results of
2713     * getRModuleOptions(new Criteria(),Connection)
2714     * This method takes in the Connection also as input so that
2715     * referenced objects can also be obtained using a Connection
2716     * that is taken as input
2717     */

2718    public List JavaDoc getRModuleOptions(Connection JavaDoc con) throws TorqueException
2719    {
2720        if (collRModuleOptions == null)
2721        {
2722            collRModuleOptions = getRModuleOptions(new Criteria(10),con);
2723        }
2724        return collRModuleOptions;
2725    }
2726
2727    /**
2728     * If this collection has already been initialized with
2729     * an identical criteria, it returns the collection.
2730     * Otherwise if this AttributeOption has previously
2731     * been saved, it will retrieve related RModuleOptions from storage.
2732     * If this AttributeOption is new, it will return
2733     * an empty collection or the current collection, the criteria
2734     * is ignored on a new object.
2735     * This method takes in the Connection also as input so that
2736     * referenced objects can also be obtained using a Connection
2737     * that is taken as input
2738     */

2739    public List JavaDoc getRModuleOptions(Criteria criteria,Connection JavaDoc con) throws TorqueException
2740    {
2741        if (collRModuleOptions == null)
2742        {
2743            if (isNew())
2744            {
2745               collRModuleOptions = new ArrayList JavaDoc();
2746            }
2747            else
2748            {
2749                       criteria.add(RModuleOptionPeer.OPTION_ID, getOptionId() );
2750                       collRModuleOptions = RModuleOptionPeer.doSelect(criteria,con);
2751             }
2752         }
2753         else
2754         {
2755             // criteria has no effect for a new object
2756
if (!isNew())
2757             {
2758                 // the following code is to determine if a new query is
2759
// called for. If the criteria is the same as the last
2760
// one, just return the collection.
2761
criteria.add(RModuleOptionPeer.OPTION_ID, getOptionId() );
2762                     if (!lastRModuleOptionsCriteria.equals(criteria))
2763                 {
2764                     collRModuleOptions = RModuleOptionPeer.doSelect(criteria,con);
2765                 }
2766             }
2767         }
2768         lastRModuleOptionsCriteria = criteria;
2769
2770         return collRModuleOptions;
2771     }
2772
2773                              
2774              
2775                    
2776                              
2777                                
2778                                                              
2779                                        
2780                    
2781                    
2782          
2783    /**
2784     * If this collection has already been initialized with
2785     * an identical criteria, it returns the collection.
2786     * Otherwise if this AttributeOption is new, it will return
2787     * an empty collection; or if this AttributeOption has previously
2788     * been saved, it will retrieve related RModuleOptions from storage.
2789     *
2790     * This method is protected by default in order to keep the public
2791     * api reasonable. You can provide public methods for those you
2792     * actually need in AttributeOption.
2793     */

2794    protected List JavaDoc getRModuleOptionsJoinAttributeOption(Criteria criteria)
2795        throws TorqueException
2796    {
2797        if (collRModuleOptions == null)
2798        {
2799            if (isNew())
2800            {
2801               collRModuleOptions = new ArrayList JavaDoc();
2802            }
2803            else
2804            {
2805                            criteria.add(RModuleOptionPeer.OPTION_ID, getOptionId() );
2806                            collRModuleOptions = RModuleOptionPeer.doSelectJoinAttributeOption(criteria);
2807            }
2808        }
2809        else
2810        {
2811            // the following code is to determine if a new query is
2812
// called for. If the criteria is the same as the last
2813
// one, just return the collection.
2814

2815                            criteria.add(RModuleOptionPeer.OPTION_ID, getOptionId() );
2816                        if (!lastRModuleOptionsCriteria.equals(criteria))
2817            {
2818                collRModuleOptions = RModuleOptionPeer.doSelectJoinAttributeOption(criteria);
2819            }
2820        }
2821        lastRModuleOptionsCriteria = criteria;
2822
2823        return collRModuleOptions;
2824    }
2825                  
2826                    
2827                    
2828                                
2829                                                              
2830                                        
2831                    
2832                    
2833          
2834    /**
2835     * If this collection has already been initialized with
2836     * an identical criteria, it returns the collection.
2837     * Otherwise if this AttributeOption is new, it will return
2838     * an empty collection; or if this AttributeOption has previously
2839     * been saved, it will retrieve related RModuleOptions from storage.
2840     *
2841     * This method is protected by default in order to keep the public
2842     * api reasonable. You can provide public methods for those you
2843     * actually need in AttributeOption.
2844     */

2845    protected List JavaDoc getRModuleOptionsJoinScarabModule(Criteria criteria)
2846        throws TorqueException
2847    {
2848        if (collRModuleOptions == null)
2849        {
2850            if (isNew())
2851            {
2852               collRModuleOptions = new ArrayList JavaDoc();
2853            }
2854            else
2855            {
2856                            criteria.add(RModuleOptionPeer.OPTION_ID, getOptionId() );
2857                            collRModuleOptions = RModuleOptionPeer.doSelectJoinScarabModule(criteria);
2858            }
2859        }
2860        else
2861        {
2862            // the following code is to determine if a new query is
2863
// called for. If the criteria is the same as the last
2864
// one, just return the collection.
2865

2866                            criteria.add(RModuleOptionPeer.OPTION_ID, getOptionId() );
2867                        if (!lastRModuleOptionsCriteria.equals(criteria))
2868            {
2869                collRModuleOptions = RModuleOptionPeer.doSelectJoinScarabModule(criteria);
2870            }
2871        }
2872        lastRModuleOptionsCriteria = criteria;
2873
2874        return collRModuleOptions;
2875    }
2876                  
2877                    
2878                    
2879                                
2880                                                              
2881                                        
2882                    
2883                    
2884          
2885    /**
2886     * If this collection has already been initialized with
2887     * an identical criteria, it returns the collection.
2888     * Otherwise if this AttributeOption is new, it will return
2889     * an empty collection; or if this AttributeOption has previously
2890     * been saved, it will retrieve related RModuleOptions from storage.
2891     *
2892     * This method is protected by default in order to keep the public
2893     * api reasonable. You can provide public methods for those you
2894     * actually need in AttributeOption.
2895     */

2896    protected List JavaDoc getRModuleOptionsJoinIssueType(Criteria criteria)
2897        throws TorqueException
2898    {
2899        if (collRModuleOptions == null)
2900        {
2901            if (isNew())
2902            {
2903               collRModuleOptions = new ArrayList JavaDoc();
2904            }
2905            else
2906            {
2907                            criteria.add(RModuleOptionPeer.OPTION_ID, getOptionId() );
2908                            collRModuleOptions = RModuleOptionPeer.doSelectJoinIssueType(criteria);
2909            }
2910        }
2911        else
2912        {
2913            // the following code is to determine if a new query is
2914
// called for. If the criteria is the same as the last
2915
// one, just return the collection.
2916

2917                            criteria.add(RModuleOptionPeer.OPTION_ID, getOptionId() );
2918                        if (!lastRModuleOptionsCriteria.equals(criteria))
2919            {
2920                collRModuleOptions = RModuleOptionPeer.doSelectJoinIssueType(criteria);
2921            }
2922        }
2923        lastRModuleOptionsCriteria = criteria;
2924
2925        return collRModuleOptions;
2926    }
2927                            
2928
2929
2930                          
2931            
2932    /**
2933     * Collection to store aggregation of collRIssueTypeOptions
2934     */

2935    protected List JavaDoc collRIssueTypeOptions;
2936
2937    /**
2938     * Temporary storage of collRIssueTypeOptions to save a possible db hit in
2939     * the event objects are add to the collection, but the
2940     * complete collection is never requested.
2941     */

2942    protected void initRIssueTypeOptions()
2943    {
2944        if (collRIssueTypeOptions == null)
2945        {
2946            collRIssueTypeOptions = new ArrayList JavaDoc();
2947        }
2948    }
2949
2950            
2951    /**
2952     * Method called to associate a RIssueTypeOption object to this object
2953     * through the RIssueTypeOption foreign key attribute
2954     *
2955     * @param l RIssueTypeOption
2956     * @throws TorqueException
2957     */

2958    public void addRIssueTypeOption(RIssueTypeOption l) throws TorqueException
2959    {
2960        getRIssueTypeOptions().add(l);
2961        l.setAttributeOption((AttributeOption)this);
2962    }
2963
2964    /**
2965     * The criteria used to select the current contents of collRIssueTypeOptions
2966     */

2967    private Criteria lastRIssueTypeOptionsCriteria = null;
2968
2969    /**
2970     * If this collection has already been initialized, returns
2971     * the collection. Otherwise returns the results of
2972     * getRIssueTypeOptions(new Criteria())
2973     *
2974     * @throws TorqueException
2975     */

2976    public List JavaDoc getRIssueTypeOptions() throws TorqueException
2977    {
2978        if (collRIssueTypeOptions == null)
2979        {
2980            collRIssueTypeOptions = getRIssueTypeOptions(new Criteria(10));
2981        }
2982        return collRIssueTypeOptions;
2983    }
2984
2985    /**
2986     * If this collection has already been initialized with
2987     * an identical criteria, it returns the collection.
2988     * Otherwise if this AttributeOption has previously
2989     * been saved, it will retrieve related RIssueTypeOptions from storage.
2990     * If this AttributeOption is new, it will return
2991     * an empty collection or the current collection, the criteria
2992     * is ignored on a new object.
2993     *
2994     * @throws TorqueException
2995     */

2996    public List JavaDoc getRIssueTypeOptions(Criteria criteria) throws TorqueException
2997    {
2998        if (collRIssueTypeOptions == null)
2999        {
3000            if (isNew())
3001            {
3002               collRIssueTypeOptions = new ArrayList JavaDoc();
3003            }
3004            else
3005            {
3006                      criteria.add(RIssueTypeOptionPeer.OPTION_ID, getOptionId() );
3007                      collRIssueTypeOptions = RIssueTypeOptionPeer.doSelect(criteria);
3008            }
3009        }
3010        else
3011        {
3012            // criteria has no effect for a new object
3013
if (!isNew())
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
criteria.add(RIssueTypeOptionPeer.OPTION_ID, getOptionId() );
3019                      if (!lastRIssueTypeOptionsCriteria.equals(criteria))
3020                {
3021                    collRIssueTypeOptions = RIssueTypeOptionPeer.doSelect(criteria);
3022                }
3023            }
3024        }
3025        lastRIssueTypeOptionsCriteria = criteria;
3026
3027        return collRIssueTypeOptions;
3028    }
3029
3030    /**
3031     * If this collection has already been initialized, returns
3032     * the collection. Otherwise returns the results of
3033     * getRIssueTypeOptions(new Criteria(),Connection)
3034     * This method takes in the Connection also as input so that
3035     * referenced objects can also be obtained using a Connection
3036     * that is taken as input
3037     */

3038    public List JavaDoc getRIssueTypeOptions(Connection JavaDoc con) throws TorqueException
3039    {
3040        if (collRIssueTypeOptions == null)
3041        {
3042            collRIssueTypeOptions = getRIssueTypeOptions(new Criteria(10),con);
3043        }
3044        return collRIssueTypeOptions;
3045    }
3046
3047    /**
3048     * If this collection has already been initialized with
3049     * an identical criteria, it returns the collection.
3050     * Otherwise if this AttributeOption has previously
3051     * been saved, it will retrieve related RIssueTypeOptions from storage.
3052     * If this AttributeOption is new, it will return
3053     * an empty collection or the current collection, the criteria
3054     * is ignored on a new object.
3055     * This method takes in the Connection also as input so that
3056     * referenced objects can also be obtained using a Connection
3057     * that is taken as input
3058     */

3059    public List JavaDoc getRIssueTypeOptions(Criteria criteria,Connection JavaDoc con) throws TorqueException
3060    {
3061        if (collRIssueTypeOptions == null)
3062        {
3063            if (isNew())
3064            {
3065               collRIssueTypeOptions = new ArrayList JavaDoc();
3066            }
3067            else
3068            {
3069                       criteria.add(RIssueTypeOptionPeer.OPTION_ID, getOptionId() );
3070                       collRIssueTypeOptions = RIssueTypeOptionPeer.doSelect(criteria,con);
3071             }
3072         }
3073         else
3074         {
3075             // criteria has no effect for a new object
3076
if (!isNew())
3077             {
3078                 // the following code is to determine if a new query is
3079
// called for. If the criteria is the same as the last
3080
// one, just return the collection.
3081
criteria.add(RIssueTypeOptionPeer.OPTION_ID, getOptionId() );
3082                     if (!lastRIssueTypeOptionsCriteria.equals(criteria))
3083                 {
3084                     collRIssueTypeOptions = RIssueTypeOptionPeer.doSelect(criteria,con);
3085                 }
3086             }
3087         }
3088         lastRIssueTypeOptionsCriteria = criteria;
3089
3090         return collRIssueTypeOptions;
3091     }
3092
3093                        
3094              
3095                    
3096                              
3097                                
3098                                                              
3099                                        
3100                    
3101                    
3102          
3103    /**
3104     * If this collection has already been initialized with
3105     * an identical criteria, it returns the collection.
3106     * Otherwise if this AttributeOption is new, it will return
3107     * an empty collection; or if this AttributeOption has previously
3108     * been saved, it will retrieve related RIssueTypeOptions from storage.
3109     *
3110     * This method is protected by default in order to keep the public
3111     * api reasonable. You can provide public methods for those you
3112     * actually need in AttributeOption.
3113     */

3114    protected List JavaDoc getRIssueTypeOptionsJoinAttributeOption(Criteria criteria)
3115        throws TorqueException
3116    {
3117        if (collRIssueTypeOptions == null)
3118        {
3119            if (isNew())
3120            {
3121               collRIssueTypeOptions = new ArrayList JavaDoc();
3122            }
3123            else
3124            {
3125                            criteria.add(RIssueTypeOptionPeer.OPTION_ID, getOptionId() );
3126                            collRIssueTypeOptions = RIssueTypeOptionPeer.doSelectJoinAttributeOption(criteria);
3127            }
3128        }
3129        else
3130        {
3131            // the following code is to determine if a new query is
3132
// called for. If the criteria is the same as the last
3133
// one, just return the collection.
3134

3135                            criteria.add(RIssueTypeOptionPeer.OPTION_ID, getOptionId() );
3136                        if (!lastRIssueTypeOptionsCriteria.equals(criteria))
3137            {
3138                collRIssueTypeOptions = RIssueTypeOptionPeer.doSelectJoinAttributeOption(criteria);
3139            }
3140        }
3141        lastRIssueTypeOptionsCriteria = criteria;
3142
3143        return collRIssueTypeOptions;
3144    }
3145                  
3146                    
3147                    
3148                                
3149                                                              
3150                                        
3151                    
3152                    
3153          
3154    /**
3155     * If this collection has already been initialized with
3156     * an identical criteria, it returns the collection.
3157     * Otherwise if this AttributeOption is new, it will return
3158     * an empty collection; or if this AttributeOption has previously
3159     * been saved, it will retrieve related RIssueTypeOptions from storage.
3160     *
3161     * This method is protected by default in order to keep the public
3162     * api reasonable. You can provide public methods for those you
3163     * actually need in AttributeOption.
3164     */

3165    protected List JavaDoc getRIssueTypeOptionsJoinIssueType(Criteria criteria)
3166        throws TorqueException
3167    {
3168        if (collRIssueTypeOptions == null)
3169        {
3170            if (isNew())
3171            {
3172               collRIssueTypeOptions = new ArrayList JavaDoc();
3173            }
3174            else
3175            {
3176                            criteria.add(RIssueTypeOptionPeer.OPTION_ID, getOptionId() );
3177                            collRIssueTypeOptions = RIssueTypeOptionPeer.doSelectJoinIssueType(criteria);
3178            }
3179        }
3180        else
3181        {
3182            // the following code is to determine if a new query is
3183
// called for. If the criteria is the same as the last
3184
// one, just return the collection.
3185

3186                            criteria.add(RIssueTypeOptionPeer.OPTION_ID, getOptionId() );
3187                        if (!lastRIssueTypeOptionsCriteria.equals(criteria))
3188            {
3189                collRIssueTypeOptions = RIssueTypeOptionPeer.doSelectJoinIssueType(criteria);
3190            }
3191        }
3192        lastRIssueTypeOptionsCriteria = criteria;
3193
3194        return collRIssueTypeOptions;
3195    }
3196                            
3197
3198
3199                                  
3200            
3201    /**
3202     * Collection to store aggregation of collROptionOptionsRelatedByOption1Id
3203     */

3204    protected List JavaDoc collROptionOptionsRelatedByOption1Id;
3205
3206    /**
3207     * Temporary storage of collROptionOptionsRelatedByOption1Id to save a possible db hit in
3208     * the event objects are add to the collection, but the
3209     * complete collection is never requested.
3210     */

3211    protected void initROptionOptionsRelatedByOption1Id()
3212    {
3213        if (collROptionOptionsRelatedByOption1Id == null)
3214        {
3215            collROptionOptionsRelatedByOption1Id = new ArrayList JavaDoc();
3216        }
3217    }
3218
3219            
3220    /**
3221     * Method called to associate a ROptionOption object to this object
3222     * through the ROptionOption foreign key attribute
3223     *
3224     * @param l ROptionOption
3225     * @throws TorqueException
3226     */

3227    public void addROptionOptionRelatedByOption1Id(ROptionOption l) throws TorqueException
3228    {
3229        getROptionOptionsRelatedByOption1Id().add(l);
3230        l.setAttributeOptionRelatedByOption1Id((AttributeOption)this);
3231    }
3232
3233    /**
3234     * The criteria used to select the current contents of collROptionOptionsRelatedByOption1Id
3235     */

3236    private Criteria lastROptionOptionsRelatedByOption1IdCriteria = null;
3237
3238    /**
3239     * If this collection has already been initialized, returns
3240     * the collection. Otherwise returns the results of
3241     * getROptionOptionsRelatedByOption1Id(new Criteria())
3242     *
3243     * @throws TorqueException
3244     */

3245    public List JavaDoc getROptionOptionsRelatedByOption1Id() throws TorqueException
3246    {
3247        if (collROptionOptionsRelatedByOption1Id == null)
3248        {
3249            collROptionOptionsRelatedByOption1Id = getROptionOptionsRelatedByOption1Id(new Criteria(10));
3250        }
3251        return collROptionOptionsRelatedByOption1Id;
3252    }
3253
3254    /**
3255     * If this collection has already been initialized with
3256     * an identical criteria, it returns the collection.
3257     * Otherwise if this AttributeOption has previously
3258     * been saved, it will retrieve related ROptionOptionsRelatedByOption1Id from storage.
3259     * If this AttributeOption is new, it will return
3260     * an empty collection or the current collection, the criteria
3261     * is ignored on a new object.
3262     *
3263     * @throws TorqueException
3264     */

3265    public List JavaDoc getROptionOptionsRelatedByOption1Id(Criteria criteria) throws TorqueException
3266    {
3267        if (collROptionOptionsRelatedByOption1Id == null)
3268        {
3269            if (isNew())
3270            {
3271               collROptionOptionsRelatedByOption1Id = new ArrayList JavaDoc();
3272            }
3273            else
3274            {
3275                      criteria.add(ROptionOptionPeer.OPTION1_ID, getOptionId() );
3276                      collROptionOptionsRelatedByOption1Id = ROptionOptionPeer.doSelect(criteria);
3277            }
3278        }
3279        else
3280        {
3281            // criteria has no effect for a new object
3282
if (!isNew())
3283            {
3284                // the following code is to determine if a new query is
3285
// called for. If the criteria is the same as the last
3286
// one, just return the collection.
3287
criteria.add(ROptionOptionPeer.OPTION1_ID, getOptionId() );
3288                      if (!lastROptionOptionsRelatedByOption1IdCriteria.equals(criteria))
3289                {
3290                    collROptionOptionsRelatedByOption1Id = ROptionOptionPeer.doSelect(criteria);
3291                }
3292            }
3293        }
3294        lastROptionOptionsRelatedByOption1IdCriteria = criteria;
3295
3296        return collROptionOptionsRelatedByOption1Id;
3297    }
3298
3299    /**
3300     * If this collection has already been initialized, returns
3301     * the collection. Otherwise returns the results of
3302     * getROptionOptionsRelatedByOption1Id(new Criteria(),Connection)
3303     * This method takes in the Connection also as input so that
3304     * referenced objects can also be obtained using a Connection
3305     * that is taken as input
3306     */

3307    public List JavaDoc getROptionOptionsRelatedByOption1Id(Connection JavaDoc con) throws TorqueException
3308    {
3309        if (collROptionOptionsRelatedByOption1Id == null)
3310        {
3311            collROptionOptionsRelatedByOption1Id = getROptionOptionsRelatedByOption1Id(new Criteria(10),con);
3312        }
3313        return collROptionOptionsRelatedByOption1Id;
3314    }
3315
3316    /**
3317     * If this collection has already been initialized with
3318     * an identical criteria, it returns the collection.
3319     * Otherwise if this AttributeOption has previously
3320     * been saved, it will retrieve related ROptionOptionsRelatedByOption1Id from storage.
3321     * If this AttributeOption is new, it will return
3322     * an empty collection or the current collection, the criteria
3323     * is ignored on a new object.
3324     * This method takes in the Connection also as input so that
3325     * referenced objects can also be obtained using a Connection
3326     * that is taken as input
3327     */

3328    public List JavaDoc getROptionOptionsRelatedByOption1Id(Criteria criteria,Connection JavaDoc con) throws TorqueException
3329    {
3330        if (collROptionOptionsRelatedByOption1Id == null)
3331        {
3332            if (isNew())
3333            {
3334               collROptionOptionsRelatedByOption1Id = new ArrayList JavaDoc();
3335            }
3336            else
3337            {
3338                       criteria.add(ROptionOptionPeer.OPTION1_ID, getOptionId() );
3339                       collROptionOptionsRelatedByOption1Id = ROptionOptionPeer.doSelect(criteria,con);
3340             }
3341         }
3342         else
3343         {
3344             // criteria has no effect for a new object
3345
if (!isNew())
3346             {
3347                 // the following code is to determine if a new query is
3348
// called for. If the criteria is the same as the last
3349
// one, just return the collection.
3350
criteria.add(ROptionOptionPeer.OPTION1_ID, getOptionId() );
3351                     if (!lastROptionOptionsRelatedByOption1IdCriteria.equals(criteria))
3352                 {
3353                     collROptionOptionsRelatedByOption1Id = ROptionOptionPeer.doSelect(criteria,con);
3354                 }
3355             }
3356         }
3357         lastROptionOptionsRelatedByOption1IdCriteria = criteria;
3358
3359         return collROptionOptionsRelatedByOption1Id;
3360     }
3361
3362                              
3363              
3364                    
3365                              
3366                                            
3367                                                                          
3368                                        
3369                    
3370                                            
3371                  
3372                    
3373                              
3374                                            
3375                                                                          
3376                                        
3377                    
3378                                
3379          
3380    /**
3381     * If this collection has already been initialized with
3382     * an identical criteria, it returns the collection.
3383     * Otherwise if this AttributeOption is new, it will return
3384     * an empty collection; or if this AttributeOption has previously
3385     * been saved, it will retrieve related ROptionOptionsRelatedByOption1Id from storage.
3386     *
3387     * This method is protected by default in order to keep the public
3388     * api reasonable. You can provide public methods for those you
3389     * actually need in AttributeOption.
3390     */

3391    protected List JavaDoc getROptionOptionsRelatedByOption1IdJoinAttributeOptionRelatedByOption2Id(Criteria criteria)
3392        throws TorqueException
3393    {
3394        if (collROptionOptionsRelatedByOption1Id == null)
3395        {
3396            if (isNew())
3397            {
3398               collROptionOptionsRelatedByOption1Id = new ArrayList JavaDoc();
3399            }
3400            else
3401            {
3402                            criteria.add(ROptionOptionPeer.OPTION1_ID, getOptionId() );
3403                            collROptionOptionsRelatedByOption1Id = ROptionOptionPeer.doSelectJoinAttributeOptionRelatedByOption2Id(criteria);
3404            }
3405        }
3406        else
3407        {
3408            // the following code is to determine if a new query is
3409
// called for. If the criteria is the same as the last
3410
// one, just return the collection.
3411

3412                            criteria.add(ROptionOptionPeer.OPTION1_ID, getOptionId() );
3413                        if (!lastROptionOptionsRelatedByOption1IdCriteria.equals(criteria))
3414            {
3415                collROptionOptionsRelatedByOption1Id = ROptionOptionPeer.doSelectJoinAttributeOptionRelatedByOption2Id(criteria);
3416            }
3417        }
3418        lastROptionOptionsRelatedByOption1IdCriteria = criteria;
3419
3420        return collROptionOptionsRelatedByOption1Id;
3421    }
3422                  
3423                    
3424                    
3425                                
3426                                                              
3427                                        
3428                    
3429                                
3430          
3431    /**
3432     * If this collection has already been initialized with
3433     * an identical criteria, it returns the collection.
3434     * Otherwise if this AttributeOption is new, it will return
3435     * an empty collection; or if this AttributeOption has previously
3436     * been saved, it will retrieve related ROptionOptionsRelatedByOption1Id from storage.
3437     *
3438     * This method is protected by default in order to keep the public
3439     * api reasonable. You can provide public methods for those you
3440     * actually need in AttributeOption.
3441     */

3442    protected List JavaDoc getROptionOptionsRelatedByOption1IdJoinOptionRelationship(Criteria criteria)
3443        throws TorqueException
3444    {
3445        if (collROptionOptionsRelatedByOption1Id == null)
3446        {
3447            if (isNew())
3448            {
3449               collROptionOptionsRelatedByOption1Id = new ArrayList JavaDoc();
3450            }
3451            else
3452            {
3453                            criteria.add(ROptionOptionPeer.OPTION1_ID, getOptionId() );
3454                            collROptionOptionsRelatedByOption1Id = ROptionOptionPeer.doSelectJoinOptionRelationship(criteria);
3455            }
3456        }
3457        else
3458        {
3459            // the following code is to determine if a new query is
3460
// called for. If the criteria is the same as the last
3461
// one, just return the collection.
3462

3463                            criteria.add(ROptionOptionPeer.OPTION1_ID, getOptionId() );
3464                        if (!lastROptionOptionsRelatedByOption1IdCriteria.equals(criteria))
3465            {
3466                collROptionOptionsRelatedByOption1Id = ROptionOptionPeer.doSelectJoinOptionRelationship(criteria);
3467            }
3468        }
3469        lastROptionOptionsRelatedByOption1IdCriteria = criteria;
3470
3471        return collROptionOptionsRelatedByOption1Id;
3472    }
3473                            
3474
3475
3476                                  
3477            
3478    /**
3479     * Collection to store aggregation of collROptionOptionsRelatedByOption2Id
3480     */

3481    protected List JavaDoc collROptionOptionsRelatedByOption2Id;
3482
3483    /**
3484     * Temporary storage of collROptionOptionsRelatedByOption2Id to save a possible db hit in
3485     * the event objects are add to the collection, but the
3486     * complete collection is never requested.
3487     */

3488    protected void initROptionOptionsRelatedByOption2Id()
3489    {
3490        if (collROptionOptionsRelatedByOption2Id == null)
3491        {
3492            collROptionOptionsRelatedByOption2Id = new ArrayList JavaDoc();
3493        }
3494    }
3495
3496            
3497    /**
3498     * Method called to associate a ROptionOption object to this object
3499     * through the ROptionOption foreign key attribute
3500     *
3501     * @param l ROptionOption
3502     * @throws TorqueException
3503     */

3504    public void addROptionOptionRelatedByOption2Id(ROptionOption l) throws TorqueException
3505    {
3506        getROptionOptionsRelatedByOption2Id().add(l);
3507        l.setAttributeOptionRelatedByOption2Id((AttributeOption)this);
3508    }
3509
3510    /**
3511     * The criteria used to select the current contents of collROptionOptionsRelatedByOption2Id
3512     */

3513    private Criteria lastROptionOptionsRelatedByOption2IdCriteria = null;
3514
3515    /**
3516     * If this collection has already been initialized, returns
3517     * the collection. Otherwise returns the results of
3518     * getROptionOptionsRelatedByOption2Id(new Criteria())
3519     *
3520     * @throws TorqueException
3521     */

3522    public List JavaDoc getROptionOptionsRelatedByOption2Id() throws TorqueException
3523    {
3524        if (collROptionOptionsRelatedByOption2Id == null)
3525        {
3526            collROptionOptionsRelatedByOption2Id = getROptionOptionsRelatedByOption2Id(new Criteria(10));
3527        }
3528        return collROptionOptionsRelatedByOption2Id;
3529    }
3530
3531    /**
3532     * If this collection has already been initialized with
3533     * an identical criteria, it returns the collection.
3534     * Otherwise if this AttributeOption has previously
3535     * been saved, it will retrieve related ROptionOptionsRelatedByOption2Id from storage.
3536     * If this AttributeOption is new, it will return
3537     * an empty collection or the current collection, the criteria
3538     * is ignored on a new object.
3539     *
3540     * @throws TorqueException
3541     */

3542    public List JavaDoc getROptionOptionsRelatedByOption2Id(Criteria criteria) throws TorqueException
3543    {
3544        if (collROptionOptionsRelatedByOption2Id == null)
3545        {
3546            if (isNew())
3547            {
3548               collROptionOptionsRelatedByOption2Id = new ArrayList JavaDoc();
3549            }
3550            else
3551            {
3552                      criteria.add(ROptionOptionPeer.OPTION2_ID, getOptionId() );
3553                      collROptionOptionsRelatedByOption2Id = ROptionOptionPeer.doSelect(criteria);
3554            }
3555        }
3556        else
3557        {
3558            // criteria has no effect for a new object
3559
if (!isNew())
3560            {
3561                // the following code is to determine if a new query is
3562
// called for. If the criteria is the same as the last
3563
// one, just return the collection.
3564
criteria.add(ROptionOptionPeer.OPTION2_ID, getOptionId() );
3565                      if (!lastROptionOptionsRelatedByOption2IdCriteria.equals(criteria))
3566                {
3567                    collROptionOptionsRelatedByOption2Id = ROptionOptionPeer.doSelect(criteria);
3568                }
3569            }
3570        }
3571        lastROptionOptionsRelatedByOption2IdCriteria = criteria;
3572
3573        return collROptionOptionsRelatedByOption2Id;
3574    }
3575
3576    /**
3577     * If this collection has already been initialized, returns
3578     * the collection. Otherwise returns the results of
3579     * getROptionOptionsRelatedByOption2Id(new Criteria(),Connection)
3580     * This method takes in the Connection also as input so that
3581     * referenced objects can also be obtained using a Connection
3582     * that is taken as input
3583     */

3584    public List JavaDoc getROptionOptionsRelatedByOption2Id(Connection JavaDoc con) throws TorqueException
3585    {
3586        if (collROptionOptionsRelatedByOption2Id == null)
3587        {
3588            collROptionOptionsRelatedByOption2Id = getROptionOptionsRelatedByOption2Id(new Criteria(10),con);
3589        }
3590        return collROptionOptionsRelatedByOption2Id;
3591    }
3592
3593    /**
3594     * If this collection has already been initialized with
3595     * an identical criteria, it returns the collection.
3596     * Otherwise if this AttributeOption has previously
3597     * been saved, it will retrieve related ROptionOptionsRelatedByOption2Id from storage.
3598     * If this AttributeOption is new, it will return
3599     * an empty collection or the current collection, the criteria
3600     * is ignored on a new object.
3601     * This method takes in the Connection also as input so that
3602     * referenced objects can also be obtained using a Connection
3603     * that is taken as input
3604     */

3605    public List JavaDoc getROptionOptionsRelatedByOption2Id(Criteria criteria,Connection JavaDoc con) throws TorqueException
3606    {
3607        if (collROptionOptionsRelatedByOption2Id == null)
3608        {
3609            if (isNew())
3610            {
3611               collROptionOptionsRelatedByOption2Id = new ArrayList JavaDoc();
3612            }
3613            else
3614            {
3615                       criteria.add(ROptionOptionPeer.OPTION2_ID, getOptionId() );
3616                       collROptionOptionsRelatedByOption2Id = ROptionOptionPeer.doSelect(criteria,con);
3617             }
3618         }
3619         else
3620         {
3621             // criteria has no effect for a new object
3622
if (!isNew())
3623             {
3624                 // the following code is to determine if a new query is
3625
// called for. If the criteria is the same as the last
3626
// one, just return the collection.
3627
criteria.add(ROptionOptionPeer.OPTION2_ID, getOptionId() );
3628                     if (!lastROptionOptionsRelatedByOption2IdCriteria.equals(criteria))
3629                 {
3630                     collROptionOptionsRelatedByOption2Id = ROptionOptionPeer.doSelect(criteria,con);
3631                 }
3632             }
3633         }
3634         lastROptionOptionsRelatedByOption2IdCriteria = criteria;
3635
3636         return collROptionOptionsRelatedByOption2Id;
3637     }
3638
3639                              
3640              
3641                    
3642                              
3643                                            
3644                                                                          
3645                                        
3646                    
3647                                
3648          
3649    /**
3650     * If this collection has already been initialized with
3651     * an identical criteria, it returns the collection.
3652     * Otherwise if this AttributeOption is new, it will return
3653     * an empty collection; or if this AttributeOption has previously
3654     * been saved, it will retrieve related ROptionOptionsRelatedByOption2Id from storage.
3655     *
3656     * This method is protected by default in order to keep the public
3657     * api reasonable. You can provide public methods for those you
3658     * actually need in AttributeOption.
3659     */

3660    protected List JavaDoc getROptionOptionsRelatedByOption2IdJoinAttributeOptionRelatedByOption1Id(Criteria criteria)
3661        throws TorqueException
3662    {
3663        if (collROptionOptionsRelatedByOption2Id == null)
3664        {
3665            if (isNew())
3666            {
3667               collROptionOptionsRelatedByOption2Id = new ArrayList JavaDoc();
3668            }
3669            else
3670            {
3671                            criteria.add(ROptionOptionPeer.OPTION2_ID, getOptionId() );
3672                            collROptionOptionsRelatedByOption2Id = ROptionOptionPeer.doSelectJoinAttributeOptionRelatedByOption1Id(criteria);
3673            }
3674        }
3675        else
3676        {
3677            // the following code is to determine if a new query is
3678
// called for. If the criteria is the same as the last
3679
// one, just return the collection.
3680

3681                            criteria.add(ROptionOptionPeer.OPTION2_ID, getOptionId() );
3682                        if (!lastROptionOptionsRelatedByOption2IdCriteria.equals(criteria))
3683            {
3684                collROptionOptionsRelatedByOption2Id = ROptionOptionPeer.doSelectJoinAttributeOptionRelatedByOption1Id(criteria);
3685            }
3686        }
3687        lastROptionOptionsRelatedByOption2IdCriteria = criteria;
3688
3689        return collROptionOptionsRelatedByOption2Id;
3690    }
3691                  
3692                    
3693                              
3694                                            
3695                                                                          
3696                                        
3697                    
3698                                            
3699                  
3700                    
3701                    
3702                                
3703                                                              
3704                                        
3705                    
3706                                
3707          
3708    /**
3709     * If this collection has already been initialized with
3710     * an identical criteria, it returns the collection.
3711     * Otherwise if this AttributeOption is new, it will return
3712     * an empty collection; or if this AttributeOption has previously
3713     * been saved, it will retrieve related ROptionOptionsRelatedByOption2Id from storage.
3714     *
3715     * This method is protected by default in order to keep the public
3716     * api reasonable. You can provide public methods for those you
3717     * actually need in AttributeOption.
3718     */

3719    protected List JavaDoc getROptionOptionsRelatedByOption2IdJoinOptionRelationship(Criteria criteria)
3720        throws TorqueException
3721    {
3722        if (collROptionOptionsRelatedByOption2Id == null)
3723        {
3724            if (isNew())
3725            {
3726               collROptionOptionsRelatedByOption2Id = new ArrayList JavaDoc();
3727            }
3728            else
3729            {
3730                            criteria.add(ROptionOptionPeer.OPTION2_ID, getOptionId() );
3731                            collROptionOptionsRelatedByOption2Id = ROptionOptionPeer.doSelectJoinOptionRelationship(criteria);
3732            }
3733        }
3734        else
3735        {
3736            // the following code is to determine if a new query is
3737
// called for. If the criteria is the same as the last
3738
// one, just return the collection.
3739

3740                            criteria.add(ROptionOptionPeer.OPTION2_ID, getOptionId() );
3741                        if (!lastROptionOptionsRelatedByOption2IdCriteria.equals(criteria))
3742            {
3743                collROptionOptionsRelatedByOption2Id = ROptionOptionPeer.doSelectJoinOptionRelationship(criteria);
3744            }
3745        }
3746        lastROptionOptionsRelatedByOption2IdCriteria = criteria;
3747
3748        return collROptionOptionsRelatedByOption2Id;
3749    }
3750                            
3751
3752
3753                                  
3754            
3755    /**
3756     * Collection to store aggregation of collTransitionsRelatedByFromOptionId
3757     */

3758    protected List JavaDoc collTransitionsRelatedByFromOptionId;
3759
3760    /**
3761     * Temporary storage of collTransitionsRelatedByFromOptionId to save a possible db hit in
3762     * the event objects are add to the collection, but the
3763     * complete collection is never requested.
3764     */

3765    protected void initTransitionsRelatedByFromOptionId()
3766    {
3767        if (collTransitionsRelatedByFromOptionId == null)
3768        {
3769            collTransitionsRelatedByFromOptionId = new ArrayList JavaDoc();
3770        }
3771    }
3772
3773            
3774    /**
3775     * Method called to associate a Transition object to this object
3776     * through the Transition foreign key attribute
3777     *
3778     * @param l Transition
3779     * @throws TorqueException
3780     */

3781    public void addTransitionRelatedByFromOptionId(Transition l) throws TorqueException
3782    {
3783        getTransitionsRelatedByFromOptionId().add(l);
3784        l.setAttributeOptionRelatedByFromOptionId((AttributeOption)this);
3785    }
3786
3787    /**
3788     * The criteria used to select the current contents of collTransitionsRelatedByFromOptionId
3789     */

3790    private Criteria lastTransitionsRelatedByFromOptionIdCriteria = null;
3791
3792    /**
3793     * If this collection has already been initialized, returns
3794     * the collection. Otherwise returns the results of
3795     * getTransitionsRelatedByFromOptionId(new Criteria())
3796     *
3797     * @throws TorqueException
3798     */

3799    public List JavaDoc getTransitionsRelatedByFromOptionId() throws TorqueException
3800    {
3801        if (collTransitionsRelatedByFromOptionId == null)
3802        {
3803            collTransitionsRelatedByFromOptionId = getTransitionsRelatedByFromOptionId(new Criteria(10));
3804        }
3805        return collTransitionsRelatedByFromOptionId;
3806    }
3807
3808    /**
3809     * If this collection has already been initialized with
3810     * an identical criteria, it returns the collection.
3811     * Otherwise if this AttributeOption has previously
3812     * been saved, it will retrieve related TransitionsRelatedByFromOptionId from storage.
3813     * If this AttributeOption is new, it will return
3814     * an empty collection or the current collection, the criteria
3815     * is ignored on a new object.
3816     *
3817     * @throws TorqueException
3818     */

3819    public List JavaDoc getTransitionsRelatedByFromOptionId(Criteria criteria) throws TorqueException
3820    {
3821        if (collTransitionsRelatedByFromOptionId == null)
3822        {
3823            if (isNew())
3824            {
3825               collTransitionsRelatedByFromOptionId = new ArrayList JavaDoc();
3826            }
3827            else
3828            {
3829                      criteria.add(TransitionPeer.FROM_OPTION_ID, getOptionId() );
3830                      collTransitionsRelatedByFromOptionId = TransitionPeer.doSelect(criteria);
3831            }
3832        }
3833        else
3834        {
3835            // criteria has no effect for a new object
3836
if (!isNew())
3837            {
3838                // the following code is to determine if a new query is
3839
// called for. If the criteria is the same as the last
3840
// one, just return the collection.
3841
criteria.add(TransitionPeer.FROM_OPTION_ID, getOptionId() );
3842                      if (!lastTransitionsRelatedByFromOptionIdCriteria.equals(criteria))
3843                {
3844                    collTransitionsRelatedByFromOptionId = TransitionPeer.doSelect(criteria);
3845                }
3846            }
3847        }
3848        lastTransitionsRelatedByFromOptionIdCriteria = criteria;
3849
3850        return collTransitionsRelatedByFromOptionId;
3851    }
3852
3853    /**
3854     * If this collection has already been initialized, returns
3855     * the collection. Otherwise returns the results of
3856     * getTransitionsRelatedByFromOptionId(new Criteria(),Connection)
3857     * This method takes in the Connection also as input so that
3858     * referenced objects can also be obtained using a Connection
3859     * that is taken as input
3860     */

3861    public List JavaDoc getTransitionsRelatedByFromOptionId(Connection JavaDoc con) throws TorqueException
3862    {
3863        if (collTransitionsRelatedByFromOptionId == null)
3864        {
3865            collTransitionsRelatedByFromOptionId = getTransitionsRelatedByFromOptionId(new Criteria(10),con);
3866        }
3867        return collTransitionsRelatedByFromOptionId;
3868    }
3869
3870    /**
3871     * If this collection has already been initialized with
3872     * an identical criteria, it returns the collection.
3873     * Otherwise if this AttributeOption has previously
3874     * been saved, it will retrieve related TransitionsRelatedByFromOptionId from storage.
3875     * If this AttributeOption is new, it will return
3876     * an empty collection or the current collection, the criteria
3877     * is ignored on a new object.
3878     * This method takes in the Connection also as input so that
3879     * referenced objects can also be obtained using a Connection
3880     * that is taken as input
3881     */

3882    public List JavaDoc getTransitionsRelatedByFromOptionId(Criteria criteria,Connection JavaDoc con) throws TorqueException
3883    {
3884        if (collTransitionsRelatedByFromOptionId == null)
3885        {
3886            if (isNew())
3887            {
3888               collTransitionsRelatedByFromOptionId = new ArrayList JavaDoc();
3889            }
3890            else
3891            {
3892                       criteria.add(TransitionPeer.FROM_OPTION_ID, getOptionId() );
3893                       collTransitionsRelatedByFromOptionId = TransitionPeer.doSelect(criteria,con);
3894             }
3895         }
3896         else
3897         {
3898             // criteria has no effect for a new object
3899
if (!isNew())
3900             {
3901                 // the following code is to determine if a new query is
3902
// called for. If the criteria is the same as the last
3903
// one, just return the collection.
3904
criteria.add(TransitionPeer.FROM_OPTION_ID, getOptionId() );
3905                     if (!lastTransitionsRelatedByFromOptionIdCriteria.equals(criteria))
3906                 {
3907                     collTransitionsRelatedByFromOptionId = TransitionPeer.doSelect(criteria,con);
3908                 }
3909             }
3910         }
3911         lastTransitionsRelatedByFromOptionIdCriteria = criteria;
3912
3913         return collTransitionsRelatedByFromOptionId;
3914     }
3915
3916                              
3917              
3918                    
3919                    
3920                                
3921                                                              
3922                                        
3923                    
3924                                
3925          
3926    /**
3927     * If this collection has already been initialized with
3928     * an identical criteria, it returns the collection.
3929     * Otherwise if this AttributeOption is new, it will return
3930     * an empty collection; or if this AttributeOption has previously
3931     * been saved, it will retrieve related TransitionsRelatedByFromOptionId from storage.
3932     *
3933     * This method is protected by default in order to keep the public
3934     * api reasonable. You can provide public methods for those you
3935     * actually need in AttributeOption.
3936     */

3937    protected List JavaDoc getTransitionsRelatedByFromOptionIdJoinAttribute(Criteria criteria)
3938        throws TorqueException
3939    {
3940        if (collTransitionsRelatedByFromOptionId == null)
3941        {
3942            if (isNew())
3943            {
3944               collTransitionsRelatedByFromOptionId = new ArrayList JavaDoc();
3945            }
3946            else
3947            {
3948                            criteria.add(TransitionPeer.FROM_OPTION_ID, getOptionId() );
3949                            collTransitionsRelatedByFromOptionId = TransitionPeer.doSelectJoinAttribute(criteria);
3950            }
3951        }
3952        else
3953        {
3954            // the following code is to determine if a new query is
3955
// called for. If the criteria is the same as the last
3956
// one, just return the collection.
3957

3958                            criteria.add(TransitionPeer.FROM_OPTION_ID, getOptionId() );
3959                        if (!lastTransitionsRelatedByFromOptionIdCriteria.equals(criteria))
3960            {
3961                collTransitionsRelatedByFromOptionId = TransitionPeer.doSelectJoinAttribute(criteria);
3962            }
3963        }
3964        lastTransitionsRelatedByFromOptionIdCriteria = criteria;
3965
3966        return collTransitionsRelatedByFromOptionId;
3967    }
3968                  
3969                    
3970                              
3971                                            
3972                                                                          
3973                                        
3974                    
3975                                            
3976                  
3977                    
3978                              
3979                                            
3980                                                                          
3981                                        
3982                    
3983                                
3984          
3985    /**
3986     * If this collection has already been initialized with
3987     * an identical criteria, it returns the collection.
3988     * Otherwise if this AttributeOption is new, it will return
3989     * an empty collection; or if this AttributeOption has previously
3990     * been saved, it will retrieve related TransitionsRelatedByFromOptionId from storage.
3991     *
3992     * This method is protected by default in order to keep the public
3993     * api reasonable. You can provide public methods for those you
3994     * actually need in AttributeOption.
3995     */

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

4017                            criteria.add(TransitionPeer.FROM_OPTION_ID, getOptionId() );
4018                        if (!lastTransitionsRelatedByFromOptionIdCriteria.equals(criteria))
4019            {
4020                collTransitionsRelatedByFromOptionId = TransitionPeer.doSelectJoinAttributeOptionRelatedByToOptionId(criteria);
4021            }
4022        }
4023        lastTransitionsRelatedByFromOptionIdCriteria = criteria;
4024
4025        return collTransitionsRelatedByFromOptionId;
4026    }
4027                            
4028
4029
4030                                  
4031            
4032    /**
4033     * Collection to store aggregation of collTransitionsRelatedByToOptionId
4034     */

4035    protected List JavaDoc collTransitionsRelatedByToOptionId;
4036
4037    /**
4038     * Temporary storage of collTransitionsRelatedByToOptionId to save a possible db hit in
4039     * the event objects are add to the collection, but the
4040     * complete collection is never requested.
4041     */

4042    protected void initTransitionsRelatedByToOptionId()
4043    {
4044        if (collTransitionsRelatedByToOptionId == null)
4045        {
4046            collTransitionsRelatedByToOptionId = new ArrayList JavaDoc();
4047        }
4048    }
4049
4050            
4051    /**
4052     * Method called to associate a Transition object to this object
4053     * through the Transition foreign key attribute
4054     *
4055     * @param l Transition
4056     * @throws TorqueException
4057     */

4058    public void addTransitionRelatedByToOptionId(Transition l) throws TorqueException
4059    {
4060        getTransitionsRelatedByToOptionId().add(l);
4061        l.setAttributeOptionRelatedByToOptionId((AttributeOption)this);
4062    }
4063
4064    /**
4065     * The criteria used to select the current contents of collTransitionsRelatedByToOptionId
4066     */

4067    private Criteria lastTransitionsRelatedByToOptionIdCriteria = null;
4068
4069    /**
4070     * If this collection has already been initialized, returns
4071     * the collection. Otherwise returns the results of
4072     * getTransitionsRelatedByToOptionId(new Criteria())
4073     *
4074     * @throws TorqueException
4075     */

4076    public List JavaDoc getTransitionsRelatedByToOptionId() throws TorqueException
4077    {
4078        if (collTransitionsRelatedByToOptionId == null)
4079        {
4080            collTransitionsRelatedByToOptionId = getTransitionsRelatedByToOptionId(new Criteria(10));
4081        }
4082        return collTransitionsRelatedByToOptionId;
4083    }
4084
4085    /**
4086     * If this collection has already been initialized with
4087     * an identical criteria, it returns the collection.
4088     * Otherwise if this AttributeOption has previously
4089     * been saved, it will retrieve related TransitionsRelatedByToOptionId from storage.
4090     * If this AttributeOption is new, it will return
4091     * an empty collection or the current collection, the criteria
4092     * is ignored on a new object.
4093     *
4094     * @throws TorqueException
4095     */

4096    public List JavaDoc getTransitionsRelatedByToOptionId(Criteria criteria) throws TorqueException
4097    {
4098        if (collTransitionsRelatedByToOptionId == null)
4099        {
4100            if (isNew())
4101            {
4102               collTransitionsRelatedByToOptionId = new ArrayList JavaDoc();
4103            }
4104            else
4105            {
4106                      criteria.add(TransitionPeer.TO_OPTION_ID, getOptionId() );
4107                      collTransitionsRelatedByToOptionId = TransitionPeer.doSelect(criteria);
4108            }
4109        }
4110        else
4111        {
4112            // criteria has no effect for a new object
4113
if (!isNew())
4114            {
4115                // the following code is to determine if a new query is
4116
// called for. If the criteria is the same as the last
4117
// one, just return the collection.
4118
criteria.add(TransitionPeer.TO_OPTION_ID, getOptionId() );
4119                      if (!lastTransitionsRelatedByToOptionIdCriteria.equals(criteria))
4120                {
4121                    collTransitionsRelatedByToOptionId = TransitionPeer.doSelect(criteria);
4122                }
4123            }
4124        }
4125        lastTransitionsRelatedByToOptionIdCriteria = criteria;
4126
4127        return collTransitionsRelatedByToOptionId;
4128    }
4129
4130    /**
4131     * If this collection has already been initialized, returns
4132     * the collection. Otherwise returns the results of
4133     * getTransitionsRelatedByToOptionId(new Criteria(),Connection)
4134     * This method takes in the Connection also as input so that
4135     * referenced objects can also be obtained using a Connection
4136     * that is taken as input
4137     */

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

4159    public List JavaDoc getTransitionsRelatedByToOptionId(Criteria criteria,Connection JavaDoc con) throws TorqueException
4160    {
4161        if (collTransitionsRelatedByToOptionId == null)
4162        {
4163            if (isNew())
4164            {
4165               collTransitionsRelatedByToOptionId = new ArrayList JavaDoc();
4166            }
4167            else
4168            {
4169                       criteria.add(TransitionPeer.TO_OPTION_ID, getOptionId() );
4170                       collTransitionsRelatedByToOptionId = TransitionPeer.doSelect(criteria,con);
4171             }
4172         }
4173         else
4174         {
4175             // criteria has no effect for a new object
4176
if (!isNew())
4177             {
4178                 // the following code is to determine if a new query is
4179
// called for. If the criteria is the same as the last
4180
// one, just return the collection.
4181
criteria.add(TransitionPeer.TO_OPTION_ID, getOptionId() );
4182                     if (!lastTransitionsRelatedByToOptionIdCriteria.equals(criteria))
4183                 {
4184                     collTransitionsRelatedByToOptionId = TransitionPeer.doSelect(criteria,con);
4185                 }
4186             }
4187         }
4188         lastTransitionsRelatedByToOptionIdCriteria = criteria;
4189
4190         return collTransitionsRelatedByToOptionId;
4191     }
4192
4193                              
4194              
4195                    
4196                    
4197                                
4198                                                              
4199                                        
4200                    
4201                                
4202          
4203    /**
4204     * If this collection has already been initialized with
4205     * an identical criteria, it returns the collection.
4206     * Otherwise if this AttributeOption is new, it will return
4207     * an empty collection; or if this AttributeOption has previously
4208     * been saved, it will retrieve related TransitionsRelatedByToOptionId from storage.
4209     *
4210     * This method is protected by default in order to keep the public
4211     * api reasonable. You can provide public methods for those you
4212     * actually need in AttributeOption.
4213     */

4214    protected List JavaDoc getTransitionsRelatedByToOptionIdJoinAttribute(Criteria criteria)
4215        throws TorqueException
4216    {
4217        if (collTransitionsRelatedByToOptionId == null)
4218        {
4219            if (isNew())
4220            {
4221               collTransitionsRelatedByToOptionId = new ArrayList JavaDoc();
4222            }
4223            else
4224            {
4225                            criteria.add(TransitionPeer.TO_OPTION_ID, getOptionId() );
4226                            collTransitionsRelatedByToOptionId = TransitionPeer.doSelectJoinAttribute(criteria);
4227            }
4228        }
4229        else
4230        {
4231            // the following code is to determine if a new query is
4232
// called for. If the criteria is the same as the last
4233
// one, just return the collection.
4234

4235                            criteria.add(TransitionPeer.TO_OPTION_ID, getOptionId() );
4236                        if (!lastTransitionsRelatedByToOptionIdCriteria.equals(criteria))
4237            {
4238                collTransitionsRelatedByToOptionId = TransitionPeer.doSelectJoinAttribute(criteria);
4239            }
4240        }
4241        lastTransitionsRelatedByToOptionIdCriteria = criteria;
4242
4243        return collTransitionsRelatedByToOptionId;
4244    }
4245                  
4246                    
4247                              
4248                                            
4249                                                                          
4250                                        
4251                    
4252                                
4253          
4254    /**
4255     * If this collection has already been initialized with
4256     * an identical criteria, it returns the collection.
4257     * Otherwise if this AttributeOption is new, it will return
4258     * an empty collection; or if this AttributeOption has previously
4259     * been saved, it will retrieve related TransitionsRelatedByToOptionId from storage.
4260     *
4261     * This method is protected by default in order to keep the public
4262     * api reasonable. You can provide public methods for those you
4263     * actually need in AttributeOption.
4264     */

4265    protected List JavaDoc getTransitionsRelatedByToOptionIdJoinAttributeOptionRelatedByFromOptionId(Criteria criteria)
4266        throws TorqueException
4267    {
4268        if (collTransitionsRelatedByToOptionId == null)
4269        {
4270            if (isNew())
4271            {
4272               collTransitionsRelatedByToOptionId = new ArrayList JavaDoc();
4273            }
4274            else
4275            {
4276                            criteria.add(TransitionPeer.TO_OPTION_ID, getOptionId() );
4277                            collTransitionsRelatedByToOptionId = TransitionPeer.doSelectJoinAttributeOptionRelatedByFromOptionId(criteria);
4278            }
4279        }
4280        else
4281        {
4282            // the following code is to determine if a new query is
4283
// called for. If the criteria is the same as the last
4284
// one, just return the collection.
4285

4286                            criteria.add(TransitionPeer.TO_OPTION_ID, getOptionId() );
4287                        if (!lastTransitionsRelatedByToOptionIdCriteria.equals(criteria))
4288            {
4289                collTransitionsRelatedByToOptionId = TransitionPeer.doSelectJoinAttributeOptionRelatedByFromOptionId(criteria);
4290            }
4291        }
4292        lastTransitionsRelatedByToOptionIdCriteria = criteria;
4293
4294        return collTransitionsRelatedByToOptionId;
4295    }
4296                  
4297                    
4298                              
4299                                            
4300                                                                          
4301                                        
4302                    
4303                                            
4304                            
4305
4306
4307          
4308    private static List JavaDoc fieldNames = null;
4309
4310    /**
4311     * Generate a list of field names.
4312     *
4313     * @return a list of field names
4314     */

4315    public static synchronized List JavaDoc getFieldNames()
4316    {
4317        if (fieldNames == null)
4318        {
4319            fieldNames = new ArrayList JavaDoc();
4320              fieldNames.add("OptionId");
4321              fieldNames.add("AttributeId");
4322              fieldNames.add("Name");
4323              fieldNames.add("Deleted");
4324              fieldNames = Collections.unmodifiableList(fieldNames);
4325        }
4326        return fieldNames;
4327    }
4328
4329    /**
4330     * Retrieves a field from the object by name passed in as a String.
4331     *
4332     * @param name field name
4333     * @return value
4334     */

4335    public Object JavaDoc getByName(String JavaDoc name)
4336    {
4337          if (name.equals("OptionId"))
4338        {
4339                return getOptionId();
4340            }
4341          if (name.equals("AttributeId"))
4342        {
4343                return getAttributeId();
4344            }
4345          if (name.equals("Name"))
4346        {
4347                return getName();
4348            }
4349          if (name.equals("Deleted"))
4350        {
4351                return Boolean.valueOf(getDeleted());
4352            }
4353          return null;
4354    }
4355    
4356    /**
4357     * Retrieves a field from the object by name passed in
4358     * as a String. The String must be one of the static
4359     * Strings defined in this Class' Peer.
4360     *
4361     * @param name peer name
4362     * @return value
4363     */

4364    public Object JavaDoc getByPeerName(String JavaDoc name)
4365    {
4366          if (name.equals(AttributeOptionPeer.OPTION_ID))
4367        {
4368                return getOptionId();
4369            }
4370          if (name.equals(AttributeOptionPeer.ATTRIBUTE_ID))
4371        {
4372                return getAttributeId();
4373            }
4374          if (name.equals(AttributeOptionPeer.OPTION_NAME))
4375        {
4376                return getName();
4377            }
4378          if (name.equals(AttributeOptionPeer.DELETED))
4379        {
4380                return Boolean.valueOf(getDeleted());
4381            }
4382          return null;
4383    }
4384
4385    /**
4386     * Retrieves a field from the object by Position as specified
4387     * in the xml schema. Zero-based.
4388     *
4389     * @param pos position in xml schema
4390     * @return value
4391     */

4392    public Object JavaDoc getByPosition(int pos)
4393    {
4394            if (pos == 0)
4395        {
4396                return getOptionId();
4397            }
4398              if (pos == 1)
4399        {
4400                return getAttributeId();
4401            }
4402              if (pos == 2)
4403        {
4404                return getName();
4405            }
4406              if (pos == 3)
4407        {
4408                return Boolean.valueOf(getDeleted());
4409            }
4410              return null;
4411    }
4412     
4413    /**
4414     * Stores the object in the database. If the object is new,
4415     * it inserts it; otherwise an update is performed.
4416     *
4417     * @throws Exception
4418     */

4419    public void save() throws Exception JavaDoc
4420    {
4421          save(AttributeOptionPeer.getMapBuilder()
4422                .getDatabaseMap().getName());
4423      }
4424
4425    /**
4426     * Stores the object in the database. If the object is new,
4427     * it inserts it; otherwise an update is performed.
4428       * Note: this code is here because the method body is
4429     * auto-generated conditionally and therefore needs to be
4430     * in this file instead of in the super class, BaseObject.
4431       *
4432     * @param dbName
4433     * @throws TorqueException
4434     */

4435    public void save(String JavaDoc dbName) throws TorqueException
4436    {
4437        Connection JavaDoc con = null;
4438          try
4439        {
4440            con = Transaction.begin(dbName);
4441            save(con);
4442            Transaction.commit(con);
4443        }
4444        catch(TorqueException e)
4445        {
4446            Transaction.safeRollback(con);
4447            throw e;
4448        }
4449      }
4450
4451      /** flag to prevent endless save loop, if this object is referenced
4452        by another object which falls in this transaction. */

4453    private boolean alreadyInSave = false;
4454      /**
4455     * Stores the object in the database. If the object is new,
4456     * it inserts it; otherwise an update is performed. This method
4457     * is meant to be used as part of a transaction, otherwise use
4458     * the save() method and the connection details will be handled
4459     * internally
4460     *
4461     * @param con
4462     * @throws TorqueException
4463     */

4464    public void save(Connection JavaDoc con) throws TorqueException
4465    {
4466          if (!alreadyInSave)
4467        {
4468            alreadyInSave = true;
4469
4470
4471  
4472            // If this object has been modified, then save it to the database.
4473
if (isModified())
4474            {
4475                if (isNew())
4476                {
4477                    AttributeOptionPeer.doInsert((AttributeOption)this, con);
4478                    setNew(false);
4479                }
4480                else
4481                {
4482                    AttributeOptionPeer.doUpdate((AttributeOption)this, con);
4483                }
4484
4485                      if (isCacheOnSave())
4486                {
4487                    AttributeOptionManager.putInstance(this);
4488                }
4489              }
4490
4491                                                
4492                            if (collActivitysRelatedByOldOptionId != null)
4493            {
4494                for (int i = 0; i < collActivitysRelatedByOldOptionId.size(); i++)
4495                {
4496                    ((Activity)collActivitysRelatedByOldOptionId.get(i)).save(con);
4497                }
4498            }
4499                                                    
4500                            if (collActivitysRelatedByNewOptionId != null)
4501            {
4502                for (int i = 0; i < collActivitysRelatedByNewOptionId.size(); i++)
4503                {
4504                    ((Activity)collActivitysRelatedByNewOptionId.get(i)).save(con);
4505                }
4506            }
4507                                          
4508                            if (collAttributes != null)
4509            {
4510                for (int i = 0; i < collAttributes.size(); i++)
4511                {
4512                    ((Attribute)collAttributes.get(i)).save(con);
4513                }
4514            }
4515                                          
4516                            if (collConditions != null)
4517            {
4518                for (int i = 0; i < collConditions.size(); i++)
4519                {
4520                    ((Condition)collConditions.get(i)).save(con);
4521                }
4522            }
4523                                          
4524                            if (collAttributeValues != null)
4525            {
4526                for (int i = 0; i < collAttributeValues.size(); i++)
4527                {
4528                    ((AttributeValue)collAttributeValues.get(i)).save(con);
4529                }
4530            }
4531                                          
4532                            if (collRModuleOptions != null)
4533            {
4534                for (int i = 0; i < collRModuleOptions.size(); i++)
4535                {
4536                    ((RModuleOption)collRModuleOptions.get(i)).save(con);
4537                }
4538            }
4539                                          
4540                            if (collRIssueTypeOptions != null)
4541            {
4542                for (int i = 0; i < collRIssueTypeOptions.size(); i++)
4543                {
4544                    ((RIssueTypeOption)collRIssueTypeOptions.get(i)).save(con);
4545                }
4546            }
4547                                                    
4548                            if (collROptionOptionsRelatedByOption1Id != null)
4549            {
4550                for (int i = 0; i < collROptionOptionsRelatedByOption1Id.size(); i++)
4551                {
4552                    ((ROptionOption)collROptionOptionsRelatedByOption1Id.get(i)).save(con);
4553                }
4554            }
4555                                                    
4556                            if (collROptionOptionsRelatedByOption2Id != null)
4557            {
4558                for (int i = 0; i < collROptionOptionsRelatedByOption2Id.size(); i++)
4559                {
4560                    ((ROptionOption)collROptionOptionsRelatedByOption2Id.get(i)).save(con);
4561                }
4562            }
4563                                                    
4564                            if (collTransitionsRelatedByFromOptionId != null)
4565            {
4566                for (int i = 0; i < collTransitionsRelatedByFromOptionId.size(); i++)
4567                {
4568                    ((Transition)collTransitionsRelatedByFromOptionId.get(i)).save(con);
4569                }
4570            }
4571                                                    
4572                            if (collTransitionsRelatedByToOptionId != null)
4573            {
4574                for (int i = 0; i < collTransitionsRelatedByToOptionId.size(); i++)
4575                {
4576                    ((Transition)collTransitionsRelatedByToOptionId.get(i)).save(con);
4577                }
4578            }
4579                          alreadyInSave = false;
4580        }
4581      }
4582
4583    /**
4584     * Specify whether to cache the object after saving to the db.
4585     * This method returns false
4586     */

4587    protected boolean isCacheOnSave()
4588    {
4589        return true;
4590    }
4591
4592                        
4593      /**
4594     * Set the PrimaryKey using ObjectKey.
4595     *
4596     * @param optionId ObjectKey
4597     */

4598    public void setPrimaryKey(ObjectKey optionId)
4599        throws TorqueException {
4600            setOptionId(new Integer JavaDoc(((NumberKey)optionId).intValue()));
4601        }
4602
4603    /**
4604     * Set the PrimaryKey using a String.
4605     *
4606     * @param key
4607     */

4608    public void setPrimaryKey(String JavaDoc key) throws TorqueException
4609    {
4610            setOptionId(new Integer JavaDoc(key));
4611        }
4612
4613  
4614    /**
4615     * returns an id that differentiates this object from others
4616     * of its class.
4617     */

4618    public ObjectKey getPrimaryKey()
4619    {
4620          return SimpleKey.keyFor(getOptionId());
4621      }
4622 
4623    /**
4624     * get an id that differentiates this object from others
4625     * of its class.
4626     */

4627    public String JavaDoc getQueryKey()
4628    {
4629        if (getPrimaryKey() == null)
4630        {
4631            return "";
4632        }
4633        else
4634        {
4635            return getPrimaryKey().toString();
4636        }
4637    }
4638
4639    /**
4640     * set an id that differentiates this object from others
4641     * of its class.
4642     */

4643    public void setQueryKey(String JavaDoc key)
4644        throws TorqueException
4645    {
4646        setPrimaryKey(key);
4647    }
4648
4649    /**
4650     * Makes a copy of this object.
4651     * It creates a new object filling in the simple attributes.
4652       * It then fills all the association collections and sets the
4653     * related objects to isNew=true.
4654       */

4655      public AttributeOption copy() throws TorqueException
4656    {
4657        AttributeOption copyObj = new AttributeOption();
4658            copyObj.setOptionId(optionId);
4659          copyObj.setAttributeId(attributeId);
4660          copyObj.setName(name);
4661          copyObj.setDeleted(deleted);
4662  
4663                      copyObj.setOptionId((Integer JavaDoc)null);
4664                              
4665                                                
4666                
4667        List JavaDoc v = getActivitysRelatedByOldOptionId();
4668        for (int i = 0; i < v.size(); i++)
4669        {
4670            Activity obj = (Activity) v.get(i);
4671            copyObj.addActivityRelatedByOldOptionId(obj.copy());
4672        }
4673                                                            
4674                
4675        v = getActivitysRelatedByNewOptionId();
4676        for (int i = 0; i < v.size(); i++)
4677        {
4678            Activity obj = (Activity) v.get(i);
4679            copyObj.addActivityRelatedByNewOptionId(obj.copy());
4680        }
4681                                                  
4682                
4683        v = getAttributes();
4684        for (int i = 0; i < v.size(); i++)
4685        {
4686            Attribute obj = (Attribute) v.get(i);
4687            copyObj.addAttribute(obj.copy());
4688        }
4689                                                  
4690                
4691        v = getConditions();
4692        for (int i = 0; i < v.size(); i++)
4693        {
4694            Condition obj = (Condition) v.get(i);
4695            copyObj.addCondition(obj.copy());
4696        }
4697                                                  
4698                
4699        v = getAttributeValues();
4700        for (int i = 0; i < v.size(); i++)
4701        {
4702            AttributeValue obj = (AttributeValue) v.get(i);
4703            copyObj.addAttributeValue(obj.copy());
4704        }
4705                                                  
4706                
4707        v = getRModuleOptions();
4708        for (int i = 0; i < v.size(); i++)
4709        {
4710            RModuleOption obj = (RModuleOption) v.get(i);
4711            copyObj.addRModuleOption(obj.copy());
4712        }
4713                                                  
4714                
4715        v = getRIssueTypeOptions();
4716        for (int i = 0; i < v.size(); i++)
4717        {
4718            RIssueTypeOption obj = (RIssueTypeOption) v.get(i);
4719            copyObj.addRIssueTypeOption(obj.copy());
4720        }
4721                                                            
4722                
4723        v = getROptionOptionsRelatedByOption1Id();
4724        for (int i = 0; i < v.size(); i++)
4725        {
4726            ROptionOption obj = (ROptionOption) v.get(i);
4727            copyObj.addROptionOptionRelatedByOption1Id(obj.copy());
4728        }
4729                                                            
4730                
4731        v = getROptionOptionsRelatedByOption2Id();
4732        for (int i = 0; i < v.size(); i++)
4733        {
4734            ROptionOption obj = (ROptionOption) v.get(i);
4735            copyObj.addROptionOptionRelatedByOption2Id(obj.copy());
4736        }
4737                                                            
4738                
4739        v = getTransitionsRelatedByFromOptionId();
4740        for (int i = 0; i < v.size(); i++)
4741        {
4742            Transition obj = (Transition) v.get(i);
4743            copyObj.addTransitionRelatedByFromOptionId(obj.copy());
4744        }
4745                                                            
4746                
4747        v = getTransitionsRelatedByToOptionId();
4748        for (int i = 0; i < v.size(); i++)
4749        {
4750            Transition obj = (Transition) v.get(i);
4751            copyObj.addTransitionRelatedByToOptionId(obj.copy());
4752        }
4753                            return copyObj;
4754    }
4755
4756    /**
4757     * returns a peer instance associated with this om. Since Peer classes
4758     * are not to have any instance attributes, this method returns the
4759     * same instance for all member of this class. The method could therefore
4760     * be static, but this would prevent one from overriding the behavior.
4761     */

4762    public AttributeOptionPeer getPeer()
4763    {
4764        return peer;
4765    }
4766
4767    public String JavaDoc toString()
4768    {
4769        StringBuffer JavaDoc str = new StringBuffer JavaDoc();
4770        str.append("AttributeOption:\n");
4771        str.append("OptionId = ")
4772               .append(getOptionId())
4773             .append("\n");
4774        str.append("AttributeId = ")
4775               .append(getAttributeId())
4776             .append("\n");
4777        str.append("Name = ")
4778               .append(getName())
4779             .append("\n");
4780        str.append("Deleted = ")
4781               .append(getDeleted())
4782             .append("\n");
4783        return(str.toString());
4784    }
4785}
4786
Popular Tags