Source Code Cross Referenced for BaseScarabUserImpl.java in  » Issue-Tracking » scarab-0.21 » org » tigris » scarab » om » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Issue Tracking » scarab 0.21 » org.tigris.scarab.om 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


0001:        package org.tigris.scarab.om;
0002:
0003:        import java.math.BigDecimal;
0004:        import java.sql.Connection;
0005:        import java.util.ArrayList;
0006:        import java.util.Collections;
0007:        import java.util.Date;
0008:        import java.util.List;
0009:
0010:        import org.apache.commons.lang.ObjectUtils;
0011:        import org.apache.fulcrum.intake.Retrievable;
0012:        import org.apache.torque.TorqueException;
0013:        import org.apache.torque.om.BaseObject;
0014:        import org.apache.torque.om.ComboKey;
0015:        import org.apache.torque.om.DateKey;
0016:        import org.apache.torque.om.NumberKey;
0017:        import org.apache.torque.om.ObjectKey;
0018:        import org.apache.torque.om.SimpleKey;
0019:        import org.apache.torque.om.StringKey;
0020:        import org.apache.torque.om.Persistent;
0021:        import org.apache.torque.util.Criteria;
0022:        import org.apache.torque.util.Transaction;
0023:
0024:        /**
0025:         * You should not use this class directly.  It should not even be
0026:         * extended all references should be to ScarabUserImpl
0027:         */
0028:        public abstract class BaseScarabUserImpl extends
0029:                org.apache.fulcrum.security.impl.db.entity.TurbineUser
0030:                implements  org.apache.fulcrum.intake.Retrievable {
0031:            /** The Peer class */
0032:            private static final ScarabUserImplPeer peer = new ScarabUserImplPeer();
0033:
0034:            /**
0035:             * Collection to store aggregation of collActivitysRelatedByOldUserId
0036:             */
0037:            protected List collActivitysRelatedByOldUserId;
0038:
0039:            /**
0040:             * Temporary storage of collActivitysRelatedByOldUserId to save a possible db hit in
0041:             * the event objects are add to the collection, but the
0042:             * complete collection is never requested.
0043:             */
0044:            protected void initActivitysRelatedByOldUserId() {
0045:                if (collActivitysRelatedByOldUserId == null) {
0046:                    collActivitysRelatedByOldUserId = new ArrayList();
0047:                }
0048:            }
0049:
0050:            /**
0051:             * Method called to associate a Activity object to this object
0052:             * through the Activity foreign key attribute
0053:             *
0054:             * @param l Activity
0055:             * @throws TorqueException
0056:             */
0057:            public void addActivityRelatedByOldUserId(Activity l)
0058:                    throws TorqueException {
0059:                getActivitysRelatedByOldUserId().add(l);
0060:                l.setScarabUserRelatedByOldUserId((ScarabUserImpl) this );
0061:            }
0062:
0063:            /**
0064:             * The criteria used to select the current contents of collActivitysRelatedByOldUserId
0065:             */
0066:            private Criteria lastActivitysRelatedByOldUserIdCriteria = null;
0067:
0068:            /**
0069:             * If this collection has already been initialized, returns
0070:             * the collection. Otherwise returns the results of
0071:             * getActivitysRelatedByOldUserId(new Criteria())
0072:             *
0073:             * @return the collection of associated objects
0074:             * @throws TorqueException
0075:             */
0076:            public List getActivitysRelatedByOldUserId() throws TorqueException {
0077:                if (collActivitysRelatedByOldUserId == null) {
0078:                    collActivitysRelatedByOldUserId = getActivitysRelatedByOldUserId(new Criteria(
0079:                            10));
0080:                }
0081:                return collActivitysRelatedByOldUserId;
0082:            }
0083:
0084:            /**
0085:             * If this collection has already been initialized with
0086:             * an identical criteria, it returns the collection.
0087:             * Otherwise if this ScarabUserImpl has previously
0088:             * been saved, it will retrieve related ActivitysRelatedByOldUserId from storage.
0089:             * If this ScarabUserImpl is new, it will return
0090:             * an empty collection or the current collection, the criteria
0091:             * is ignored on a new object.
0092:             *
0093:             * @throws TorqueException
0094:             */
0095:            public List getActivitysRelatedByOldUserId(Criteria criteria)
0096:                    throws TorqueException {
0097:                if (collActivitysRelatedByOldUserId == null) {
0098:                    if (isNew()) {
0099:                        collActivitysRelatedByOldUserId = new ArrayList();
0100:                    } else {
0101:                        criteria.add(ActivityPeer.OLD_USER_ID, getUserId());
0102:                        collActivitysRelatedByOldUserId = ActivityPeer
0103:                                .doSelect(criteria);
0104:                    }
0105:                } else {
0106:                    // criteria has no effect for a new object
0107:                    if (!isNew()) {
0108:                        // the following code is to determine if a new query is
0109:                        // called for.  If the criteria is the same as the last
0110:                        // one, just return the collection.
0111:                        criteria.add(ActivityPeer.OLD_USER_ID, getUserId());
0112:                        if (!lastActivitysRelatedByOldUserIdCriteria
0113:                                .equals(criteria)) {
0114:                            collActivitysRelatedByOldUserId = ActivityPeer
0115:                                    .doSelect(criteria);
0116:                        }
0117:                    }
0118:                }
0119:                lastActivitysRelatedByOldUserIdCriteria = criteria;
0120:
0121:                return collActivitysRelatedByOldUserId;
0122:            }
0123:
0124:            /**
0125:             * If this collection has already been initialized, returns
0126:             * the collection. Otherwise returns the results of
0127:             * getActivitysRelatedByOldUserId(new Criteria(),Connection)
0128:             * This method takes in the Connection also as input so that
0129:             * referenced objects can also be obtained using a Connection
0130:             * that is taken as input
0131:             */
0132:            public List getActivitysRelatedByOldUserId(Connection con)
0133:                    throws TorqueException {
0134:                if (collActivitysRelatedByOldUserId == null) {
0135:                    collActivitysRelatedByOldUserId = getActivitysRelatedByOldUserId(
0136:                            new Criteria(10), con);
0137:                }
0138:                return collActivitysRelatedByOldUserId;
0139:            }
0140:
0141:            /**
0142:             * If this collection has already been initialized with
0143:             * an identical criteria, it returns the collection.
0144:             * Otherwise if this ScarabUserImpl has previously
0145:             * been saved, it will retrieve related ActivitysRelatedByOldUserId from storage.
0146:             * If this ScarabUserImpl is new, it will return
0147:             * an empty collection or the current collection, the criteria
0148:             * is ignored on a new object.
0149:             * This method takes in the Connection also as input so that
0150:             * referenced objects can also be obtained using a Connection
0151:             * that is taken as input
0152:             */
0153:            public List getActivitysRelatedByOldUserId(Criteria criteria,
0154:                    Connection con) throws TorqueException {
0155:                if (collActivitysRelatedByOldUserId == null) {
0156:                    if (isNew()) {
0157:                        collActivitysRelatedByOldUserId = new ArrayList();
0158:                    } else {
0159:                        criteria.add(ActivityPeer.OLD_USER_ID, getUserId());
0160:                        collActivitysRelatedByOldUserId = ActivityPeer
0161:                                .doSelect(criteria, con);
0162:                    }
0163:                } else {
0164:                    // criteria has no effect for a new object
0165:                    if (!isNew()) {
0166:                        // the following code is to determine if a new query is
0167:                        // called for.  If the criteria is the same as the last
0168:                        // one, just return the collection.
0169:                        criteria.add(ActivityPeer.OLD_USER_ID, getUserId());
0170:                        if (!lastActivitysRelatedByOldUserIdCriteria
0171:                                .equals(criteria)) {
0172:                            collActivitysRelatedByOldUserId = ActivityPeer
0173:                                    .doSelect(criteria, con);
0174:                        }
0175:                    }
0176:                }
0177:                lastActivitysRelatedByOldUserIdCriteria = criteria;
0178:
0179:                return collActivitysRelatedByOldUserId;
0180:            }
0181:
0182:            /**
0183:             * If this collection has already been initialized with
0184:             * an identical criteria, it returns the collection.
0185:             * Otherwise if this ScarabUserImpl is new, it will return
0186:             * an empty collection; or if this ScarabUserImpl has previously
0187:             * been saved, it will retrieve related ActivitysRelatedByOldUserId from storage.
0188:             *
0189:             * This method is protected by default in order to keep the public
0190:             * api reasonable.  You can provide public methods for those you
0191:             * actually need in ScarabUserImpl.
0192:             */
0193:            protected List getActivitysRelatedByOldUserIdJoinIssue(
0194:                    Criteria criteria) throws TorqueException {
0195:                if (collActivitysRelatedByOldUserId == null) {
0196:                    if (isNew()) {
0197:                        collActivitysRelatedByOldUserId = new ArrayList();
0198:                    } else {
0199:                        criteria.add(ActivityPeer.OLD_USER_ID, getUserId());
0200:                        collActivitysRelatedByOldUserId = ActivityPeer
0201:                                .doSelectJoinIssue(criteria);
0202:                    }
0203:                } else {
0204:                    // the following code is to determine if a new query is
0205:                    // called for.  If the criteria is the same as the last
0206:                    // one, just return the collection.
0207:                    criteria.add(ActivityPeer.OLD_USER_ID, getUserId());
0208:                    if (!lastActivitysRelatedByOldUserIdCriteria
0209:                            .equals(criteria)) {
0210:                        collActivitysRelatedByOldUserId = ActivityPeer
0211:                                .doSelectJoinIssue(criteria);
0212:                    }
0213:                }
0214:                lastActivitysRelatedByOldUserIdCriteria = criteria;
0215:
0216:                return collActivitysRelatedByOldUserId;
0217:            }
0218:
0219:            /**
0220:             * If this collection has already been initialized with
0221:             * an identical criteria, it returns the collection.
0222:             * Otherwise if this ScarabUserImpl is new, it will return
0223:             * an empty collection; or if this ScarabUserImpl has previously
0224:             * been saved, it will retrieve related ActivitysRelatedByOldUserId from storage.
0225:             *
0226:             * This method is protected by default in order to keep the public
0227:             * api reasonable.  You can provide public methods for those you
0228:             * actually need in ScarabUserImpl.
0229:             */
0230:            protected List getActivitysRelatedByOldUserIdJoinAttribute(
0231:                    Criteria criteria) throws TorqueException {
0232:                if (collActivitysRelatedByOldUserId == null) {
0233:                    if (isNew()) {
0234:                        collActivitysRelatedByOldUserId = new ArrayList();
0235:                    } else {
0236:                        criteria.add(ActivityPeer.OLD_USER_ID, getUserId());
0237:                        collActivitysRelatedByOldUserId = ActivityPeer
0238:                                .doSelectJoinAttribute(criteria);
0239:                    }
0240:                } else {
0241:                    // the following code is to determine if a new query is
0242:                    // called for.  If the criteria is the same as the last
0243:                    // one, just return the collection.
0244:                    criteria.add(ActivityPeer.OLD_USER_ID, getUserId());
0245:                    if (!lastActivitysRelatedByOldUserIdCriteria
0246:                            .equals(criteria)) {
0247:                        collActivitysRelatedByOldUserId = ActivityPeer
0248:                                .doSelectJoinAttribute(criteria);
0249:                    }
0250:                }
0251:                lastActivitysRelatedByOldUserIdCriteria = criteria;
0252:
0253:                return collActivitysRelatedByOldUserId;
0254:            }
0255:
0256:            /**
0257:             * If this collection has already been initialized with
0258:             * an identical criteria, it returns the collection.
0259:             * Otherwise if this ScarabUserImpl is new, it will return
0260:             * an empty collection; or if this ScarabUserImpl has previously
0261:             * been saved, it will retrieve related ActivitysRelatedByOldUserId from storage.
0262:             *
0263:             * This method is protected by default in order to keep the public
0264:             * api reasonable.  You can provide public methods for those you
0265:             * actually need in ScarabUserImpl.
0266:             */
0267:            protected List getActivitysRelatedByOldUserIdJoinActivitySet(
0268:                    Criteria criteria) throws TorqueException {
0269:                if (collActivitysRelatedByOldUserId == null) {
0270:                    if (isNew()) {
0271:                        collActivitysRelatedByOldUserId = new ArrayList();
0272:                    } else {
0273:                        criteria.add(ActivityPeer.OLD_USER_ID, getUserId());
0274:                        collActivitysRelatedByOldUserId = ActivityPeer
0275:                                .doSelectJoinActivitySet(criteria);
0276:                    }
0277:                } else {
0278:                    // the following code is to determine if a new query is
0279:                    // called for.  If the criteria is the same as the last
0280:                    // one, just return the collection.
0281:                    criteria.add(ActivityPeer.OLD_USER_ID, getUserId());
0282:                    if (!lastActivitysRelatedByOldUserIdCriteria
0283:                            .equals(criteria)) {
0284:                        collActivitysRelatedByOldUserId = ActivityPeer
0285:                                .doSelectJoinActivitySet(criteria);
0286:                    }
0287:                }
0288:                lastActivitysRelatedByOldUserIdCriteria = criteria;
0289:
0290:                return collActivitysRelatedByOldUserId;
0291:            }
0292:
0293:            /**
0294:             * If this collection has already been initialized with
0295:             * an identical criteria, it returns the collection.
0296:             * Otherwise if this ScarabUserImpl is new, it will return
0297:             * an empty collection; or if this ScarabUserImpl has previously
0298:             * been saved, it will retrieve related ActivitysRelatedByOldUserId from storage.
0299:             *
0300:             * This method is protected by default in order to keep the public
0301:             * api reasonable.  You can provide public methods for those you
0302:             * actually need in ScarabUserImpl.
0303:             */
0304:            protected List getActivitysRelatedByOldUserIdJoinScarabUserImplRelatedByNewUserId(
0305:                    Criteria criteria) throws TorqueException {
0306:                if (collActivitysRelatedByOldUserId == null) {
0307:                    if (isNew()) {
0308:                        collActivitysRelatedByOldUserId = new ArrayList();
0309:                    } else {
0310:                        criteria.add(ActivityPeer.OLD_USER_ID, getUserId());
0311:                        collActivitysRelatedByOldUserId = ActivityPeer
0312:                                .doSelectJoinScarabUserImplRelatedByNewUserId(criteria);
0313:                    }
0314:                } else {
0315:                    // the following code is to determine if a new query is
0316:                    // called for.  If the criteria is the same as the last
0317:                    // one, just return the collection.
0318:                    criteria.add(ActivityPeer.OLD_USER_ID, getUserId());
0319:                    if (!lastActivitysRelatedByOldUserIdCriteria
0320:                            .equals(criteria)) {
0321:                        collActivitysRelatedByOldUserId = ActivityPeer
0322:                                .doSelectJoinScarabUserImplRelatedByNewUserId(criteria);
0323:                    }
0324:                }
0325:                lastActivitysRelatedByOldUserIdCriteria = criteria;
0326:
0327:                return collActivitysRelatedByOldUserId;
0328:            }
0329:
0330:            /**
0331:             * If this collection has already been initialized with
0332:             * an identical criteria, it returns the collection.
0333:             * Otherwise if this ScarabUserImpl is new, it will return
0334:             * an empty collection; or if this ScarabUserImpl has previously
0335:             * been saved, it will retrieve related ActivitysRelatedByOldUserId from storage.
0336:             *
0337:             * This method is protected by default in order to keep the public
0338:             * api reasonable.  You can provide public methods for those you
0339:             * actually need in ScarabUserImpl.
0340:             */
0341:            protected List getActivitysRelatedByOldUserIdJoinAttributeOptionRelatedByOldOptionId(
0342:                    Criteria criteria) throws TorqueException {
0343:                if (collActivitysRelatedByOldUserId == null) {
0344:                    if (isNew()) {
0345:                        collActivitysRelatedByOldUserId = new ArrayList();
0346:                    } else {
0347:                        criteria.add(ActivityPeer.OLD_USER_ID, getUserId());
0348:                        collActivitysRelatedByOldUserId = ActivityPeer
0349:                                .doSelectJoinAttributeOptionRelatedByOldOptionId(criteria);
0350:                    }
0351:                } else {
0352:                    // the following code is to determine if a new query is
0353:                    // called for.  If the criteria is the same as the last
0354:                    // one, just return the collection.
0355:                    criteria.add(ActivityPeer.OLD_USER_ID, getUserId());
0356:                    if (!lastActivitysRelatedByOldUserIdCriteria
0357:                            .equals(criteria)) {
0358:                        collActivitysRelatedByOldUserId = ActivityPeer
0359:                                .doSelectJoinAttributeOptionRelatedByOldOptionId(criteria);
0360:                    }
0361:                }
0362:                lastActivitysRelatedByOldUserIdCriteria = criteria;
0363:
0364:                return collActivitysRelatedByOldUserId;
0365:            }
0366:
0367:            /**
0368:             * If this collection has already been initialized with
0369:             * an identical criteria, it returns the collection.
0370:             * Otherwise if this ScarabUserImpl is new, it will return
0371:             * an empty collection; or if this ScarabUserImpl has previously
0372:             * been saved, it will retrieve related ActivitysRelatedByOldUserId from storage.
0373:             *
0374:             * This method is protected by default in order to keep the public
0375:             * api reasonable.  You can provide public methods for those you
0376:             * actually need in ScarabUserImpl.
0377:             */
0378:            protected List getActivitysRelatedByOldUserIdJoinAttributeOptionRelatedByNewOptionId(
0379:                    Criteria criteria) throws TorqueException {
0380:                if (collActivitysRelatedByOldUserId == null) {
0381:                    if (isNew()) {
0382:                        collActivitysRelatedByOldUserId = new ArrayList();
0383:                    } else {
0384:                        criteria.add(ActivityPeer.OLD_USER_ID, getUserId());
0385:                        collActivitysRelatedByOldUserId = ActivityPeer
0386:                                .doSelectJoinAttributeOptionRelatedByNewOptionId(criteria);
0387:                    }
0388:                } else {
0389:                    // the following code is to determine if a new query is
0390:                    // called for.  If the criteria is the same as the last
0391:                    // one, just return the collection.
0392:                    criteria.add(ActivityPeer.OLD_USER_ID, getUserId());
0393:                    if (!lastActivitysRelatedByOldUserIdCriteria
0394:                            .equals(criteria)) {
0395:                        collActivitysRelatedByOldUserId = ActivityPeer
0396:                                .doSelectJoinAttributeOptionRelatedByNewOptionId(criteria);
0397:                    }
0398:                }
0399:                lastActivitysRelatedByOldUserIdCriteria = criteria;
0400:
0401:                return collActivitysRelatedByOldUserId;
0402:            }
0403:
0404:            /**
0405:             * If this collection has already been initialized with
0406:             * an identical criteria, it returns the collection.
0407:             * Otherwise if this ScarabUserImpl is new, it will return
0408:             * an empty collection; or if this ScarabUserImpl has previously
0409:             * been saved, it will retrieve related ActivitysRelatedByOldUserId from storage.
0410:             *
0411:             * This method is protected by default in order to keep the public
0412:             * api reasonable.  You can provide public methods for those you
0413:             * actually need in ScarabUserImpl.
0414:             */
0415:            protected List getActivitysRelatedByOldUserIdJoinAttachment(
0416:                    Criteria criteria) throws TorqueException {
0417:                if (collActivitysRelatedByOldUserId == null) {
0418:                    if (isNew()) {
0419:                        collActivitysRelatedByOldUserId = new ArrayList();
0420:                    } else {
0421:                        criteria.add(ActivityPeer.OLD_USER_ID, getUserId());
0422:                        collActivitysRelatedByOldUserId = ActivityPeer
0423:                                .doSelectJoinAttachment(criteria);
0424:                    }
0425:                } else {
0426:                    // the following code is to determine if a new query is
0427:                    // called for.  If the criteria is the same as the last
0428:                    // one, just return the collection.
0429:                    criteria.add(ActivityPeer.OLD_USER_ID, getUserId());
0430:                    if (!lastActivitysRelatedByOldUserIdCriteria
0431:                            .equals(criteria)) {
0432:                        collActivitysRelatedByOldUserId = ActivityPeer
0433:                                .doSelectJoinAttachment(criteria);
0434:                    }
0435:                }
0436:                lastActivitysRelatedByOldUserIdCriteria = criteria;
0437:
0438:                return collActivitysRelatedByOldUserId;
0439:            }
0440:
0441:            /**
0442:             * If this collection has already been initialized with
0443:             * an identical criteria, it returns the collection.
0444:             * Otherwise if this ScarabUserImpl is new, it will return
0445:             * an empty collection; or if this ScarabUserImpl has previously
0446:             * been saved, it will retrieve related ActivitysRelatedByOldUserId from storage.
0447:             *
0448:             * This method is protected by default in order to keep the public
0449:             * api reasonable.  You can provide public methods for those you
0450:             * actually need in ScarabUserImpl.
0451:             */
0452:            protected List getActivitysRelatedByOldUserIdJoinDepend(
0453:                    Criteria criteria) throws TorqueException {
0454:                if (collActivitysRelatedByOldUserId == null) {
0455:                    if (isNew()) {
0456:                        collActivitysRelatedByOldUserId = new ArrayList();
0457:                    } else {
0458:                        criteria.add(ActivityPeer.OLD_USER_ID, getUserId());
0459:                        collActivitysRelatedByOldUserId = ActivityPeer
0460:                                .doSelectJoinDepend(criteria);
0461:                    }
0462:                } else {
0463:                    // the following code is to determine if a new query is
0464:                    // called for.  If the criteria is the same as the last
0465:                    // one, just return the collection.
0466:                    criteria.add(ActivityPeer.OLD_USER_ID, getUserId());
0467:                    if (!lastActivitysRelatedByOldUserIdCriteria
0468:                            .equals(criteria)) {
0469:                        collActivitysRelatedByOldUserId = ActivityPeer
0470:                                .doSelectJoinDepend(criteria);
0471:                    }
0472:                }
0473:                lastActivitysRelatedByOldUserIdCriteria = criteria;
0474:
0475:                return collActivitysRelatedByOldUserId;
0476:            }
0477:
0478:            /**
0479:             * Collection to store aggregation of collActivitysRelatedByNewUserId
0480:             */
0481:            protected List collActivitysRelatedByNewUserId;
0482:
0483:            /**
0484:             * Temporary storage of collActivitysRelatedByNewUserId to save a possible db hit in
0485:             * the event objects are add to the collection, but the
0486:             * complete collection is never requested.
0487:             */
0488:            protected void initActivitysRelatedByNewUserId() {
0489:                if (collActivitysRelatedByNewUserId == null) {
0490:                    collActivitysRelatedByNewUserId = new ArrayList();
0491:                }
0492:            }
0493:
0494:            /**
0495:             * Method called to associate a Activity object to this object
0496:             * through the Activity foreign key attribute
0497:             *
0498:             * @param l Activity
0499:             * @throws TorqueException
0500:             */
0501:            public void addActivityRelatedByNewUserId(Activity l)
0502:                    throws TorqueException {
0503:                getActivitysRelatedByNewUserId().add(l);
0504:                l.setScarabUserRelatedByNewUserId((ScarabUserImpl) this );
0505:            }
0506:
0507:            /**
0508:             * The criteria used to select the current contents of collActivitysRelatedByNewUserId
0509:             */
0510:            private Criteria lastActivitysRelatedByNewUserIdCriteria = null;
0511:
0512:            /**
0513:             * If this collection has already been initialized, returns
0514:             * the collection. Otherwise returns the results of
0515:             * getActivitysRelatedByNewUserId(new Criteria())
0516:             *
0517:             * @return the collection of associated objects
0518:             * @throws TorqueException
0519:             */
0520:            public List getActivitysRelatedByNewUserId() throws TorqueException {
0521:                if (collActivitysRelatedByNewUserId == null) {
0522:                    collActivitysRelatedByNewUserId = getActivitysRelatedByNewUserId(new Criteria(
0523:                            10));
0524:                }
0525:                return collActivitysRelatedByNewUserId;
0526:            }
0527:
0528:            /**
0529:             * If this collection has already been initialized with
0530:             * an identical criteria, it returns the collection.
0531:             * Otherwise if this ScarabUserImpl has previously
0532:             * been saved, it will retrieve related ActivitysRelatedByNewUserId from storage.
0533:             * If this ScarabUserImpl is new, it will return
0534:             * an empty collection or the current collection, the criteria
0535:             * is ignored on a new object.
0536:             *
0537:             * @throws TorqueException
0538:             */
0539:            public List getActivitysRelatedByNewUserId(Criteria criteria)
0540:                    throws TorqueException {
0541:                if (collActivitysRelatedByNewUserId == null) {
0542:                    if (isNew()) {
0543:                        collActivitysRelatedByNewUserId = new ArrayList();
0544:                    } else {
0545:                        criteria.add(ActivityPeer.NEW_USER_ID, getUserId());
0546:                        collActivitysRelatedByNewUserId = ActivityPeer
0547:                                .doSelect(criteria);
0548:                    }
0549:                } else {
0550:                    // criteria has no effect for a new object
0551:                    if (!isNew()) {
0552:                        // the following code is to determine if a new query is
0553:                        // called for.  If the criteria is the same as the last
0554:                        // one, just return the collection.
0555:                        criteria.add(ActivityPeer.NEW_USER_ID, getUserId());
0556:                        if (!lastActivitysRelatedByNewUserIdCriteria
0557:                                .equals(criteria)) {
0558:                            collActivitysRelatedByNewUserId = ActivityPeer
0559:                                    .doSelect(criteria);
0560:                        }
0561:                    }
0562:                }
0563:                lastActivitysRelatedByNewUserIdCriteria = criteria;
0564:
0565:                return collActivitysRelatedByNewUserId;
0566:            }
0567:
0568:            /**
0569:             * If this collection has already been initialized, returns
0570:             * the collection. Otherwise returns the results of
0571:             * getActivitysRelatedByNewUserId(new Criteria(),Connection)
0572:             * This method takes in the Connection also as input so that
0573:             * referenced objects can also be obtained using a Connection
0574:             * that is taken as input
0575:             */
0576:            public List getActivitysRelatedByNewUserId(Connection con)
0577:                    throws TorqueException {
0578:                if (collActivitysRelatedByNewUserId == null) {
0579:                    collActivitysRelatedByNewUserId = getActivitysRelatedByNewUserId(
0580:                            new Criteria(10), con);
0581:                }
0582:                return collActivitysRelatedByNewUserId;
0583:            }
0584:
0585:            /**
0586:             * If this collection has already been initialized with
0587:             * an identical criteria, it returns the collection.
0588:             * Otherwise if this ScarabUserImpl has previously
0589:             * been saved, it will retrieve related ActivitysRelatedByNewUserId from storage.
0590:             * If this ScarabUserImpl is new, it will return
0591:             * an empty collection or the current collection, the criteria
0592:             * is ignored on a new object.
0593:             * This method takes in the Connection also as input so that
0594:             * referenced objects can also be obtained using a Connection
0595:             * that is taken as input
0596:             */
0597:            public List getActivitysRelatedByNewUserId(Criteria criteria,
0598:                    Connection con) throws TorqueException {
0599:                if (collActivitysRelatedByNewUserId == null) {
0600:                    if (isNew()) {
0601:                        collActivitysRelatedByNewUserId = new ArrayList();
0602:                    } else {
0603:                        criteria.add(ActivityPeer.NEW_USER_ID, getUserId());
0604:                        collActivitysRelatedByNewUserId = ActivityPeer
0605:                                .doSelect(criteria, con);
0606:                    }
0607:                } else {
0608:                    // criteria has no effect for a new object
0609:                    if (!isNew()) {
0610:                        // the following code is to determine if a new query is
0611:                        // called for.  If the criteria is the same as the last
0612:                        // one, just return the collection.
0613:                        criteria.add(ActivityPeer.NEW_USER_ID, getUserId());
0614:                        if (!lastActivitysRelatedByNewUserIdCriteria
0615:                                .equals(criteria)) {
0616:                            collActivitysRelatedByNewUserId = ActivityPeer
0617:                                    .doSelect(criteria, con);
0618:                        }
0619:                    }
0620:                }
0621:                lastActivitysRelatedByNewUserIdCriteria = criteria;
0622:
0623:                return collActivitysRelatedByNewUserId;
0624:            }
0625:
0626:            /**
0627:             * If this collection has already been initialized with
0628:             * an identical criteria, it returns the collection.
0629:             * Otherwise if this ScarabUserImpl is new, it will return
0630:             * an empty collection; or if this ScarabUserImpl has previously
0631:             * been saved, it will retrieve related ActivitysRelatedByNewUserId from storage.
0632:             *
0633:             * This method is protected by default in order to keep the public
0634:             * api reasonable.  You can provide public methods for those you
0635:             * actually need in ScarabUserImpl.
0636:             */
0637:            protected List getActivitysRelatedByNewUserIdJoinIssue(
0638:                    Criteria criteria) throws TorqueException {
0639:                if (collActivitysRelatedByNewUserId == null) {
0640:                    if (isNew()) {
0641:                        collActivitysRelatedByNewUserId = new ArrayList();
0642:                    } else {
0643:                        criteria.add(ActivityPeer.NEW_USER_ID, getUserId());
0644:                        collActivitysRelatedByNewUserId = ActivityPeer
0645:                                .doSelectJoinIssue(criteria);
0646:                    }
0647:                } else {
0648:                    // the following code is to determine if a new query is
0649:                    // called for.  If the criteria is the same as the last
0650:                    // one, just return the collection.
0651:                    criteria.add(ActivityPeer.NEW_USER_ID, getUserId());
0652:                    if (!lastActivitysRelatedByNewUserIdCriteria
0653:                            .equals(criteria)) {
0654:                        collActivitysRelatedByNewUserId = ActivityPeer
0655:                                .doSelectJoinIssue(criteria);
0656:                    }
0657:                }
0658:                lastActivitysRelatedByNewUserIdCriteria = criteria;
0659:
0660:                return collActivitysRelatedByNewUserId;
0661:            }
0662:
0663:            /**
0664:             * If this collection has already been initialized with
0665:             * an identical criteria, it returns the collection.
0666:             * Otherwise if this ScarabUserImpl is new, it will return
0667:             * an empty collection; or if this ScarabUserImpl has previously
0668:             * been saved, it will retrieve related ActivitysRelatedByNewUserId from storage.
0669:             *
0670:             * This method is protected by default in order to keep the public
0671:             * api reasonable.  You can provide public methods for those you
0672:             * actually need in ScarabUserImpl.
0673:             */
0674:            protected List getActivitysRelatedByNewUserIdJoinAttribute(
0675:                    Criteria criteria) throws TorqueException {
0676:                if (collActivitysRelatedByNewUserId == null) {
0677:                    if (isNew()) {
0678:                        collActivitysRelatedByNewUserId = new ArrayList();
0679:                    } else {
0680:                        criteria.add(ActivityPeer.NEW_USER_ID, getUserId());
0681:                        collActivitysRelatedByNewUserId = ActivityPeer
0682:                                .doSelectJoinAttribute(criteria);
0683:                    }
0684:                } else {
0685:                    // the following code is to determine if a new query is
0686:                    // called for.  If the criteria is the same as the last
0687:                    // one, just return the collection.
0688:                    criteria.add(ActivityPeer.NEW_USER_ID, getUserId());
0689:                    if (!lastActivitysRelatedByNewUserIdCriteria
0690:                            .equals(criteria)) {
0691:                        collActivitysRelatedByNewUserId = ActivityPeer
0692:                                .doSelectJoinAttribute(criteria);
0693:                    }
0694:                }
0695:                lastActivitysRelatedByNewUserIdCriteria = criteria;
0696:
0697:                return collActivitysRelatedByNewUserId;
0698:            }
0699:
0700:            /**
0701:             * If this collection has already been initialized with
0702:             * an identical criteria, it returns the collection.
0703:             * Otherwise if this ScarabUserImpl is new, it will return
0704:             * an empty collection; or if this ScarabUserImpl has previously
0705:             * been saved, it will retrieve related ActivitysRelatedByNewUserId from storage.
0706:             *
0707:             * This method is protected by default in order to keep the public
0708:             * api reasonable.  You can provide public methods for those you
0709:             * actually need in ScarabUserImpl.
0710:             */
0711:            protected List getActivitysRelatedByNewUserIdJoinActivitySet(
0712:                    Criteria criteria) throws TorqueException {
0713:                if (collActivitysRelatedByNewUserId == null) {
0714:                    if (isNew()) {
0715:                        collActivitysRelatedByNewUserId = new ArrayList();
0716:                    } else {
0717:                        criteria.add(ActivityPeer.NEW_USER_ID, getUserId());
0718:                        collActivitysRelatedByNewUserId = ActivityPeer
0719:                                .doSelectJoinActivitySet(criteria);
0720:                    }
0721:                } else {
0722:                    // the following code is to determine if a new query is
0723:                    // called for.  If the criteria is the same as the last
0724:                    // one, just return the collection.
0725:                    criteria.add(ActivityPeer.NEW_USER_ID, getUserId());
0726:                    if (!lastActivitysRelatedByNewUserIdCriteria
0727:                            .equals(criteria)) {
0728:                        collActivitysRelatedByNewUserId = ActivityPeer
0729:                                .doSelectJoinActivitySet(criteria);
0730:                    }
0731:                }
0732:                lastActivitysRelatedByNewUserIdCriteria = criteria;
0733:
0734:                return collActivitysRelatedByNewUserId;
0735:            }
0736:
0737:            /**
0738:             * If this collection has already been initialized with
0739:             * an identical criteria, it returns the collection.
0740:             * Otherwise if this ScarabUserImpl is new, it will return
0741:             * an empty collection; or if this ScarabUserImpl has previously
0742:             * been saved, it will retrieve related ActivitysRelatedByNewUserId from storage.
0743:             *
0744:             * This method is protected by default in order to keep the public
0745:             * api reasonable.  You can provide public methods for those you
0746:             * actually need in ScarabUserImpl.
0747:             */
0748:            protected List getActivitysRelatedByNewUserIdJoinScarabUserImplRelatedByOldUserId(
0749:                    Criteria criteria) throws TorqueException {
0750:                if (collActivitysRelatedByNewUserId == null) {
0751:                    if (isNew()) {
0752:                        collActivitysRelatedByNewUserId = new ArrayList();
0753:                    } else {
0754:                        criteria.add(ActivityPeer.NEW_USER_ID, getUserId());
0755:                        collActivitysRelatedByNewUserId = ActivityPeer
0756:                                .doSelectJoinScarabUserImplRelatedByOldUserId(criteria);
0757:                    }
0758:                } else {
0759:                    // the following code is to determine if a new query is
0760:                    // called for.  If the criteria is the same as the last
0761:                    // one, just return the collection.
0762:                    criteria.add(ActivityPeer.NEW_USER_ID, getUserId());
0763:                    if (!lastActivitysRelatedByNewUserIdCriteria
0764:                            .equals(criteria)) {
0765:                        collActivitysRelatedByNewUserId = ActivityPeer
0766:                                .doSelectJoinScarabUserImplRelatedByOldUserId(criteria);
0767:                    }
0768:                }
0769:                lastActivitysRelatedByNewUserIdCriteria = criteria;
0770:
0771:                return collActivitysRelatedByNewUserId;
0772:            }
0773:
0774:            /**
0775:             * If this collection has already been initialized with
0776:             * an identical criteria, it returns the collection.
0777:             * Otherwise if this ScarabUserImpl is new, it will return
0778:             * an empty collection; or if this ScarabUserImpl has previously
0779:             * been saved, it will retrieve related ActivitysRelatedByNewUserId from storage.
0780:             *
0781:             * This method is protected by default in order to keep the public
0782:             * api reasonable.  You can provide public methods for those you
0783:             * actually need in ScarabUserImpl.
0784:             */
0785:            protected List getActivitysRelatedByNewUserIdJoinAttributeOptionRelatedByOldOptionId(
0786:                    Criteria criteria) throws TorqueException {
0787:                if (collActivitysRelatedByNewUserId == null) {
0788:                    if (isNew()) {
0789:                        collActivitysRelatedByNewUserId = new ArrayList();
0790:                    } else {
0791:                        criteria.add(ActivityPeer.NEW_USER_ID, getUserId());
0792:                        collActivitysRelatedByNewUserId = ActivityPeer
0793:                                .doSelectJoinAttributeOptionRelatedByOldOptionId(criteria);
0794:                    }
0795:                } else {
0796:                    // the following code is to determine if a new query is
0797:                    // called for.  If the criteria is the same as the last
0798:                    // one, just return the collection.
0799:                    criteria.add(ActivityPeer.NEW_USER_ID, getUserId());
0800:                    if (!lastActivitysRelatedByNewUserIdCriteria
0801:                            .equals(criteria)) {
0802:                        collActivitysRelatedByNewUserId = ActivityPeer
0803:                                .doSelectJoinAttributeOptionRelatedByOldOptionId(criteria);
0804:                    }
0805:                }
0806:                lastActivitysRelatedByNewUserIdCriteria = criteria;
0807:
0808:                return collActivitysRelatedByNewUserId;
0809:            }
0810:
0811:            /**
0812:             * If this collection has already been initialized with
0813:             * an identical criteria, it returns the collection.
0814:             * Otherwise if this ScarabUserImpl is new, it will return
0815:             * an empty collection; or if this ScarabUserImpl has previously
0816:             * been saved, it will retrieve related ActivitysRelatedByNewUserId from storage.
0817:             *
0818:             * This method is protected by default in order to keep the public
0819:             * api reasonable.  You can provide public methods for those you
0820:             * actually need in ScarabUserImpl.
0821:             */
0822:            protected List getActivitysRelatedByNewUserIdJoinAttributeOptionRelatedByNewOptionId(
0823:                    Criteria criteria) throws TorqueException {
0824:                if (collActivitysRelatedByNewUserId == null) {
0825:                    if (isNew()) {
0826:                        collActivitysRelatedByNewUserId = new ArrayList();
0827:                    } else {
0828:                        criteria.add(ActivityPeer.NEW_USER_ID, getUserId());
0829:                        collActivitysRelatedByNewUserId = ActivityPeer
0830:                                .doSelectJoinAttributeOptionRelatedByNewOptionId(criteria);
0831:                    }
0832:                } else {
0833:                    // the following code is to determine if a new query is
0834:                    // called for.  If the criteria is the same as the last
0835:                    // one, just return the collection.
0836:                    criteria.add(ActivityPeer.NEW_USER_ID, getUserId());
0837:                    if (!lastActivitysRelatedByNewUserIdCriteria
0838:                            .equals(criteria)) {
0839:                        collActivitysRelatedByNewUserId = ActivityPeer
0840:                                .doSelectJoinAttributeOptionRelatedByNewOptionId(criteria);
0841:                    }
0842:                }
0843:                lastActivitysRelatedByNewUserIdCriteria = criteria;
0844:
0845:                return collActivitysRelatedByNewUserId;
0846:            }
0847:
0848:            /**
0849:             * If this collection has already been initialized with
0850:             * an identical criteria, it returns the collection.
0851:             * Otherwise if this ScarabUserImpl is new, it will return
0852:             * an empty collection; or if this ScarabUserImpl has previously
0853:             * been saved, it will retrieve related ActivitysRelatedByNewUserId from storage.
0854:             *
0855:             * This method is protected by default in order to keep the public
0856:             * api reasonable.  You can provide public methods for those you
0857:             * actually need in ScarabUserImpl.
0858:             */
0859:            protected List getActivitysRelatedByNewUserIdJoinAttachment(
0860:                    Criteria criteria) throws TorqueException {
0861:                if (collActivitysRelatedByNewUserId == null) {
0862:                    if (isNew()) {
0863:                        collActivitysRelatedByNewUserId = new ArrayList();
0864:                    } else {
0865:                        criteria.add(ActivityPeer.NEW_USER_ID, getUserId());
0866:                        collActivitysRelatedByNewUserId = ActivityPeer
0867:                                .doSelectJoinAttachment(criteria);
0868:                    }
0869:                } else {
0870:                    // the following code is to determine if a new query is
0871:                    // called for.  If the criteria is the same as the last
0872:                    // one, just return the collection.
0873:                    criteria.add(ActivityPeer.NEW_USER_ID, getUserId());
0874:                    if (!lastActivitysRelatedByNewUserIdCriteria
0875:                            .equals(criteria)) {
0876:                        collActivitysRelatedByNewUserId = ActivityPeer
0877:                                .doSelectJoinAttachment(criteria);
0878:                    }
0879:                }
0880:                lastActivitysRelatedByNewUserIdCriteria = criteria;
0881:
0882:                return collActivitysRelatedByNewUserId;
0883:            }
0884:
0885:            /**
0886:             * If this collection has already been initialized with
0887:             * an identical criteria, it returns the collection.
0888:             * Otherwise if this ScarabUserImpl is new, it will return
0889:             * an empty collection; or if this ScarabUserImpl has previously
0890:             * been saved, it will retrieve related ActivitysRelatedByNewUserId from storage.
0891:             *
0892:             * This method is protected by default in order to keep the public
0893:             * api reasonable.  You can provide public methods for those you
0894:             * actually need in ScarabUserImpl.
0895:             */
0896:            protected List getActivitysRelatedByNewUserIdJoinDepend(
0897:                    Criteria criteria) throws TorqueException {
0898:                if (collActivitysRelatedByNewUserId == null) {
0899:                    if (isNew()) {
0900:                        collActivitysRelatedByNewUserId = new ArrayList();
0901:                    } else {
0902:                        criteria.add(ActivityPeer.NEW_USER_ID, getUserId());
0903:                        collActivitysRelatedByNewUserId = ActivityPeer
0904:                                .doSelectJoinDepend(criteria);
0905:                    }
0906:                } else {
0907:                    // the following code is to determine if a new query is
0908:                    // called for.  If the criteria is the same as the last
0909:                    // one, just return the collection.
0910:                    criteria.add(ActivityPeer.NEW_USER_ID, getUserId());
0911:                    if (!lastActivitysRelatedByNewUserIdCriteria
0912:                            .equals(criteria)) {
0913:                        collActivitysRelatedByNewUserId = ActivityPeer
0914:                                .doSelectJoinDepend(criteria);
0915:                    }
0916:                }
0917:                lastActivitysRelatedByNewUserIdCriteria = criteria;
0918:
0919:                return collActivitysRelatedByNewUserId;
0920:            }
0921:
0922:            /**
0923:             * Collection to store aggregation of collAttachmentsRelatedByCreatedBy
0924:             */
0925:            protected List collAttachmentsRelatedByCreatedBy;
0926:
0927:            /**
0928:             * Temporary storage of collAttachmentsRelatedByCreatedBy to save a possible db hit in
0929:             * the event objects are add to the collection, but the
0930:             * complete collection is never requested.
0931:             */
0932:            protected void initAttachmentsRelatedByCreatedBy() {
0933:                if (collAttachmentsRelatedByCreatedBy == null) {
0934:                    collAttachmentsRelatedByCreatedBy = new ArrayList();
0935:                }
0936:            }
0937:
0938:            /**
0939:             * Method called to associate a Attachment object to this object
0940:             * through the Attachment foreign key attribute
0941:             *
0942:             * @param l Attachment
0943:             * @throws TorqueException
0944:             */
0945:            public void addAttachmentRelatedByCreatedBy(Attachment l)
0946:                    throws TorqueException {
0947:                getAttachmentsRelatedByCreatedBy().add(l);
0948:                l.setScarabUserRelatedByCreatedBy((ScarabUserImpl) this );
0949:            }
0950:
0951:            /**
0952:             * The criteria used to select the current contents of collAttachmentsRelatedByCreatedBy
0953:             */
0954:            private Criteria lastAttachmentsRelatedByCreatedByCriteria = null;
0955:
0956:            /**
0957:             * If this collection has already been initialized, returns
0958:             * the collection. Otherwise returns the results of
0959:             * getAttachmentsRelatedByCreatedBy(new Criteria())
0960:             *
0961:             * @return the collection of associated objects
0962:             * @throws TorqueException
0963:             */
0964:            public List getAttachmentsRelatedByCreatedBy()
0965:                    throws TorqueException {
0966:                if (collAttachmentsRelatedByCreatedBy == null) {
0967:                    collAttachmentsRelatedByCreatedBy = getAttachmentsRelatedByCreatedBy(new Criteria(
0968:                            10));
0969:                }
0970:                return collAttachmentsRelatedByCreatedBy;
0971:            }
0972:
0973:            /**
0974:             * If this collection has already been initialized with
0975:             * an identical criteria, it returns the collection.
0976:             * Otherwise if this ScarabUserImpl has previously
0977:             * been saved, it will retrieve related AttachmentsRelatedByCreatedBy from storage.
0978:             * If this ScarabUserImpl is new, it will return
0979:             * an empty collection or the current collection, the criteria
0980:             * is ignored on a new object.
0981:             *
0982:             * @throws TorqueException
0983:             */
0984:            public List getAttachmentsRelatedByCreatedBy(Criteria criteria)
0985:                    throws TorqueException {
0986:                if (collAttachmentsRelatedByCreatedBy == null) {
0987:                    if (isNew()) {
0988:                        collAttachmentsRelatedByCreatedBy = new ArrayList();
0989:                    } else {
0990:                        criteria.add(AttachmentPeer.CREATED_BY, getUserId());
0991:                        collAttachmentsRelatedByCreatedBy = AttachmentPeer
0992:                                .doSelect(criteria);
0993:                    }
0994:                } else {
0995:                    // criteria has no effect for a new object
0996:                    if (!isNew()) {
0997:                        // the following code is to determine if a new query is
0998:                        // called for.  If the criteria is the same as the last
0999:                        // one, just return the collection.
1000:                        criteria.add(AttachmentPeer.CREATED_BY, getUserId());
1001:                        if (!lastAttachmentsRelatedByCreatedByCriteria
1002:                                .equals(criteria)) {
1003:                            collAttachmentsRelatedByCreatedBy = AttachmentPeer
1004:                                    .doSelect(criteria);
1005:                        }
1006:                    }
1007:                }
1008:                lastAttachmentsRelatedByCreatedByCriteria = criteria;
1009:
1010:                return collAttachmentsRelatedByCreatedBy;
1011:            }
1012:
1013:            /**
1014:             * If this collection has already been initialized, returns
1015:             * the collection. Otherwise returns the results of
1016:             * getAttachmentsRelatedByCreatedBy(new Criteria(),Connection)
1017:             * This method takes in the Connection also as input so that
1018:             * referenced objects can also be obtained using a Connection
1019:             * that is taken as input
1020:             */
1021:            public List getAttachmentsRelatedByCreatedBy(Connection con)
1022:                    throws TorqueException {
1023:                if (collAttachmentsRelatedByCreatedBy == null) {
1024:                    collAttachmentsRelatedByCreatedBy = getAttachmentsRelatedByCreatedBy(
1025:                            new Criteria(10), con);
1026:                }
1027:                return collAttachmentsRelatedByCreatedBy;
1028:            }
1029:
1030:            /**
1031:             * If this collection has already been initialized with
1032:             * an identical criteria, it returns the collection.
1033:             * Otherwise if this ScarabUserImpl has previously
1034:             * been saved, it will retrieve related AttachmentsRelatedByCreatedBy from storage.
1035:             * If this ScarabUserImpl is new, it will return
1036:             * an empty collection or the current collection, the criteria
1037:             * is ignored on a new object.
1038:             * This method takes in the Connection also as input so that
1039:             * referenced objects can also be obtained using a Connection
1040:             * that is taken as input
1041:             */
1042:            public List getAttachmentsRelatedByCreatedBy(Criteria criteria,
1043:                    Connection con) throws TorqueException {
1044:                if (collAttachmentsRelatedByCreatedBy == null) {
1045:                    if (isNew()) {
1046:                        collAttachmentsRelatedByCreatedBy = new ArrayList();
1047:                    } else {
1048:                        criteria.add(AttachmentPeer.CREATED_BY, getUserId());
1049:                        collAttachmentsRelatedByCreatedBy = AttachmentPeer
1050:                                .doSelect(criteria, con);
1051:                    }
1052:                } else {
1053:                    // criteria has no effect for a new object
1054:                    if (!isNew()) {
1055:                        // the following code is to determine if a new query is
1056:                        // called for.  If the criteria is the same as the last
1057:                        // one, just return the collection.
1058:                        criteria.add(AttachmentPeer.CREATED_BY, getUserId());
1059:                        if (!lastAttachmentsRelatedByCreatedByCriteria
1060:                                .equals(criteria)) {
1061:                            collAttachmentsRelatedByCreatedBy = AttachmentPeer
1062:                                    .doSelect(criteria, con);
1063:                        }
1064:                    }
1065:                }
1066:                lastAttachmentsRelatedByCreatedByCriteria = criteria;
1067:
1068:                return collAttachmentsRelatedByCreatedBy;
1069:            }
1070:
1071:            /**
1072:             * If this collection has already been initialized with
1073:             * an identical criteria, it returns the collection.
1074:             * Otherwise if this ScarabUserImpl is new, it will return
1075:             * an empty collection; or if this ScarabUserImpl has previously
1076:             * been saved, it will retrieve related AttachmentsRelatedByCreatedBy from storage.
1077:             *
1078:             * This method is protected by default in order to keep the public
1079:             * api reasonable.  You can provide public methods for those you
1080:             * actually need in ScarabUserImpl.
1081:             */
1082:            protected List getAttachmentsRelatedByCreatedByJoinIssue(
1083:                    Criteria criteria) throws TorqueException {
1084:                if (collAttachmentsRelatedByCreatedBy == null) {
1085:                    if (isNew()) {
1086:                        collAttachmentsRelatedByCreatedBy = new ArrayList();
1087:                    } else {
1088:                        criteria.add(AttachmentPeer.CREATED_BY, getUserId());
1089:                        collAttachmentsRelatedByCreatedBy = AttachmentPeer
1090:                                .doSelectJoinIssue(criteria);
1091:                    }
1092:                } else {
1093:                    // the following code is to determine if a new query is
1094:                    // called for.  If the criteria is the same as the last
1095:                    // one, just return the collection.
1096:                    criteria.add(AttachmentPeer.CREATED_BY, getUserId());
1097:                    if (!lastAttachmentsRelatedByCreatedByCriteria
1098:                            .equals(criteria)) {
1099:                        collAttachmentsRelatedByCreatedBy = AttachmentPeer
1100:                                .doSelectJoinIssue(criteria);
1101:                    }
1102:                }
1103:                lastAttachmentsRelatedByCreatedByCriteria = criteria;
1104:
1105:                return collAttachmentsRelatedByCreatedBy;
1106:            }
1107:
1108:            /**
1109:             * If this collection has already been initialized with
1110:             * an identical criteria, it returns the collection.
1111:             * Otherwise if this ScarabUserImpl is new, it will return
1112:             * an empty collection; or if this ScarabUserImpl has previously
1113:             * been saved, it will retrieve related AttachmentsRelatedByCreatedBy from storage.
1114:             *
1115:             * This method is protected by default in order to keep the public
1116:             * api reasonable.  You can provide public methods for those you
1117:             * actually need in ScarabUserImpl.
1118:             */
1119:            protected List getAttachmentsRelatedByCreatedByJoinAttachmentType(
1120:                    Criteria criteria) throws TorqueException {
1121:                if (collAttachmentsRelatedByCreatedBy == null) {
1122:                    if (isNew()) {
1123:                        collAttachmentsRelatedByCreatedBy = new ArrayList();
1124:                    } else {
1125:                        criteria.add(AttachmentPeer.CREATED_BY, getUserId());
1126:                        collAttachmentsRelatedByCreatedBy = AttachmentPeer
1127:                                .doSelectJoinAttachmentType(criteria);
1128:                    }
1129:                } else {
1130:                    // the following code is to determine if a new query is
1131:                    // called for.  If the criteria is the same as the last
1132:                    // one, just return the collection.
1133:                    criteria.add(AttachmentPeer.CREATED_BY, getUserId());
1134:                    if (!lastAttachmentsRelatedByCreatedByCriteria
1135:                            .equals(criteria)) {
1136:                        collAttachmentsRelatedByCreatedBy = AttachmentPeer
1137:                                .doSelectJoinAttachmentType(criteria);
1138:                    }
1139:                }
1140:                lastAttachmentsRelatedByCreatedByCriteria = criteria;
1141:
1142:                return collAttachmentsRelatedByCreatedBy;
1143:            }
1144:
1145:            /**
1146:             * If this collection has already been initialized with
1147:             * an identical criteria, it returns the collection.
1148:             * Otherwise if this ScarabUserImpl is new, it will return
1149:             * an empty collection; or if this ScarabUserImpl has previously
1150:             * been saved, it will retrieve related AttachmentsRelatedByCreatedBy from storage.
1151:             *
1152:             * This method is protected by default in order to keep the public
1153:             * api reasonable.  You can provide public methods for those you
1154:             * actually need in ScarabUserImpl.
1155:             */
1156:            protected List getAttachmentsRelatedByCreatedByJoinScarabUserImplRelatedByModifiedBy(
1157:                    Criteria criteria) throws TorqueException {
1158:                if (collAttachmentsRelatedByCreatedBy == null) {
1159:                    if (isNew()) {
1160:                        collAttachmentsRelatedByCreatedBy = new ArrayList();
1161:                    } else {
1162:                        criteria.add(AttachmentPeer.CREATED_BY, getUserId());
1163:                        collAttachmentsRelatedByCreatedBy = AttachmentPeer
1164:                                .doSelectJoinScarabUserImplRelatedByModifiedBy(criteria);
1165:                    }
1166:                } else {
1167:                    // the following code is to determine if a new query is
1168:                    // called for.  If the criteria is the same as the last
1169:                    // one, just return the collection.
1170:                    criteria.add(AttachmentPeer.CREATED_BY, getUserId());
1171:                    if (!lastAttachmentsRelatedByCreatedByCriteria
1172:                            .equals(criteria)) {
1173:                        collAttachmentsRelatedByCreatedBy = AttachmentPeer
1174:                                .doSelectJoinScarabUserImplRelatedByModifiedBy(criteria);
1175:                    }
1176:                }
1177:                lastAttachmentsRelatedByCreatedByCriteria = criteria;
1178:
1179:                return collAttachmentsRelatedByCreatedBy;
1180:            }
1181:
1182:            /**
1183:             * Collection to store aggregation of collAttachmentsRelatedByModifiedBy
1184:             */
1185:            protected List collAttachmentsRelatedByModifiedBy;
1186:
1187:            /**
1188:             * Temporary storage of collAttachmentsRelatedByModifiedBy to save a possible db hit in
1189:             * the event objects are add to the collection, but the
1190:             * complete collection is never requested.
1191:             */
1192:            protected void initAttachmentsRelatedByModifiedBy() {
1193:                if (collAttachmentsRelatedByModifiedBy == null) {
1194:                    collAttachmentsRelatedByModifiedBy = new ArrayList();
1195:                }
1196:            }
1197:
1198:            /**
1199:             * Method called to associate a Attachment object to this object
1200:             * through the Attachment foreign key attribute
1201:             *
1202:             * @param l Attachment
1203:             * @throws TorqueException
1204:             */
1205:            public void addAttachmentRelatedByModifiedBy(Attachment l)
1206:                    throws TorqueException {
1207:                getAttachmentsRelatedByModifiedBy().add(l);
1208:                l.setScarabUserRelatedByModifiedBy((ScarabUserImpl) this );
1209:            }
1210:
1211:            /**
1212:             * The criteria used to select the current contents of collAttachmentsRelatedByModifiedBy
1213:             */
1214:            private Criteria lastAttachmentsRelatedByModifiedByCriteria = null;
1215:
1216:            /**
1217:             * If this collection has already been initialized, returns
1218:             * the collection. Otherwise returns the results of
1219:             * getAttachmentsRelatedByModifiedBy(new Criteria())
1220:             *
1221:             * @return the collection of associated objects
1222:             * @throws TorqueException
1223:             */
1224:            public List getAttachmentsRelatedByModifiedBy()
1225:                    throws TorqueException {
1226:                if (collAttachmentsRelatedByModifiedBy == null) {
1227:                    collAttachmentsRelatedByModifiedBy = getAttachmentsRelatedByModifiedBy(new Criteria(
1228:                            10));
1229:                }
1230:                return collAttachmentsRelatedByModifiedBy;
1231:            }
1232:
1233:            /**
1234:             * If this collection has already been initialized with
1235:             * an identical criteria, it returns the collection.
1236:             * Otherwise if this ScarabUserImpl has previously
1237:             * been saved, it will retrieve related AttachmentsRelatedByModifiedBy from storage.
1238:             * If this ScarabUserImpl is new, it will return
1239:             * an empty collection or the current collection, the criteria
1240:             * is ignored on a new object.
1241:             *
1242:             * @throws TorqueException
1243:             */
1244:            public List getAttachmentsRelatedByModifiedBy(Criteria criteria)
1245:                    throws TorqueException {
1246:                if (collAttachmentsRelatedByModifiedBy == null) {
1247:                    if (isNew()) {
1248:                        collAttachmentsRelatedByModifiedBy = new ArrayList();
1249:                    } else {
1250:                        criteria.add(AttachmentPeer.MODIFIED_BY, getUserId());
1251:                        collAttachmentsRelatedByModifiedBy = AttachmentPeer
1252:                                .doSelect(criteria);
1253:                    }
1254:                } else {
1255:                    // criteria has no effect for a new object
1256:                    if (!isNew()) {
1257:                        // the following code is to determine if a new query is
1258:                        // called for.  If the criteria is the same as the last
1259:                        // one, just return the collection.
1260:                        criteria.add(AttachmentPeer.MODIFIED_BY, getUserId());
1261:                        if (!lastAttachmentsRelatedByModifiedByCriteria
1262:                                .equals(criteria)) {
1263:                            collAttachmentsRelatedByModifiedBy = AttachmentPeer
1264:                                    .doSelect(criteria);
1265:                        }
1266:                    }
1267:                }
1268:                lastAttachmentsRelatedByModifiedByCriteria = criteria;
1269:
1270:                return collAttachmentsRelatedByModifiedBy;
1271:            }
1272:
1273:            /**
1274:             * If this collection has already been initialized, returns
1275:             * the collection. Otherwise returns the results of
1276:             * getAttachmentsRelatedByModifiedBy(new Criteria(),Connection)
1277:             * This method takes in the Connection also as input so that
1278:             * referenced objects can also be obtained using a Connection
1279:             * that is taken as input
1280:             */
1281:            public List getAttachmentsRelatedByModifiedBy(Connection con)
1282:                    throws TorqueException {
1283:                if (collAttachmentsRelatedByModifiedBy == null) {
1284:                    collAttachmentsRelatedByModifiedBy = getAttachmentsRelatedByModifiedBy(
1285:                            new Criteria(10), con);
1286:                }
1287:                return collAttachmentsRelatedByModifiedBy;
1288:            }
1289:
1290:            /**
1291:             * If this collection has already been initialized with
1292:             * an identical criteria, it returns the collection.
1293:             * Otherwise if this ScarabUserImpl has previously
1294:             * been saved, it will retrieve related AttachmentsRelatedByModifiedBy from storage.
1295:             * If this ScarabUserImpl is new, it will return
1296:             * an empty collection or the current collection, the criteria
1297:             * is ignored on a new object.
1298:             * This method takes in the Connection also as input so that
1299:             * referenced objects can also be obtained using a Connection
1300:             * that is taken as input
1301:             */
1302:            public List getAttachmentsRelatedByModifiedBy(Criteria criteria,
1303:                    Connection con) throws TorqueException {
1304:                if (collAttachmentsRelatedByModifiedBy == null) {
1305:                    if (isNew()) {
1306:                        collAttachmentsRelatedByModifiedBy = new ArrayList();
1307:                    } else {
1308:                        criteria.add(AttachmentPeer.MODIFIED_BY, getUserId());
1309:                        collAttachmentsRelatedByModifiedBy = AttachmentPeer
1310:                                .doSelect(criteria, con);
1311:                    }
1312:                } else {
1313:                    // criteria has no effect for a new object
1314:                    if (!isNew()) {
1315:                        // the following code is to determine if a new query is
1316:                        // called for.  If the criteria is the same as the last
1317:                        // one, just return the collection.
1318:                        criteria.add(AttachmentPeer.MODIFIED_BY, getUserId());
1319:                        if (!lastAttachmentsRelatedByModifiedByCriteria
1320:                                .equals(criteria)) {
1321:                            collAttachmentsRelatedByModifiedBy = AttachmentPeer
1322:                                    .doSelect(criteria, con);
1323:                        }
1324:                    }
1325:                }
1326:                lastAttachmentsRelatedByModifiedByCriteria = criteria;
1327:
1328:                return collAttachmentsRelatedByModifiedBy;
1329:            }
1330:
1331:            /**
1332:             * If this collection has already been initialized with
1333:             * an identical criteria, it returns the collection.
1334:             * Otherwise if this ScarabUserImpl is new, it will return
1335:             * an empty collection; or if this ScarabUserImpl has previously
1336:             * been saved, it will retrieve related AttachmentsRelatedByModifiedBy from storage.
1337:             *
1338:             * This method is protected by default in order to keep the public
1339:             * api reasonable.  You can provide public methods for those you
1340:             * actually need in ScarabUserImpl.
1341:             */
1342:            protected List getAttachmentsRelatedByModifiedByJoinIssue(
1343:                    Criteria criteria) throws TorqueException {
1344:                if (collAttachmentsRelatedByModifiedBy == null) {
1345:                    if (isNew()) {
1346:                        collAttachmentsRelatedByModifiedBy = new ArrayList();
1347:                    } else {
1348:                        criteria.add(AttachmentPeer.MODIFIED_BY, getUserId());
1349:                        collAttachmentsRelatedByModifiedBy = AttachmentPeer
1350:                                .doSelectJoinIssue(criteria);
1351:                    }
1352:                } else {
1353:                    // the following code is to determine if a new query is
1354:                    // called for.  If the criteria is the same as the last
1355:                    // one, just return the collection.
1356:                    criteria.add(AttachmentPeer.MODIFIED_BY, getUserId());
1357:                    if (!lastAttachmentsRelatedByModifiedByCriteria
1358:                            .equals(criteria)) {
1359:                        collAttachmentsRelatedByModifiedBy = AttachmentPeer
1360:                                .doSelectJoinIssue(criteria);
1361:                    }
1362:                }
1363:                lastAttachmentsRelatedByModifiedByCriteria = criteria;
1364:
1365:                return collAttachmentsRelatedByModifiedBy;
1366:            }
1367:
1368:            /**
1369:             * If this collection has already been initialized with
1370:             * an identical criteria, it returns the collection.
1371:             * Otherwise if this ScarabUserImpl is new, it will return
1372:             * an empty collection; or if this ScarabUserImpl has previously
1373:             * been saved, it will retrieve related AttachmentsRelatedByModifiedBy from storage.
1374:             *
1375:             * This method is protected by default in order to keep the public
1376:             * api reasonable.  You can provide public methods for those you
1377:             * actually need in ScarabUserImpl.
1378:             */
1379:            protected List getAttachmentsRelatedByModifiedByJoinAttachmentType(
1380:                    Criteria criteria) throws TorqueException {
1381:                if (collAttachmentsRelatedByModifiedBy == null) {
1382:                    if (isNew()) {
1383:                        collAttachmentsRelatedByModifiedBy = new ArrayList();
1384:                    } else {
1385:                        criteria.add(AttachmentPeer.MODIFIED_BY, getUserId());
1386:                        collAttachmentsRelatedByModifiedBy = AttachmentPeer
1387:                                .doSelectJoinAttachmentType(criteria);
1388:                    }
1389:                } else {
1390:                    // the following code is to determine if a new query is
1391:                    // called for.  If the criteria is the same as the last
1392:                    // one, just return the collection.
1393:                    criteria.add(AttachmentPeer.MODIFIED_BY, getUserId());
1394:                    if (!lastAttachmentsRelatedByModifiedByCriteria
1395:                            .equals(criteria)) {
1396:                        collAttachmentsRelatedByModifiedBy = AttachmentPeer
1397:                                .doSelectJoinAttachmentType(criteria);
1398:                    }
1399:                }
1400:                lastAttachmentsRelatedByModifiedByCriteria = criteria;
1401:
1402:                return collAttachmentsRelatedByModifiedBy;
1403:            }
1404:
1405:            /**
1406:             * If this collection has already been initialized with
1407:             * an identical criteria, it returns the collection.
1408:             * Otherwise if this ScarabUserImpl is new, it will return
1409:             * an empty collection; or if this ScarabUserImpl has previously
1410:             * been saved, it will retrieve related AttachmentsRelatedByModifiedBy from storage.
1411:             *
1412:             * This method is protected by default in order to keep the public
1413:             * api reasonable.  You can provide public methods for those you
1414:             * actually need in ScarabUserImpl.
1415:             */
1416:            protected List getAttachmentsRelatedByModifiedByJoinScarabUserImplRelatedByCreatedBy(
1417:                    Criteria criteria) throws TorqueException {
1418:                if (collAttachmentsRelatedByModifiedBy == null) {
1419:                    if (isNew()) {
1420:                        collAttachmentsRelatedByModifiedBy = new ArrayList();
1421:                    } else {
1422:                        criteria.add(AttachmentPeer.MODIFIED_BY, getUserId());
1423:                        collAttachmentsRelatedByModifiedBy = AttachmentPeer
1424:                                .doSelectJoinScarabUserImplRelatedByCreatedBy(criteria);
1425:                    }
1426:                } else {
1427:                    // the following code is to determine if a new query is
1428:                    // called for.  If the criteria is the same as the last
1429:                    // one, just return the collection.
1430:                    criteria.add(AttachmentPeer.MODIFIED_BY, getUserId());
1431:                    if (!lastAttachmentsRelatedByModifiedByCriteria
1432:                            .equals(criteria)) {
1433:                        collAttachmentsRelatedByModifiedBy = AttachmentPeer
1434:                                .doSelectJoinScarabUserImplRelatedByCreatedBy(criteria);
1435:                    }
1436:                }
1437:                lastAttachmentsRelatedByModifiedByCriteria = criteria;
1438:
1439:                return collAttachmentsRelatedByModifiedBy;
1440:            }
1441:
1442:            /**
1443:             * Collection to store aggregation of collAttributes
1444:             */
1445:            protected List collAttributes;
1446:
1447:            /**
1448:             * Temporary storage of collAttributes to save a possible db hit in
1449:             * the event objects are add to the collection, but the
1450:             * complete collection is never requested.
1451:             */
1452:            protected void initAttributes() {
1453:                if (collAttributes == null) {
1454:                    collAttributes = new ArrayList();
1455:                }
1456:            }
1457:
1458:            /**
1459:             * Method called to associate a Attribute object to this object
1460:             * through the Attribute foreign key attribute
1461:             *
1462:             * @param l Attribute
1463:             * @throws TorqueException
1464:             */
1465:            public void addAttribute(Attribute l) throws TorqueException {
1466:                getAttributes().add(l);
1467:                l.setScarabUser((ScarabUserImpl) this );
1468:            }
1469:
1470:            /**
1471:             * The criteria used to select the current contents of collAttributes
1472:             */
1473:            private Criteria lastAttributesCriteria = null;
1474:
1475:            /**
1476:             * If this collection has already been initialized, returns
1477:             * the collection. Otherwise returns the results of
1478:             * getAttributes(new Criteria())
1479:             *
1480:             * @return the collection of associated objects
1481:             * @throws TorqueException
1482:             */
1483:            public List getAttributes() throws TorqueException {
1484:                if (collAttributes == null) {
1485:                    collAttributes = getAttributes(new Criteria(10));
1486:                }
1487:                return collAttributes;
1488:            }
1489:
1490:            /**
1491:             * If this collection has already been initialized with
1492:             * an identical criteria, it returns the collection.
1493:             * Otherwise if this ScarabUserImpl has previously
1494:             * been saved, it will retrieve related Attributes from storage.
1495:             * If this ScarabUserImpl is new, it will return
1496:             * an empty collection or the current collection, the criteria
1497:             * is ignored on a new object.
1498:             *
1499:             * @throws TorqueException
1500:             */
1501:            public List getAttributes(Criteria criteria) throws TorqueException {
1502:                if (collAttributes == null) {
1503:                    if (isNew()) {
1504:                        collAttributes = new ArrayList();
1505:                    } else {
1506:                        criteria.add(AttributePeer.CREATED_BY, getUserId());
1507:                        collAttributes = AttributePeer.doSelect(criteria);
1508:                    }
1509:                } else {
1510:                    // criteria has no effect for a new object
1511:                    if (!isNew()) {
1512:                        // the following code is to determine if a new query is
1513:                        // called for.  If the criteria is the same as the last
1514:                        // one, just return the collection.
1515:                        criteria.add(AttributePeer.CREATED_BY, getUserId());
1516:                        if (!lastAttributesCriteria.equals(criteria)) {
1517:                            collAttributes = AttributePeer.doSelect(criteria);
1518:                        }
1519:                    }
1520:                }
1521:                lastAttributesCriteria = criteria;
1522:
1523:                return collAttributes;
1524:            }
1525:
1526:            /**
1527:             * If this collection has already been initialized, returns
1528:             * the collection. Otherwise returns the results of
1529:             * getAttributes(new Criteria(),Connection)
1530:             * This method takes in the Connection also as input so that
1531:             * referenced objects can also be obtained using a Connection
1532:             * that is taken as input
1533:             */
1534:            public List getAttributes(Connection con) throws TorqueException {
1535:                if (collAttributes == null) {
1536:                    collAttributes = getAttributes(new Criteria(10), con);
1537:                }
1538:                return collAttributes;
1539:            }
1540:
1541:            /**
1542:             * If this collection has already been initialized with
1543:             * an identical criteria, it returns the collection.
1544:             * Otherwise if this ScarabUserImpl has previously
1545:             * been saved, it will retrieve related Attributes from storage.
1546:             * If this ScarabUserImpl is new, it will return
1547:             * an empty collection or the current collection, the criteria
1548:             * is ignored on a new object.
1549:             * This method takes in the Connection also as input so that
1550:             * referenced objects can also be obtained using a Connection
1551:             * that is taken as input
1552:             */
1553:            public List getAttributes(Criteria criteria, Connection con)
1554:                    throws TorqueException {
1555:                if (collAttributes == null) {
1556:                    if (isNew()) {
1557:                        collAttributes = new ArrayList();
1558:                    } else {
1559:                        criteria.add(AttributePeer.CREATED_BY, getUserId());
1560:                        collAttributes = AttributePeer.doSelect(criteria, con);
1561:                    }
1562:                } else {
1563:                    // criteria has no effect for a new object
1564:                    if (!isNew()) {
1565:                        // the following code is to determine if a new query is
1566:                        // called for.  If the criteria is the same as the last
1567:                        // one, just return the collection.
1568:                        criteria.add(AttributePeer.CREATED_BY, getUserId());
1569:                        if (!lastAttributesCriteria.equals(criteria)) {
1570:                            collAttributes = AttributePeer.doSelect(criteria,
1571:                                    con);
1572:                        }
1573:                    }
1574:                }
1575:                lastAttributesCriteria = criteria;
1576:
1577:                return collAttributes;
1578:            }
1579:
1580:            /**
1581:             * If this collection has already been initialized with
1582:             * an identical criteria, it returns the collection.
1583:             * Otherwise if this ScarabUserImpl is new, it will return
1584:             * an empty collection; or if this ScarabUserImpl has previously
1585:             * been saved, it will retrieve related Attributes from storage.
1586:             *
1587:             * This method is protected by default in order to keep the public
1588:             * api reasonable.  You can provide public methods for those you
1589:             * actually need in ScarabUserImpl.
1590:             */
1591:            protected List getAttributesJoinAttributeType(Criteria criteria)
1592:                    throws TorqueException {
1593:                if (collAttributes == null) {
1594:                    if (isNew()) {
1595:                        collAttributes = new ArrayList();
1596:                    } else {
1597:                        criteria.add(AttributePeer.CREATED_BY, getUserId());
1598:                        collAttributes = AttributePeer
1599:                                .doSelectJoinAttributeType(criteria);
1600:                    }
1601:                } else {
1602:                    // the following code is to determine if a new query is
1603:                    // called for.  If the criteria is the same as the last
1604:                    // one, just return the collection.
1605:                    criteria.add(AttributePeer.CREATED_BY, getUserId());
1606:                    if (!lastAttributesCriteria.equals(criteria)) {
1607:                        collAttributes = AttributePeer
1608:                                .doSelectJoinAttributeType(criteria);
1609:                    }
1610:                }
1611:                lastAttributesCriteria = criteria;
1612:
1613:                return collAttributes;
1614:            }
1615:
1616:            /**
1617:             * If this collection has already been initialized with
1618:             * an identical criteria, it returns the collection.
1619:             * Otherwise if this ScarabUserImpl is new, it will return
1620:             * an empty collection; or if this ScarabUserImpl has previously
1621:             * been saved, it will retrieve related Attributes from storage.
1622:             *
1623:             * This method is protected by default in order to keep the public
1624:             * api reasonable.  You can provide public methods for those you
1625:             * actually need in ScarabUserImpl.
1626:             */
1627:            protected List getAttributesJoinAttributeOption(Criteria criteria)
1628:                    throws TorqueException {
1629:                if (collAttributes == null) {
1630:                    if (isNew()) {
1631:                        collAttributes = new ArrayList();
1632:                    } else {
1633:                        criteria.add(AttributePeer.CREATED_BY, getUserId());
1634:                        collAttributes = AttributePeer
1635:                                .doSelectJoinAttributeOption(criteria);
1636:                    }
1637:                } else {
1638:                    // the following code is to determine if a new query is
1639:                    // called for.  If the criteria is the same as the last
1640:                    // one, just return the collection.
1641:                    criteria.add(AttributePeer.CREATED_BY, getUserId());
1642:                    if (!lastAttributesCriteria.equals(criteria)) {
1643:                        collAttributes = AttributePeer
1644:                                .doSelectJoinAttributeOption(criteria);
1645:                    }
1646:                }
1647:                lastAttributesCriteria = criteria;
1648:
1649:                return collAttributes;
1650:            }
1651:
1652:            /**
1653:             * If this collection has already been initialized with
1654:             * an identical criteria, it returns the collection.
1655:             * Otherwise if this ScarabUserImpl is new, it will return
1656:             * an empty collection; or if this ScarabUserImpl has previously
1657:             * been saved, it will retrieve related Attributes from storage.
1658:             *
1659:             * This method is protected by default in order to keep the public
1660:             * api reasonable.  You can provide public methods for those you
1661:             * actually need in ScarabUserImpl.
1662:             */
1663:            protected List getAttributesJoinScarabUserImpl(Criteria criteria)
1664:                    throws TorqueException {
1665:                if (collAttributes == null) {
1666:                    if (isNew()) {
1667:                        collAttributes = new ArrayList();
1668:                    } else {
1669:                        criteria.add(AttributePeer.CREATED_BY, getUserId());
1670:                        collAttributes = AttributePeer
1671:                                .doSelectJoinScarabUserImpl(criteria);
1672:                    }
1673:                } else {
1674:                    // the following code is to determine if a new query is
1675:                    // called for.  If the criteria is the same as the last
1676:                    // one, just return the collection.
1677:                    criteria.add(AttributePeer.CREATED_BY, getUserId());
1678:                    if (!lastAttributesCriteria.equals(criteria)) {
1679:                        collAttributes = AttributePeer
1680:                                .doSelectJoinScarabUserImpl(criteria);
1681:                    }
1682:                }
1683:                lastAttributesCriteria = criteria;
1684:
1685:                return collAttributes;
1686:            }
1687:
1688:            /**
1689:             * Collection to store aggregation of collMITLists
1690:             */
1691:            protected List collMITLists;
1692:
1693:            /**
1694:             * Temporary storage of collMITLists to save a possible db hit in
1695:             * the event objects are add to the collection, but the
1696:             * complete collection is never requested.
1697:             */
1698:            protected void initMITLists() {
1699:                if (collMITLists == null) {
1700:                    collMITLists = new ArrayList();
1701:                }
1702:            }
1703:
1704:            /**
1705:             * Method called to associate a MITList object to this object
1706:             * through the MITList foreign key attribute
1707:             *
1708:             * @param l MITList
1709:             * @throws TorqueException
1710:             */
1711:            public void addMITList(MITList l) throws TorqueException {
1712:                getMITLists().add(l);
1713:                l.setScarabUser((ScarabUserImpl) this );
1714:            }
1715:
1716:            /**
1717:             * The criteria used to select the current contents of collMITLists
1718:             */
1719:            private Criteria lastMITListsCriteria = null;
1720:
1721:            /**
1722:             * If this collection has already been initialized, returns
1723:             * the collection. Otherwise returns the results of
1724:             * getMITLists(new Criteria())
1725:             *
1726:             * @return the collection of associated objects
1727:             * @throws TorqueException
1728:             */
1729:            public List getMITLists() throws TorqueException {
1730:                if (collMITLists == null) {
1731:                    collMITLists = getMITLists(new Criteria(10));
1732:                }
1733:                return collMITLists;
1734:            }
1735:
1736:            /**
1737:             * If this collection has already been initialized with
1738:             * an identical criteria, it returns the collection.
1739:             * Otherwise if this ScarabUserImpl has previously
1740:             * been saved, it will retrieve related MITLists from storage.
1741:             * If this ScarabUserImpl is new, it will return
1742:             * an empty collection or the current collection, the criteria
1743:             * is ignored on a new object.
1744:             *
1745:             * @throws TorqueException
1746:             */
1747:            public List getMITLists(Criteria criteria) throws TorqueException {
1748:                if (collMITLists == null) {
1749:                    if (isNew()) {
1750:                        collMITLists = new ArrayList();
1751:                    } else {
1752:                        criteria.add(MITListPeer.USER_ID, getUserId());
1753:                        collMITLists = MITListPeer.doSelect(criteria);
1754:                    }
1755:                } else {
1756:                    // criteria has no effect for a new object
1757:                    if (!isNew()) {
1758:                        // the following code is to determine if a new query is
1759:                        // called for.  If the criteria is the same as the last
1760:                        // one, just return the collection.
1761:                        criteria.add(MITListPeer.USER_ID, getUserId());
1762:                        if (!lastMITListsCriteria.equals(criteria)) {
1763:                            collMITLists = MITListPeer.doSelect(criteria);
1764:                        }
1765:                    }
1766:                }
1767:                lastMITListsCriteria = criteria;
1768:
1769:                return collMITLists;
1770:            }
1771:
1772:            /**
1773:             * If this collection has already been initialized, returns
1774:             * the collection. Otherwise returns the results of
1775:             * getMITLists(new Criteria(),Connection)
1776:             * This method takes in the Connection also as input so that
1777:             * referenced objects can also be obtained using a Connection
1778:             * that is taken as input
1779:             */
1780:            public List getMITLists(Connection con) throws TorqueException {
1781:                if (collMITLists == null) {
1782:                    collMITLists = getMITLists(new Criteria(10), con);
1783:                }
1784:                return collMITLists;
1785:            }
1786:
1787:            /**
1788:             * If this collection has already been initialized with
1789:             * an identical criteria, it returns the collection.
1790:             * Otherwise if this ScarabUserImpl has previously
1791:             * been saved, it will retrieve related MITLists from storage.
1792:             * If this ScarabUserImpl is new, it will return
1793:             * an empty collection or the current collection, the criteria
1794:             * is ignored on a new object.
1795:             * This method takes in the Connection also as input so that
1796:             * referenced objects can also be obtained using a Connection
1797:             * that is taken as input
1798:             */
1799:            public List getMITLists(Criteria criteria, Connection con)
1800:                    throws TorqueException {
1801:                if (collMITLists == null) {
1802:                    if (isNew()) {
1803:                        collMITLists = new ArrayList();
1804:                    } else {
1805:                        criteria.add(MITListPeer.USER_ID, getUserId());
1806:                        collMITLists = MITListPeer.doSelect(criteria, con);
1807:                    }
1808:                } else {
1809:                    // criteria has no effect for a new object
1810:                    if (!isNew()) {
1811:                        // the following code is to determine if a new query is
1812:                        // called for.  If the criteria is the same as the last
1813:                        // one, just return the collection.
1814:                        criteria.add(MITListPeer.USER_ID, getUserId());
1815:                        if (!lastMITListsCriteria.equals(criteria)) {
1816:                            collMITLists = MITListPeer.doSelect(criteria, con);
1817:                        }
1818:                    }
1819:                }
1820:                lastMITListsCriteria = criteria;
1821:
1822:                return collMITLists;
1823:            }
1824:
1825:            /**
1826:             * If this collection has already been initialized with
1827:             * an identical criteria, it returns the collection.
1828:             * Otherwise if this ScarabUserImpl is new, it will return
1829:             * an empty collection; or if this ScarabUserImpl has previously
1830:             * been saved, it will retrieve related MITLists from storage.
1831:             *
1832:             * This method is protected by default in order to keep the public
1833:             * api reasonable.  You can provide public methods for those you
1834:             * actually need in ScarabUserImpl.
1835:             */
1836:            protected List getMITListsJoinScarabUserImpl(Criteria criteria)
1837:                    throws TorqueException {
1838:                if (collMITLists == null) {
1839:                    if (isNew()) {
1840:                        collMITLists = new ArrayList();
1841:                    } else {
1842:                        criteria.add(MITListPeer.USER_ID, getUserId());
1843:                        collMITLists = MITListPeer
1844:                                .doSelectJoinScarabUserImpl(criteria);
1845:                    }
1846:                } else {
1847:                    // the following code is to determine if a new query is
1848:                    // called for.  If the criteria is the same as the last
1849:                    // one, just return the collection.
1850:                    criteria.add(MITListPeer.USER_ID, getUserId());
1851:                    if (!lastMITListsCriteria.equals(criteria)) {
1852:                        collMITLists = MITListPeer
1853:                                .doSelectJoinScarabUserImpl(criteria);
1854:                    }
1855:                }
1856:                lastMITListsCriteria = criteria;
1857:
1858:                return collMITLists;
1859:            }
1860:
1861:            /**
1862:             * Collection to store aggregation of collAttributeValues
1863:             */
1864:            protected List collAttributeValues;
1865:
1866:            /**
1867:             * Temporary storage of collAttributeValues to save a possible db hit in
1868:             * the event objects are add to the collection, but the
1869:             * complete collection is never requested.
1870:             */
1871:            protected void initAttributeValues() {
1872:                if (collAttributeValues == null) {
1873:                    collAttributeValues = new ArrayList();
1874:                }
1875:            }
1876:
1877:            /**
1878:             * Method called to associate a AttributeValue object to this object
1879:             * through the AttributeValue foreign key attribute
1880:             *
1881:             * @param l AttributeValue
1882:             * @throws TorqueException
1883:             */
1884:            public void addAttributeValue(AttributeValue l)
1885:                    throws TorqueException {
1886:                getAttributeValues().add(l);
1887:                l.setScarabUser((ScarabUserImpl) this );
1888:            }
1889:
1890:            /**
1891:             * The criteria used to select the current contents of collAttributeValues
1892:             */
1893:            private Criteria lastAttributeValuesCriteria = null;
1894:
1895:            /**
1896:             * If this collection has already been initialized, returns
1897:             * the collection. Otherwise returns the results of
1898:             * getAttributeValues(new Criteria())
1899:             *
1900:             * @return the collection of associated objects
1901:             * @throws TorqueException
1902:             */
1903:            public List getAttributeValues() throws TorqueException {
1904:                if (collAttributeValues == null) {
1905:                    collAttributeValues = getAttributeValues(new Criteria(10));
1906:                }
1907:                return collAttributeValues;
1908:            }
1909:
1910:            /**
1911:             * If this collection has already been initialized with
1912:             * an identical criteria, it returns the collection.
1913:             * Otherwise if this ScarabUserImpl has previously
1914:             * been saved, it will retrieve related AttributeValues from storage.
1915:             * If this ScarabUserImpl is new, it will return
1916:             * an empty collection or the current collection, the criteria
1917:             * is ignored on a new object.
1918:             *
1919:             * @throws TorqueException
1920:             */
1921:            public List getAttributeValues(Criteria criteria)
1922:                    throws TorqueException {
1923:                if (collAttributeValues == null) {
1924:                    if (isNew()) {
1925:                        collAttributeValues = new ArrayList();
1926:                    } else {
1927:                        criteria.add(AttributeValuePeer.USER_ID, getUserId());
1928:                        collAttributeValues = AttributeValuePeer
1929:                                .doSelect(criteria);
1930:                    }
1931:                } else {
1932:                    // criteria has no effect for a new object
1933:                    if (!isNew()) {
1934:                        // the following code is to determine if a new query is
1935:                        // called for.  If the criteria is the same as the last
1936:                        // one, just return the collection.
1937:                        criteria.add(AttributeValuePeer.USER_ID, getUserId());
1938:                        if (!lastAttributeValuesCriteria.equals(criteria)) {
1939:                            collAttributeValues = AttributeValuePeer
1940:                                    .doSelect(criteria);
1941:                        }
1942:                    }
1943:                }
1944:                lastAttributeValuesCriteria = criteria;
1945:
1946:                return collAttributeValues;
1947:            }
1948:
1949:            /**
1950:             * If this collection has already been initialized, returns
1951:             * the collection. Otherwise returns the results of
1952:             * getAttributeValues(new Criteria(),Connection)
1953:             * This method takes in the Connection also as input so that
1954:             * referenced objects can also be obtained using a Connection
1955:             * that is taken as input
1956:             */
1957:            public List getAttributeValues(Connection con)
1958:                    throws TorqueException {
1959:                if (collAttributeValues == null) {
1960:                    collAttributeValues = getAttributeValues(new Criteria(10),
1961:                            con);
1962:                }
1963:                return collAttributeValues;
1964:            }
1965:
1966:            /**
1967:             * If this collection has already been initialized with
1968:             * an identical criteria, it returns the collection.
1969:             * Otherwise if this ScarabUserImpl has previously
1970:             * been saved, it will retrieve related AttributeValues from storage.
1971:             * If this ScarabUserImpl is new, it will return
1972:             * an empty collection or the current collection, the criteria
1973:             * is ignored on a new object.
1974:             * This method takes in the Connection also as input so that
1975:             * referenced objects can also be obtained using a Connection
1976:             * that is taken as input
1977:             */
1978:            public List getAttributeValues(Criteria criteria, Connection con)
1979:                    throws TorqueException {
1980:                if (collAttributeValues == null) {
1981:                    if (isNew()) {
1982:                        collAttributeValues = new ArrayList();
1983:                    } else {
1984:                        criteria.add(AttributeValuePeer.USER_ID, getUserId());
1985:                        collAttributeValues = AttributeValuePeer.doSelect(
1986:                                criteria, con);
1987:                    }
1988:                } else {
1989:                    // criteria has no effect for a new object
1990:                    if (!isNew()) {
1991:                        // the following code is to determine if a new query is
1992:                        // called for.  If the criteria is the same as the last
1993:                        // one, just return the collection.
1994:                        criteria.add(AttributeValuePeer.USER_ID, getUserId());
1995:                        if (!lastAttributeValuesCriteria.equals(criteria)) {
1996:                            collAttributeValues = AttributeValuePeer.doSelect(
1997:                                    criteria, con);
1998:                        }
1999:                    }
2000:                }
2001:                lastAttributeValuesCriteria = criteria;
2002:
2003:                return collAttributeValues;
2004:            }
2005:
2006:            /**
2007:             * If this collection has already been initialized with
2008:             * an identical criteria, it returns the collection.
2009:             * Otherwise if this ScarabUserImpl is new, it will return
2010:             * an empty collection; or if this ScarabUserImpl has previously
2011:             * been saved, it will retrieve related AttributeValues from storage.
2012:             *
2013:             * This method is protected by default in order to keep the public
2014:             * api reasonable.  You can provide public methods for those you
2015:             * actually need in ScarabUserImpl.
2016:             */
2017:            protected List getAttributeValuesJoinIssue(Criteria criteria)
2018:                    throws TorqueException {
2019:                if (collAttributeValues == null) {
2020:                    if (isNew()) {
2021:                        collAttributeValues = new ArrayList();
2022:                    } else {
2023:                        criteria.add(AttributeValuePeer.USER_ID, getUserId());
2024:                        collAttributeValues = AttributeValuePeer
2025:                                .doSelectJoinIssue(criteria);
2026:                    }
2027:                } else {
2028:                    // the following code is to determine if a new query is
2029:                    // called for.  If the criteria is the same as the last
2030:                    // one, just return the collection.
2031:                    criteria.add(AttributeValuePeer.USER_ID, getUserId());
2032:                    if (!lastAttributeValuesCriteria.equals(criteria)) {
2033:                        collAttributeValues = AttributeValuePeer
2034:                                .doSelectJoinIssue(criteria);
2035:                    }
2036:                }
2037:                lastAttributeValuesCriteria = criteria;
2038:
2039:                return collAttributeValues;
2040:            }
2041:
2042:            /**
2043:             * If this collection has already been initialized with
2044:             * an identical criteria, it returns the collection.
2045:             * Otherwise if this ScarabUserImpl is new, it will return
2046:             * an empty collection; or if this ScarabUserImpl has previously
2047:             * been saved, it will retrieve related AttributeValues from storage.
2048:             *
2049:             * This method is protected by default in order to keep the public
2050:             * api reasonable.  You can provide public methods for those you
2051:             * actually need in ScarabUserImpl.
2052:             */
2053:            protected List getAttributeValuesJoinAttribute(Criteria criteria)
2054:                    throws TorqueException {
2055:                if (collAttributeValues == null) {
2056:                    if (isNew()) {
2057:                        collAttributeValues = new ArrayList();
2058:                    } else {
2059:                        criteria.add(AttributeValuePeer.USER_ID, getUserId());
2060:                        collAttributeValues = AttributeValuePeer
2061:                                .doSelectJoinAttribute(criteria);
2062:                    }
2063:                } else {
2064:                    // the following code is to determine if a new query is
2065:                    // called for.  If the criteria is the same as the last
2066:                    // one, just return the collection.
2067:                    criteria.add(AttributeValuePeer.USER_ID, getUserId());
2068:                    if (!lastAttributeValuesCriteria.equals(criteria)) {
2069:                        collAttributeValues = AttributeValuePeer
2070:                                .doSelectJoinAttribute(criteria);
2071:                    }
2072:                }
2073:                lastAttributeValuesCriteria = criteria;
2074:
2075:                return collAttributeValues;
2076:            }
2077:
2078:            /**
2079:             * If this collection has already been initialized with
2080:             * an identical criteria, it returns the collection.
2081:             * Otherwise if this ScarabUserImpl is new, it will return
2082:             * an empty collection; or if this ScarabUserImpl has previously
2083:             * been saved, it will retrieve related AttributeValues from storage.
2084:             *
2085:             * This method is protected by default in order to keep the public
2086:             * api reasonable.  You can provide public methods for those you
2087:             * actually need in ScarabUserImpl.
2088:             */
2089:            protected List getAttributeValuesJoinAttributeOption(
2090:                    Criteria criteria) throws TorqueException {
2091:                if (collAttributeValues == null) {
2092:                    if (isNew()) {
2093:                        collAttributeValues = new ArrayList();
2094:                    } else {
2095:                        criteria.add(AttributeValuePeer.USER_ID, getUserId());
2096:                        collAttributeValues = AttributeValuePeer
2097:                                .doSelectJoinAttributeOption(criteria);
2098:                    }
2099:                } else {
2100:                    // the following code is to determine if a new query is
2101:                    // called for.  If the criteria is the same as the last
2102:                    // one, just return the collection.
2103:                    criteria.add(AttributeValuePeer.USER_ID, getUserId());
2104:                    if (!lastAttributeValuesCriteria.equals(criteria)) {
2105:                        collAttributeValues = AttributeValuePeer
2106:                                .doSelectJoinAttributeOption(criteria);
2107:                    }
2108:                }
2109:                lastAttributeValuesCriteria = criteria;
2110:
2111:                return collAttributeValues;
2112:            }
2113:
2114:            /**
2115:             * If this collection has already been initialized with
2116:             * an identical criteria, it returns the collection.
2117:             * Otherwise if this ScarabUserImpl is new, it will return
2118:             * an empty collection; or if this ScarabUserImpl has previously
2119:             * been saved, it will retrieve related AttributeValues from storage.
2120:             *
2121:             * This method is protected by default in order to keep the public
2122:             * api reasonable.  You can provide public methods for those you
2123:             * actually need in ScarabUserImpl.
2124:             */
2125:            protected List getAttributeValuesJoinScarabUserImpl(
2126:                    Criteria criteria) throws TorqueException {
2127:                if (collAttributeValues == null) {
2128:                    if (isNew()) {
2129:                        collAttributeValues = new ArrayList();
2130:                    } else {
2131:                        criteria.add(AttributeValuePeer.USER_ID, getUserId());
2132:                        collAttributeValues = AttributeValuePeer
2133:                                .doSelectJoinScarabUserImpl(criteria);
2134:                    }
2135:                } else {
2136:                    // the following code is to determine if a new query is
2137:                    // called for.  If the criteria is the same as the last
2138:                    // one, just return the collection.
2139:                    criteria.add(AttributeValuePeer.USER_ID, getUserId());
2140:                    if (!lastAttributeValuesCriteria.equals(criteria)) {
2141:                        collAttributeValues = AttributeValuePeer
2142:                                .doSelectJoinScarabUserImpl(criteria);
2143:                    }
2144:                }
2145:                lastAttributeValuesCriteria = criteria;
2146:
2147:                return collAttributeValues;
2148:            }
2149:
2150:            /**
2151:             * Collection to store aggregation of collScarabModulesRelatedByOwnerId
2152:             */
2153:            protected List collScarabModulesRelatedByOwnerId;
2154:
2155:            /**
2156:             * Temporary storage of collScarabModulesRelatedByOwnerId to save a possible db hit in
2157:             * the event objects are add to the collection, but the
2158:             * complete collection is never requested.
2159:             */
2160:            protected void initScarabModulesRelatedByOwnerId() {
2161:                if (collScarabModulesRelatedByOwnerId == null) {
2162:                    collScarabModulesRelatedByOwnerId = new ArrayList();
2163:                }
2164:            }
2165:
2166:            /**
2167:             * Method called to associate a ScarabModule object to this object
2168:             * through the ScarabModule foreign key attribute
2169:             *
2170:             * @param l ScarabModule
2171:             * @throws TorqueException
2172:             */
2173:            public void addScarabModuleRelatedByOwnerId(ScarabModule l)
2174:                    throws TorqueException {
2175:                getScarabModulesRelatedByOwnerId().add(l);
2176:                l.setScarabUserRelatedByOwnerId((ScarabUserImpl) this );
2177:            }
2178:
2179:            /**
2180:             * The criteria used to select the current contents of collScarabModulesRelatedByOwnerId
2181:             */
2182:            private Criteria lastScarabModulesRelatedByOwnerIdCriteria = null;
2183:
2184:            /**
2185:             * If this collection has already been initialized, returns
2186:             * the collection. Otherwise returns the results of
2187:             * getScarabModulesRelatedByOwnerId(new Criteria())
2188:             *
2189:             * @return the collection of associated objects
2190:             * @throws TorqueException
2191:             */
2192:            public List getScarabModulesRelatedByOwnerId()
2193:                    throws TorqueException {
2194:                if (collScarabModulesRelatedByOwnerId == null) {
2195:                    collScarabModulesRelatedByOwnerId = getScarabModulesRelatedByOwnerId(new Criteria(
2196:                            10));
2197:                }
2198:                return collScarabModulesRelatedByOwnerId;
2199:            }
2200:
2201:            /**
2202:             * If this collection has already been initialized with
2203:             * an identical criteria, it returns the collection.
2204:             * Otherwise if this ScarabUserImpl has previously
2205:             * been saved, it will retrieve related ScarabModulesRelatedByOwnerId from storage.
2206:             * If this ScarabUserImpl is new, it will return
2207:             * an empty collection or the current collection, the criteria
2208:             * is ignored on a new object.
2209:             *
2210:             * @throws TorqueException
2211:             */
2212:            public List getScarabModulesRelatedByOwnerId(Criteria criteria)
2213:                    throws TorqueException {
2214:                if (collScarabModulesRelatedByOwnerId == null) {
2215:                    if (isNew()) {
2216:                        collScarabModulesRelatedByOwnerId = new ArrayList();
2217:                    } else {
2218:                        criteria.add(ScarabModulePeer.OWNER_ID, getUserId());
2219:                        collScarabModulesRelatedByOwnerId = ScarabModulePeer
2220:                                .doSelect(criteria);
2221:                    }
2222:                } else {
2223:                    // criteria has no effect for a new object
2224:                    if (!isNew()) {
2225:                        // the following code is to determine if a new query is
2226:                        // called for.  If the criteria is the same as the last
2227:                        // one, just return the collection.
2228:                        criteria.add(ScarabModulePeer.OWNER_ID, getUserId());
2229:                        if (!lastScarabModulesRelatedByOwnerIdCriteria
2230:                                .equals(criteria)) {
2231:                            collScarabModulesRelatedByOwnerId = ScarabModulePeer
2232:                                    .doSelect(criteria);
2233:                        }
2234:                    }
2235:                }
2236:                lastScarabModulesRelatedByOwnerIdCriteria = criteria;
2237:
2238:                return collScarabModulesRelatedByOwnerId;
2239:            }
2240:
2241:            /**
2242:             * If this collection has already been initialized, returns
2243:             * the collection. Otherwise returns the results of
2244:             * getScarabModulesRelatedByOwnerId(new Criteria(),Connection)
2245:             * This method takes in the Connection also as input so that
2246:             * referenced objects can also be obtained using a Connection
2247:             * that is taken as input
2248:             */
2249:            public List getScarabModulesRelatedByOwnerId(Connection con)
2250:                    throws TorqueException {
2251:                if (collScarabModulesRelatedByOwnerId == null) {
2252:                    collScarabModulesRelatedByOwnerId = getScarabModulesRelatedByOwnerId(
2253:                            new Criteria(10), con);
2254:                }
2255:                return collScarabModulesRelatedByOwnerId;
2256:            }
2257:
2258:            /**
2259:             * If this collection has already been initialized with
2260:             * an identical criteria, it returns the collection.
2261:             * Otherwise if this ScarabUserImpl has previously
2262:             * been saved, it will retrieve related ScarabModulesRelatedByOwnerId from storage.
2263:             * If this ScarabUserImpl is new, it will return
2264:             * an empty collection or the current collection, the criteria
2265:             * is ignored on a new object.
2266:             * This method takes in the Connection also as input so that
2267:             * referenced objects can also be obtained using a Connection
2268:             * that is taken as input
2269:             */
2270:            public List getScarabModulesRelatedByOwnerId(Criteria criteria,
2271:                    Connection con) throws TorqueException {
2272:                if (collScarabModulesRelatedByOwnerId == null) {
2273:                    if (isNew()) {
2274:                        collScarabModulesRelatedByOwnerId = new ArrayList();
2275:                    } else {
2276:                        criteria.add(ScarabModulePeer.OWNER_ID, getUserId());
2277:                        collScarabModulesRelatedByOwnerId = ScarabModulePeer
2278:                                .doSelect(criteria, con);
2279:                    }
2280:                } else {
2281:                    // criteria has no effect for a new object
2282:                    if (!isNew()) {
2283:                        // the following code is to determine if a new query is
2284:                        // called for.  If the criteria is the same as the last
2285:                        // one, just return the collection.
2286:                        criteria.add(ScarabModulePeer.OWNER_ID, getUserId());
2287:                        if (!lastScarabModulesRelatedByOwnerIdCriteria
2288:                                .equals(criteria)) {
2289:                            collScarabModulesRelatedByOwnerId = ScarabModulePeer
2290:                                    .doSelect(criteria, con);
2291:                        }
2292:                    }
2293:                }
2294:                lastScarabModulesRelatedByOwnerIdCriteria = criteria;
2295:
2296:                return collScarabModulesRelatedByOwnerId;
2297:            }
2298:
2299:            /**
2300:             * If this collection has already been initialized with
2301:             * an identical criteria, it returns the collection.
2302:             * Otherwise if this ScarabUserImpl is new, it will return
2303:             * an empty collection; or if this ScarabUserImpl has previously
2304:             * been saved, it will retrieve related ScarabModulesRelatedByOwnerId from storage.
2305:             *
2306:             * This method is protected by default in order to keep the public
2307:             * api reasonable.  You can provide public methods for those you
2308:             * actually need in ScarabUserImpl.
2309:             */
2310:            protected List getScarabModulesRelatedByOwnerIdJoinScarabUserImplRelatedByQaContactId(
2311:                    Criteria criteria) throws TorqueException {
2312:                if (collScarabModulesRelatedByOwnerId == null) {
2313:                    if (isNew()) {
2314:                        collScarabModulesRelatedByOwnerId = new ArrayList();
2315:                    } else {
2316:                        criteria.add(ScarabModulePeer.OWNER_ID, getUserId());
2317:                        collScarabModulesRelatedByOwnerId = ScarabModulePeer
2318:                                .doSelectJoinScarabUserImplRelatedByQaContactId(criteria);
2319:                    }
2320:                } else {
2321:                    // the following code is to determine if a new query is
2322:                    // called for.  If the criteria is the same as the last
2323:                    // one, just return the collection.
2324:                    criteria.add(ScarabModulePeer.OWNER_ID, getUserId());
2325:                    if (!lastScarabModulesRelatedByOwnerIdCriteria
2326:                            .equals(criteria)) {
2327:                        collScarabModulesRelatedByOwnerId = ScarabModulePeer
2328:                                .doSelectJoinScarabUserImplRelatedByQaContactId(criteria);
2329:                    }
2330:                }
2331:                lastScarabModulesRelatedByOwnerIdCriteria = criteria;
2332:
2333:                return collScarabModulesRelatedByOwnerId;
2334:            }
2335:
2336:            /**
2337:             * Collection to store aggregation of collScarabModulesRelatedByQaContactId
2338:             */
2339:            protected List collScarabModulesRelatedByQaContactId;
2340:
2341:            /**
2342:             * Temporary storage of collScarabModulesRelatedByQaContactId to save a possible db hit in
2343:             * the event objects are add to the collection, but the
2344:             * complete collection is never requested.
2345:             */
2346:            protected void initScarabModulesRelatedByQaContactId() {
2347:                if (collScarabModulesRelatedByQaContactId == null) {
2348:                    collScarabModulesRelatedByQaContactId = new ArrayList();
2349:                }
2350:            }
2351:
2352:            /**
2353:             * Method called to associate a ScarabModule object to this object
2354:             * through the ScarabModule foreign key attribute
2355:             *
2356:             * @param l ScarabModule
2357:             * @throws TorqueException
2358:             */
2359:            public void addScarabModuleRelatedByQaContactId(ScarabModule l)
2360:                    throws TorqueException {
2361:                getScarabModulesRelatedByQaContactId().add(l);
2362:                l.setScarabUserRelatedByQaContactId((ScarabUserImpl) this );
2363:            }
2364:
2365:            /**
2366:             * The criteria used to select the current contents of collScarabModulesRelatedByQaContactId
2367:             */
2368:            private Criteria lastScarabModulesRelatedByQaContactIdCriteria = null;
2369:
2370:            /**
2371:             * If this collection has already been initialized, returns
2372:             * the collection. Otherwise returns the results of
2373:             * getScarabModulesRelatedByQaContactId(new Criteria())
2374:             *
2375:             * @return the collection of associated objects
2376:             * @throws TorqueException
2377:             */
2378:            public List getScarabModulesRelatedByQaContactId()
2379:                    throws TorqueException {
2380:                if (collScarabModulesRelatedByQaContactId == null) {
2381:                    collScarabModulesRelatedByQaContactId = getScarabModulesRelatedByQaContactId(new Criteria(
2382:                            10));
2383:                }
2384:                return collScarabModulesRelatedByQaContactId;
2385:            }
2386:
2387:            /**
2388:             * If this collection has already been initialized with
2389:             * an identical criteria, it returns the collection.
2390:             * Otherwise if this ScarabUserImpl has previously
2391:             * been saved, it will retrieve related ScarabModulesRelatedByQaContactId from storage.
2392:             * If this ScarabUserImpl is new, it will return
2393:             * an empty collection or the current collection, the criteria
2394:             * is ignored on a new object.
2395:             *
2396:             * @throws TorqueException
2397:             */
2398:            public List getScarabModulesRelatedByQaContactId(Criteria criteria)
2399:                    throws TorqueException {
2400:                if (collScarabModulesRelatedByQaContactId == null) {
2401:                    if (isNew()) {
2402:                        collScarabModulesRelatedByQaContactId = new ArrayList();
2403:                    } else {
2404:                        criteria.add(ScarabModulePeer.QA_CONTACT_ID,
2405:                                getUserId());
2406:                        collScarabModulesRelatedByQaContactId = ScarabModulePeer
2407:                                .doSelect(criteria);
2408:                    }
2409:                } else {
2410:                    // criteria has no effect for a new object
2411:                    if (!isNew()) {
2412:                        // the following code is to determine if a new query is
2413:                        // called for.  If the criteria is the same as the last
2414:                        // one, just return the collection.
2415:                        criteria.add(ScarabModulePeer.QA_CONTACT_ID,
2416:                                getUserId());
2417:                        if (!lastScarabModulesRelatedByQaContactIdCriteria
2418:                                .equals(criteria)) {
2419:                            collScarabModulesRelatedByQaContactId = ScarabModulePeer
2420:                                    .doSelect(criteria);
2421:                        }
2422:                    }
2423:                }
2424:                lastScarabModulesRelatedByQaContactIdCriteria = criteria;
2425:
2426:                return collScarabModulesRelatedByQaContactId;
2427:            }
2428:
2429:            /**
2430:             * If this collection has already been initialized, returns
2431:             * the collection. Otherwise returns the results of
2432:             * getScarabModulesRelatedByQaContactId(new Criteria(),Connection)
2433:             * This method takes in the Connection also as input so that
2434:             * referenced objects can also be obtained using a Connection
2435:             * that is taken as input
2436:             */
2437:            public List getScarabModulesRelatedByQaContactId(Connection con)
2438:                    throws TorqueException {
2439:                if (collScarabModulesRelatedByQaContactId == null) {
2440:                    collScarabModulesRelatedByQaContactId = getScarabModulesRelatedByQaContactId(
2441:                            new Criteria(10), con);
2442:                }
2443:                return collScarabModulesRelatedByQaContactId;
2444:            }
2445:
2446:            /**
2447:             * If this collection has already been initialized with
2448:             * an identical criteria, it returns the collection.
2449:             * Otherwise if this ScarabUserImpl has previously
2450:             * been saved, it will retrieve related ScarabModulesRelatedByQaContactId from storage.
2451:             * If this ScarabUserImpl is new, it will return
2452:             * an empty collection or the current collection, the criteria
2453:             * is ignored on a new object.
2454:             * This method takes in the Connection also as input so that
2455:             * referenced objects can also be obtained using a Connection
2456:             * that is taken as input
2457:             */
2458:            public List getScarabModulesRelatedByQaContactId(Criteria criteria,
2459:                    Connection con) throws TorqueException {
2460:                if (collScarabModulesRelatedByQaContactId == null) {
2461:                    if (isNew()) {
2462:                        collScarabModulesRelatedByQaContactId = new ArrayList();
2463:                    } else {
2464:                        criteria.add(ScarabModulePeer.QA_CONTACT_ID,
2465:                                getUserId());
2466:                        collScarabModulesRelatedByQaContactId = ScarabModulePeer
2467:                                .doSelect(criteria, con);
2468:                    }
2469:                } else {
2470:                    // criteria has no effect for a new object
2471:                    if (!isNew()) {
2472:                        // the following code is to determine if a new query is
2473:                        // called for.  If the criteria is the same as the last
2474:                        // one, just return the collection.
2475:                        criteria.add(ScarabModulePeer.QA_CONTACT_ID,
2476:                                getUserId());
2477:                        if (!lastScarabModulesRelatedByQaContactIdCriteria
2478:                                .equals(criteria)) {
2479:                            collScarabModulesRelatedByQaContactId = ScarabModulePeer
2480:                                    .doSelect(criteria, con);
2481:                        }
2482:                    }
2483:                }
2484:                lastScarabModulesRelatedByQaContactIdCriteria = criteria;
2485:
2486:                return collScarabModulesRelatedByQaContactId;
2487:            }
2488:
2489:            /**
2490:             * If this collection has already been initialized with
2491:             * an identical criteria, it returns the collection.
2492:             * Otherwise if this ScarabUserImpl is new, it will return
2493:             * an empty collection; or if this ScarabUserImpl has previously
2494:             * been saved, it will retrieve related ScarabModulesRelatedByQaContactId from storage.
2495:             *
2496:             * This method is protected by default in order to keep the public
2497:             * api reasonable.  You can provide public methods for those you
2498:             * actually need in ScarabUserImpl.
2499:             */
2500:            protected List getScarabModulesRelatedByQaContactIdJoinScarabUserImplRelatedByOwnerId(
2501:                    Criteria criteria) throws TorqueException {
2502:                if (collScarabModulesRelatedByQaContactId == null) {
2503:                    if (isNew()) {
2504:                        collScarabModulesRelatedByQaContactId = new ArrayList();
2505:                    } else {
2506:                        criteria.add(ScarabModulePeer.QA_CONTACT_ID,
2507:                                getUserId());
2508:                        collScarabModulesRelatedByQaContactId = ScarabModulePeer
2509:                                .doSelectJoinScarabUserImplRelatedByOwnerId(criteria);
2510:                    }
2511:                } else {
2512:                    // the following code is to determine if a new query is
2513:                    // called for.  If the criteria is the same as the last
2514:                    // one, just return the collection.
2515:                    criteria.add(ScarabModulePeer.QA_CONTACT_ID, getUserId());
2516:                    if (!lastScarabModulesRelatedByQaContactIdCriteria
2517:                            .equals(criteria)) {
2518:                        collScarabModulesRelatedByQaContactId = ScarabModulePeer
2519:                                .doSelectJoinScarabUserImplRelatedByOwnerId(criteria);
2520:                    }
2521:                }
2522:                lastScarabModulesRelatedByQaContactIdCriteria = criteria;
2523:
2524:                return collScarabModulesRelatedByQaContactId;
2525:            }
2526:
2527:            /**
2528:             * Collection to store aggregation of collRModuleUserAttributes
2529:             */
2530:            protected List collRModuleUserAttributes;
2531:
2532:            /**
2533:             * Temporary storage of collRModuleUserAttributes to save a possible db hit in
2534:             * the event objects are add to the collection, but the
2535:             * complete collection is never requested.
2536:             */
2537:            protected void initRModuleUserAttributes() {
2538:                if (collRModuleUserAttributes == null) {
2539:                    collRModuleUserAttributes = new ArrayList();
2540:                }
2541:            }
2542:
2543:            /**
2544:             * Method called to associate a RModuleUserAttribute object to this object
2545:             * through the RModuleUserAttribute foreign key attribute
2546:             *
2547:             * @param l RModuleUserAttribute
2548:             * @throws TorqueException
2549:             */
2550:            public void addRModuleUserAttribute(RModuleUserAttribute l)
2551:                    throws TorqueException {
2552:                getRModuleUserAttributes().add(l);
2553:                l.setScarabUser((ScarabUserImpl) this );
2554:            }
2555:
2556:            /**
2557:             * The criteria used to select the current contents of collRModuleUserAttributes
2558:             */
2559:            private Criteria lastRModuleUserAttributesCriteria = null;
2560:
2561:            /**
2562:             * If this collection has already been initialized, returns
2563:             * the collection. Otherwise returns the results of
2564:             * getRModuleUserAttributes(new Criteria())
2565:             *
2566:             * @return the collection of associated objects
2567:             * @throws TorqueException
2568:             */
2569:            public List getRModuleUserAttributes() throws TorqueException {
2570:                if (collRModuleUserAttributes == null) {
2571:                    collRModuleUserAttributes = getRModuleUserAttributes(new Criteria(
2572:                            10));
2573:                }
2574:                return collRModuleUserAttributes;
2575:            }
2576:
2577:            /**
2578:             * If this collection has already been initialized with
2579:             * an identical criteria, it returns the collection.
2580:             * Otherwise if this ScarabUserImpl has previously
2581:             * been saved, it will retrieve related RModuleUserAttributes from storage.
2582:             * If this ScarabUserImpl is new, it will return
2583:             * an empty collection or the current collection, the criteria
2584:             * is ignored on a new object.
2585:             *
2586:             * @throws TorqueException
2587:             */
2588:            public List getRModuleUserAttributes(Criteria criteria)
2589:                    throws TorqueException {
2590:                if (collRModuleUserAttributes == null) {
2591:                    if (isNew()) {
2592:                        collRModuleUserAttributes = new ArrayList();
2593:                    } else {
2594:                        criteria.add(RModuleUserAttributePeer.USER_ID,
2595:                                getUserId());
2596:                        collRModuleUserAttributes = RModuleUserAttributePeer
2597:                                .doSelect(criteria);
2598:                    }
2599:                } else {
2600:                    // criteria has no effect for a new object
2601:                    if (!isNew()) {
2602:                        // the following code is to determine if a new query is
2603:                        // called for.  If the criteria is the same as the last
2604:                        // one, just return the collection.
2605:                        criteria.add(RModuleUserAttributePeer.USER_ID,
2606:                                getUserId());
2607:                        if (!lastRModuleUserAttributesCriteria.equals(criteria)) {
2608:                            collRModuleUserAttributes = RModuleUserAttributePeer
2609:                                    .doSelect(criteria);
2610:                        }
2611:                    }
2612:                }
2613:                lastRModuleUserAttributesCriteria = criteria;
2614:
2615:                return collRModuleUserAttributes;
2616:            }
2617:
2618:            /**
2619:             * If this collection has already been initialized, returns
2620:             * the collection. Otherwise returns the results of
2621:             * getRModuleUserAttributes(new Criteria(),Connection)
2622:             * This method takes in the Connection also as input so that
2623:             * referenced objects can also be obtained using a Connection
2624:             * that is taken as input
2625:             */
2626:            public List getRModuleUserAttributes(Connection con)
2627:                    throws TorqueException {
2628:                if (collRModuleUserAttributes == null) {
2629:                    collRModuleUserAttributes = getRModuleUserAttributes(
2630:                            new Criteria(10), con);
2631:                }
2632:                return collRModuleUserAttributes;
2633:            }
2634:
2635:            /**
2636:             * If this collection has already been initialized with
2637:             * an identical criteria, it returns the collection.
2638:             * Otherwise if this ScarabUserImpl has previously
2639:             * been saved, it will retrieve related RModuleUserAttributes from storage.
2640:             * If this ScarabUserImpl is new, it will return
2641:             * an empty collection or the current collection, the criteria
2642:             * is ignored on a new object.
2643:             * This method takes in the Connection also as input so that
2644:             * referenced objects can also be obtained using a Connection
2645:             * that is taken as input
2646:             */
2647:            public List getRModuleUserAttributes(Criteria criteria,
2648:                    Connection con) throws TorqueException {
2649:                if (collRModuleUserAttributes == null) {
2650:                    if (isNew()) {
2651:                        collRModuleUserAttributes = new ArrayList();
2652:                    } else {
2653:                        criteria.add(RModuleUserAttributePeer.USER_ID,
2654:                                getUserId());
2655:                        collRModuleUserAttributes = RModuleUserAttributePeer
2656:                                .doSelect(criteria, con);
2657:                    }
2658:                } else {
2659:                    // criteria has no effect for a new object
2660:                    if (!isNew()) {
2661:                        // the following code is to determine if a new query is
2662:                        // called for.  If the criteria is the same as the last
2663:                        // one, just return the collection.
2664:                        criteria.add(RModuleUserAttributePeer.USER_ID,
2665:                                getUserId());
2666:                        if (!lastRModuleUserAttributesCriteria.equals(criteria)) {
2667:                            collRModuleUserAttributes = RModuleUserAttributePeer
2668:                                    .doSelect(criteria, con);
2669:                        }
2670:                    }
2671:                }
2672:                lastRModuleUserAttributesCriteria = criteria;
2673:
2674:                return collRModuleUserAttributes;
2675:            }
2676:
2677:            /**
2678:             * If this collection has already been initialized with
2679:             * an identical criteria, it returns the collection.
2680:             * Otherwise if this ScarabUserImpl is new, it will return
2681:             * an empty collection; or if this ScarabUserImpl has previously
2682:             * been saved, it will retrieve related RModuleUserAttributes from storage.
2683:             *
2684:             * This method is protected by default in order to keep the public
2685:             * api reasonable.  You can provide public methods for those you
2686:             * actually need in ScarabUserImpl.
2687:             */
2688:            protected List getRModuleUserAttributesJoinMITList(Criteria criteria)
2689:                    throws TorqueException {
2690:                if (collRModuleUserAttributes == null) {
2691:                    if (isNew()) {
2692:                        collRModuleUserAttributes = new ArrayList();
2693:                    } else {
2694:                        criteria.add(RModuleUserAttributePeer.USER_ID,
2695:                                getUserId());
2696:                        collRModuleUserAttributes = RModuleUserAttributePeer
2697:                                .doSelectJoinMITList(criteria);
2698:                    }
2699:                } else {
2700:                    // the following code is to determine if a new query is
2701:                    // called for.  If the criteria is the same as the last
2702:                    // one, just return the collection.
2703:                    criteria.add(RModuleUserAttributePeer.USER_ID, getUserId());
2704:                    if (!lastRModuleUserAttributesCriteria.equals(criteria)) {
2705:                        collRModuleUserAttributes = RModuleUserAttributePeer
2706:                                .doSelectJoinMITList(criteria);
2707:                    }
2708:                }
2709:                lastRModuleUserAttributesCriteria = criteria;
2710:
2711:                return collRModuleUserAttributes;
2712:            }
2713:
2714:            /**
2715:             * If this collection has already been initialized with
2716:             * an identical criteria, it returns the collection.
2717:             * Otherwise if this ScarabUserImpl is new, it will return
2718:             * an empty collection; or if this ScarabUserImpl has previously
2719:             * been saved, it will retrieve related RModuleUserAttributes from storage.
2720:             *
2721:             * This method is protected by default in order to keep the public
2722:             * api reasonable.  You can provide public methods for those you
2723:             * actually need in ScarabUserImpl.
2724:             */
2725:            protected List getRModuleUserAttributesJoinScarabModule(
2726:                    Criteria criteria) throws TorqueException {
2727:                if (collRModuleUserAttributes == null) {
2728:                    if (isNew()) {
2729:                        collRModuleUserAttributes = new ArrayList();
2730:                    } else {
2731:                        criteria.add(RModuleUserAttributePeer.USER_ID,
2732:                                getUserId());
2733:                        collRModuleUserAttributes = RModuleUserAttributePeer
2734:                                .doSelectJoinScarabModule(criteria);
2735:                    }
2736:                } else {
2737:                    // the following code is to determine if a new query is
2738:                    // called for.  If the criteria is the same as the last
2739:                    // one, just return the collection.
2740:                    criteria.add(RModuleUserAttributePeer.USER_ID, getUserId());
2741:                    if (!lastRModuleUserAttributesCriteria.equals(criteria)) {
2742:                        collRModuleUserAttributes = RModuleUserAttributePeer
2743:                                .doSelectJoinScarabModule(criteria);
2744:                    }
2745:                }
2746:                lastRModuleUserAttributesCriteria = criteria;
2747:
2748:                return collRModuleUserAttributes;
2749:            }
2750:
2751:            /**
2752:             * If this collection has already been initialized with
2753:             * an identical criteria, it returns the collection.
2754:             * Otherwise if this ScarabUserImpl is new, it will return
2755:             * an empty collection; or if this ScarabUserImpl has previously
2756:             * been saved, it will retrieve related RModuleUserAttributes from storage.
2757:             *
2758:             * This method is protected by default in order to keep the public
2759:             * api reasonable.  You can provide public methods for those you
2760:             * actually need in ScarabUserImpl.
2761:             */
2762:            protected List getRModuleUserAttributesJoinScarabUserImpl(
2763:                    Criteria criteria) throws TorqueException {
2764:                if (collRModuleUserAttributes == null) {
2765:                    if (isNew()) {
2766:                        collRModuleUserAttributes = new ArrayList();
2767:                    } else {
2768:                        criteria.add(RModuleUserAttributePeer.USER_ID,
2769:                                getUserId());
2770:                        collRModuleUserAttributes = RModuleUserAttributePeer
2771:                                .doSelectJoinScarabUserImpl(criteria);
2772:                    }
2773:                } else {
2774:                    // the following code is to determine if a new query is
2775:                    // called for.  If the criteria is the same as the last
2776:                    // one, just return the collection.
2777:                    criteria.add(RModuleUserAttributePeer.USER_ID, getUserId());
2778:                    if (!lastRModuleUserAttributesCriteria.equals(criteria)) {
2779:                        collRModuleUserAttributes = RModuleUserAttributePeer
2780:                                .doSelectJoinScarabUserImpl(criteria);
2781:                    }
2782:                }
2783:                lastRModuleUserAttributesCriteria = criteria;
2784:
2785:                return collRModuleUserAttributes;
2786:            }
2787:
2788:            /**
2789:             * If this collection has already been initialized with
2790:             * an identical criteria, it returns the collection.
2791:             * Otherwise if this ScarabUserImpl is new, it will return
2792:             * an empty collection; or if this ScarabUserImpl has previously
2793:             * been saved, it will retrieve related RModuleUserAttributes from storage.
2794:             *
2795:             * This method is protected by default in order to keep the public
2796:             * api reasonable.  You can provide public methods for those you
2797:             * actually need in ScarabUserImpl.
2798:             */
2799:            protected List getRModuleUserAttributesJoinIssueType(
2800:                    Criteria criteria) throws TorqueException {
2801:                if (collRModuleUserAttributes == null) {
2802:                    if (isNew()) {
2803:                        collRModuleUserAttributes = new ArrayList();
2804:                    } else {
2805:                        criteria.add(RModuleUserAttributePeer.USER_ID,
2806:                                getUserId());
2807:                        collRModuleUserAttributes = RModuleUserAttributePeer
2808:                                .doSelectJoinIssueType(criteria);
2809:                    }
2810:                } else {
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:                    criteria.add(RModuleUserAttributePeer.USER_ID, getUserId());
2815:                    if (!lastRModuleUserAttributesCriteria.equals(criteria)) {
2816:                        collRModuleUserAttributes = RModuleUserAttributePeer
2817:                                .doSelectJoinIssueType(criteria);
2818:                    }
2819:                }
2820:                lastRModuleUserAttributesCriteria = criteria;
2821:
2822:                return collRModuleUserAttributes;
2823:            }
2824:
2825:            /**
2826:             * If this collection has already been initialized with
2827:             * an identical criteria, it returns the collection.
2828:             * Otherwise if this ScarabUserImpl is new, it will return
2829:             * an empty collection; or if this ScarabUserImpl has previously
2830:             * been saved, it will retrieve related RModuleUserAttributes from storage.
2831:             *
2832:             * This method is protected by default in order to keep the public
2833:             * api reasonable.  You can provide public methods for those you
2834:             * actually need in ScarabUserImpl.
2835:             */
2836:            protected List getRModuleUserAttributesJoinAttribute(
2837:                    Criteria criteria) throws TorqueException {
2838:                if (collRModuleUserAttributes == null) {
2839:                    if (isNew()) {
2840:                        collRModuleUserAttributes = new ArrayList();
2841:                    } else {
2842:                        criteria.add(RModuleUserAttributePeer.USER_ID,
2843:                                getUserId());
2844:                        collRModuleUserAttributes = RModuleUserAttributePeer
2845:                                .doSelectJoinAttribute(criteria);
2846:                    }
2847:                } else {
2848:                    // the following code is to determine if a new query is
2849:                    // called for.  If the criteria is the same as the last
2850:                    // one, just return the collection.
2851:                    criteria.add(RModuleUserAttributePeer.USER_ID, getUserId());
2852:                    if (!lastRModuleUserAttributesCriteria.equals(criteria)) {
2853:                        collRModuleUserAttributes = RModuleUserAttributePeer
2854:                                .doSelectJoinAttribute(criteria);
2855:                    }
2856:                }
2857:                lastRModuleUserAttributesCriteria = criteria;
2858:
2859:                return collRModuleUserAttributes;
2860:            }
2861:
2862:            /**
2863:             * Collection to store aggregation of collActivitySets
2864:             */
2865:            protected List collActivitySets;
2866:
2867:            /**
2868:             * Temporary storage of collActivitySets to save a possible db hit in
2869:             * the event objects are add to the collection, but the
2870:             * complete collection is never requested.
2871:             */
2872:            protected void initActivitySets() {
2873:                if (collActivitySets == null) {
2874:                    collActivitySets = new ArrayList();
2875:                }
2876:            }
2877:
2878:            /**
2879:             * Method called to associate a ActivitySet object to this object
2880:             * through the ActivitySet foreign key attribute
2881:             *
2882:             * @param l ActivitySet
2883:             * @throws TorqueException
2884:             */
2885:            public void addActivitySet(ActivitySet l) throws TorqueException {
2886:                getActivitySets().add(l);
2887:                l.setScarabUser((ScarabUserImpl) this );
2888:            }
2889:
2890:            /**
2891:             * The criteria used to select the current contents of collActivitySets
2892:             */
2893:            private Criteria lastActivitySetsCriteria = null;
2894:
2895:            /**
2896:             * If this collection has already been initialized, returns
2897:             * the collection. Otherwise returns the results of
2898:             * getActivitySets(new Criteria())
2899:             *
2900:             * @return the collection of associated objects
2901:             * @throws TorqueException
2902:             */
2903:            public List getActivitySets() throws TorqueException {
2904:                if (collActivitySets == null) {
2905:                    collActivitySets = getActivitySets(new Criteria(10));
2906:                }
2907:                return collActivitySets;
2908:            }
2909:
2910:            /**
2911:             * If this collection has already been initialized with
2912:             * an identical criteria, it returns the collection.
2913:             * Otherwise if this ScarabUserImpl has previously
2914:             * been saved, it will retrieve related ActivitySets from storage.
2915:             * If this ScarabUserImpl is new, it will return
2916:             * an empty collection or the current collection, the criteria
2917:             * is ignored on a new object.
2918:             *
2919:             * @throws TorqueException
2920:             */
2921:            public List getActivitySets(Criteria criteria)
2922:                    throws TorqueException {
2923:                if (collActivitySets == null) {
2924:                    if (isNew()) {
2925:                        collActivitySets = new ArrayList();
2926:                    } else {
2927:                        criteria.add(ActivitySetPeer.CREATED_BY, getUserId());
2928:                        collActivitySets = ActivitySetPeer.doSelect(criteria);
2929:                    }
2930:                } else {
2931:                    // criteria has no effect for a new object
2932:                    if (!isNew()) {
2933:                        // the following code is to determine if a new query is
2934:                        // called for.  If the criteria is the same as the last
2935:                        // one, just return the collection.
2936:                        criteria.add(ActivitySetPeer.CREATED_BY, getUserId());
2937:                        if (!lastActivitySetsCriteria.equals(criteria)) {
2938:                            collActivitySets = ActivitySetPeer
2939:                                    .doSelect(criteria);
2940:                        }
2941:                    }
2942:                }
2943:                lastActivitySetsCriteria = criteria;
2944:
2945:                return collActivitySets;
2946:            }
2947:
2948:            /**
2949:             * If this collection has already been initialized, returns
2950:             * the collection. Otherwise returns the results of
2951:             * getActivitySets(new Criteria(),Connection)
2952:             * This method takes in the Connection also as input so that
2953:             * referenced objects can also be obtained using a Connection
2954:             * that is taken as input
2955:             */
2956:            public List getActivitySets(Connection con) throws TorqueException {
2957:                if (collActivitySets == null) {
2958:                    collActivitySets = getActivitySets(new Criteria(10), con);
2959:                }
2960:                return collActivitySets;
2961:            }
2962:
2963:            /**
2964:             * If this collection has already been initialized with
2965:             * an identical criteria, it returns the collection.
2966:             * Otherwise if this ScarabUserImpl has previously
2967:             * been saved, it will retrieve related ActivitySets from storage.
2968:             * If this ScarabUserImpl is new, it will return
2969:             * an empty collection or the current collection, the criteria
2970:             * is ignored on a new object.
2971:             * This method takes in the Connection also as input so that
2972:             * referenced objects can also be obtained using a Connection
2973:             * that is taken as input
2974:             */
2975:            public List getActivitySets(Criteria criteria, Connection con)
2976:                    throws TorqueException {
2977:                if (collActivitySets == null) {
2978:                    if (isNew()) {
2979:                        collActivitySets = new ArrayList();
2980:                    } else {
2981:                        criteria.add(ActivitySetPeer.CREATED_BY, getUserId());
2982:                        collActivitySets = ActivitySetPeer.doSelect(criteria,
2983:                                con);
2984:                    }
2985:                } else {
2986:                    // criteria has no effect for a new object
2987:                    if (!isNew()) {
2988:                        // the following code is to determine if a new query is
2989:                        // called for.  If the criteria is the same as the last
2990:                        // one, just return the collection.
2991:                        criteria.add(ActivitySetPeer.CREATED_BY, getUserId());
2992:                        if (!lastActivitySetsCriteria.equals(criteria)) {
2993:                            collActivitySets = ActivitySetPeer.doSelect(
2994:                                    criteria, con);
2995:                        }
2996:                    }
2997:                }
2998:                lastActivitySetsCriteria = criteria;
2999:
3000:                return collActivitySets;
3001:            }
3002:
3003:            /**
3004:             * If this collection has already been initialized with
3005:             * an identical criteria, it returns the collection.
3006:             * Otherwise if this ScarabUserImpl is new, it will return
3007:             * an empty collection; or if this ScarabUserImpl has previously
3008:             * been saved, it will retrieve related ActivitySets from storage.
3009:             *
3010:             * This method is protected by default in order to keep the public
3011:             * api reasonable.  You can provide public methods for those you
3012:             * actually need in ScarabUserImpl.
3013:             */
3014:            protected List getActivitySetsJoinScarabUserImpl(Criteria criteria)
3015:                    throws TorqueException {
3016:                if (collActivitySets == null) {
3017:                    if (isNew()) {
3018:                        collActivitySets = new ArrayList();
3019:                    } else {
3020:                        criteria.add(ActivitySetPeer.CREATED_BY, getUserId());
3021:                        collActivitySets = ActivitySetPeer
3022:                                .doSelectJoinScarabUserImpl(criteria);
3023:                    }
3024:                } else {
3025:                    // the following code is to determine if a new query is
3026:                    // called for.  If the criteria is the same as the last
3027:                    // one, just return the collection.
3028:                    criteria.add(ActivitySetPeer.CREATED_BY, getUserId());
3029:                    if (!lastActivitySetsCriteria.equals(criteria)) {
3030:                        collActivitySets = ActivitySetPeer
3031:                                .doSelectJoinScarabUserImpl(criteria);
3032:                    }
3033:                }
3034:                lastActivitySetsCriteria = criteria;
3035:
3036:                return collActivitySets;
3037:            }
3038:
3039:            /**
3040:             * If this collection has already been initialized with
3041:             * an identical criteria, it returns the collection.
3042:             * Otherwise if this ScarabUserImpl is new, it will return
3043:             * an empty collection; or if this ScarabUserImpl has previously
3044:             * been saved, it will retrieve related ActivitySets from storage.
3045:             *
3046:             * This method is protected by default in order to keep the public
3047:             * api reasonable.  You can provide public methods for those you
3048:             * actually need in ScarabUserImpl.
3049:             */
3050:            protected List getActivitySetsJoinActivitySetType(Criteria criteria)
3051:                    throws TorqueException {
3052:                if (collActivitySets == null) {
3053:                    if (isNew()) {
3054:                        collActivitySets = new ArrayList();
3055:                    } else {
3056:                        criteria.add(ActivitySetPeer.CREATED_BY, getUserId());
3057:                        collActivitySets = ActivitySetPeer
3058:                                .doSelectJoinActivitySetType(criteria);
3059:                    }
3060:                } else {
3061:                    // the following code is to determine if a new query is
3062:                    // called for.  If the criteria is the same as the last
3063:                    // one, just return the collection.
3064:                    criteria.add(ActivitySetPeer.CREATED_BY, getUserId());
3065:                    if (!lastActivitySetsCriteria.equals(criteria)) {
3066:                        collActivitySets = ActivitySetPeer
3067:                                .doSelectJoinActivitySetType(criteria);
3068:                    }
3069:                }
3070:                lastActivitySetsCriteria = criteria;
3071:
3072:                return collActivitySets;
3073:            }
3074:
3075:            /**
3076:             * If this collection has already been initialized with
3077:             * an identical criteria, it returns the collection.
3078:             * Otherwise if this ScarabUserImpl is new, it will return
3079:             * an empty collection; or if this ScarabUserImpl has previously
3080:             * been saved, it will retrieve related ActivitySets from storage.
3081:             *
3082:             * This method is protected by default in order to keep the public
3083:             * api reasonable.  You can provide public methods for those you
3084:             * actually need in ScarabUserImpl.
3085:             */
3086:            protected List getActivitySetsJoinAttachment(Criteria criteria)
3087:                    throws TorqueException {
3088:                if (collActivitySets == null) {
3089:                    if (isNew()) {
3090:                        collActivitySets = new ArrayList();
3091:                    } else {
3092:                        criteria.add(ActivitySetPeer.CREATED_BY, getUserId());
3093:                        collActivitySets = ActivitySetPeer
3094:                                .doSelectJoinAttachment(criteria);
3095:                    }
3096:                } else {
3097:                    // the following code is to determine if a new query is
3098:                    // called for.  If the criteria is the same as the last
3099:                    // one, just return the collection.
3100:                    criteria.add(ActivitySetPeer.CREATED_BY, getUserId());
3101:                    if (!lastActivitySetsCriteria.equals(criteria)) {
3102:                        collActivitySets = ActivitySetPeer
3103:                                .doSelectJoinAttachment(criteria);
3104:                    }
3105:                }
3106:                lastActivitySetsCriteria = criteria;
3107:
3108:                return collActivitySets;
3109:            }
3110:
3111:            /**
3112:             * Collection to store aggregation of collUserPreferences
3113:             */
3114:            protected List collUserPreferences;
3115:
3116:            /**
3117:             * Temporary storage of collUserPreferences to save a possible db hit in
3118:             * the event objects are add to the collection, but the
3119:             * complete collection is never requested.
3120:             */
3121:            protected void initUserPreferences() {
3122:                if (collUserPreferences == null) {
3123:                    collUserPreferences = new ArrayList();
3124:                }
3125:            }
3126:
3127:            /**
3128:             * Method called to associate a UserPreference object to this object
3129:             * through the UserPreference foreign key attribute
3130:             *
3131:             * @param l UserPreference
3132:             * @throws TorqueException
3133:             */
3134:            public void addUserPreference(UserPreference l)
3135:                    throws TorqueException {
3136:                getUserPreferences().add(l);
3137:                l.setScarabUser((ScarabUserImpl) this );
3138:            }
3139:
3140:            /**
3141:             * The criteria used to select the current contents of collUserPreferences
3142:             */
3143:            private Criteria lastUserPreferencesCriteria = null;
3144:
3145:            /**
3146:             * If this collection has already been initialized, returns
3147:             * the collection. Otherwise returns the results of
3148:             * getUserPreferences(new Criteria())
3149:             *
3150:             * @return the collection of associated objects
3151:             * @throws TorqueException
3152:             */
3153:            public List getUserPreferences() throws TorqueException {
3154:                if (collUserPreferences == null) {
3155:                    collUserPreferences = getUserPreferences(new Criteria(10));
3156:                }
3157:                return collUserPreferences;
3158:            }
3159:
3160:            /**
3161:             * If this collection has already been initialized with
3162:             * an identical criteria, it returns the collection.
3163:             * Otherwise if this ScarabUserImpl has previously
3164:             * been saved, it will retrieve related UserPreferences from storage.
3165:             * If this ScarabUserImpl is new, it will return
3166:             * an empty collection or the current collection, the criteria
3167:             * is ignored on a new object.
3168:             *
3169:             * @throws TorqueException
3170:             */
3171:            public List getUserPreferences(Criteria criteria)
3172:                    throws TorqueException {
3173:                if (collUserPreferences == null) {
3174:                    if (isNew()) {
3175:                        collUserPreferences = new ArrayList();
3176:                    } else {
3177:                        criteria.add(UserPreferencePeer.USER_ID, getUserId());
3178:                        collUserPreferences = UserPreferencePeer
3179:                                .doSelect(criteria);
3180:                    }
3181:                } else {
3182:                    // criteria has no effect for a new object
3183:                    if (!isNew()) {
3184:                        // the following code is to determine if a new query is
3185:                        // called for.  If the criteria is the same as the last
3186:                        // one, just return the collection.
3187:                        criteria.add(UserPreferencePeer.USER_ID, getUserId());
3188:                        if (!lastUserPreferencesCriteria.equals(criteria)) {
3189:                            collUserPreferences = UserPreferencePeer
3190:                                    .doSelect(criteria);
3191:                        }
3192:                    }
3193:                }
3194:                lastUserPreferencesCriteria = criteria;
3195:
3196:                return collUserPreferences;
3197:            }
3198:
3199:            /**
3200:             * If this collection has already been initialized, returns
3201:             * the collection. Otherwise returns the results of
3202:             * getUserPreferences(new Criteria(),Connection)
3203:             * This method takes in the Connection also as input so that
3204:             * referenced objects can also be obtained using a Connection
3205:             * that is taken as input
3206:             */
3207:            public List getUserPreferences(Connection con)
3208:                    throws TorqueException {
3209:                if (collUserPreferences == null) {
3210:                    collUserPreferences = getUserPreferences(new Criteria(10),
3211:                            con);
3212:                }
3213:                return collUserPreferences;
3214:            }
3215:
3216:            /**
3217:             * If this collection has already been initialized with
3218:             * an identical criteria, it returns the collection.
3219:             * Otherwise if this ScarabUserImpl has previously
3220:             * been saved, it will retrieve related UserPreferences from storage.
3221:             * If this ScarabUserImpl is new, it will return
3222:             * an empty collection or the current collection, the criteria
3223:             * is ignored on a new object.
3224:             * This method takes in the Connection also as input so that
3225:             * referenced objects can also be obtained using a Connection
3226:             * that is taken as input
3227:             */
3228:            public List getUserPreferences(Criteria criteria, Connection con)
3229:                    throws TorqueException {
3230:                if (collUserPreferences == null) {
3231:                    if (isNew()) {
3232:                        collUserPreferences = new ArrayList();
3233:                    } else {
3234:                        criteria.add(UserPreferencePeer.USER_ID, getUserId());
3235:                        collUserPreferences = UserPreferencePeer.doSelect(
3236:                                criteria, con);
3237:                    }
3238:                } else {
3239:                    // criteria has no effect for a new object
3240:                    if (!isNew()) {
3241:                        // the following code is to determine if a new query is
3242:                        // called for.  If the criteria is the same as the last
3243:                        // one, just return the collection.
3244:                        criteria.add(UserPreferencePeer.USER_ID, getUserId());
3245:                        if (!lastUserPreferencesCriteria.equals(criteria)) {
3246:                            collUserPreferences = UserPreferencePeer.doSelect(
3247:                                    criteria, con);
3248:                        }
3249:                    }
3250:                }
3251:                lastUserPreferencesCriteria = criteria;
3252:
3253:                return collUserPreferences;
3254:            }
3255:
3256:            /**
3257:             * If this collection has already been initialized with
3258:             * an identical criteria, it returns the collection.
3259:             * Otherwise if this ScarabUserImpl is new, it will return
3260:             * an empty collection; or if this ScarabUserImpl has previously
3261:             * been saved, it will retrieve related UserPreferences from storage.
3262:             *
3263:             * This method is protected by default in order to keep the public
3264:             * api reasonable.  You can provide public methods for those you
3265:             * actually need in ScarabUserImpl.
3266:             */
3267:            protected List getUserPreferencesJoinScarabUserImpl(
3268:                    Criteria criteria) throws TorqueException {
3269:                if (collUserPreferences == null) {
3270:                    if (isNew()) {
3271:                        collUserPreferences = new ArrayList();
3272:                    } else {
3273:                        criteria.add(UserPreferencePeer.USER_ID, getUserId());
3274:                        collUserPreferences = UserPreferencePeer
3275:                                .doSelectJoinScarabUserImpl(criteria);
3276:                    }
3277:                } else {
3278:                    // the following code is to determine if a new query is
3279:                    // called for.  If the criteria is the same as the last
3280:                    // one, just return the collection.
3281:                    criteria.add(UserPreferencePeer.USER_ID, getUserId());
3282:                    if (!lastUserPreferencesCriteria.equals(criteria)) {
3283:                        collUserPreferences = UserPreferencePeer
3284:                                .doSelectJoinScarabUserImpl(criteria);
3285:                    }
3286:                }
3287:                lastUserPreferencesCriteria = criteria;
3288:
3289:                return collUserPreferences;
3290:            }
3291:
3292:            /**
3293:             * Collection to store aggregation of collUserVotes
3294:             */
3295:            protected List collUserVotes;
3296:
3297:            /**
3298:             * Temporary storage of collUserVotes to save a possible db hit in
3299:             * the event objects are add to the collection, but the
3300:             * complete collection is never requested.
3301:             */
3302:            protected void initUserVotes() {
3303:                if (collUserVotes == null) {
3304:                    collUserVotes = new ArrayList();
3305:                }
3306:            }
3307:
3308:            /**
3309:             * Method called to associate a UserVote object to this object
3310:             * through the UserVote foreign key attribute
3311:             *
3312:             * @param l UserVote
3313:             * @throws TorqueException
3314:             */
3315:            public void addUserVote(UserVote l) throws TorqueException {
3316:                getUserVotes().add(l);
3317:                l.setScarabUser((ScarabUserImpl) this );
3318:            }
3319:
3320:            /**
3321:             * The criteria used to select the current contents of collUserVotes
3322:             */
3323:            private Criteria lastUserVotesCriteria = null;
3324:
3325:            /**
3326:             * If this collection has already been initialized, returns
3327:             * the collection. Otherwise returns the results of
3328:             * getUserVotes(new Criteria())
3329:             *
3330:             * @return the collection of associated objects
3331:             * @throws TorqueException
3332:             */
3333:            public List getUserVotes() throws TorqueException {
3334:                if (collUserVotes == null) {
3335:                    collUserVotes = getUserVotes(new Criteria(10));
3336:                }
3337:                return collUserVotes;
3338:            }
3339:
3340:            /**
3341:             * If this collection has already been initialized with
3342:             * an identical criteria, it returns the collection.
3343:             * Otherwise if this ScarabUserImpl has previously
3344:             * been saved, it will retrieve related UserVotes from storage.
3345:             * If this ScarabUserImpl is new, it will return
3346:             * an empty collection or the current collection, the criteria
3347:             * is ignored on a new object.
3348:             *
3349:             * @throws TorqueException
3350:             */
3351:            public List getUserVotes(Criteria criteria) throws TorqueException {
3352:                if (collUserVotes == null) {
3353:                    if (isNew()) {
3354:                        collUserVotes = new ArrayList();
3355:                    } else {
3356:                        criteria.add(UserVotePeer.USER_ID, getUserId());
3357:                        collUserVotes = UserVotePeer.doSelect(criteria);
3358:                    }
3359:                } else {
3360:                    // criteria has no effect for a new object
3361:                    if (!isNew()) {
3362:                        // the following code is to determine if a new query is
3363:                        // called for.  If the criteria is the same as the last
3364:                        // one, just return the collection.
3365:                        criteria.add(UserVotePeer.USER_ID, getUserId());
3366:                        if (!lastUserVotesCriteria.equals(criteria)) {
3367:                            collUserVotes = UserVotePeer.doSelect(criteria);
3368:                        }
3369:                    }
3370:                }
3371:                lastUserVotesCriteria = criteria;
3372:
3373:                return collUserVotes;
3374:            }
3375:
3376:            /**
3377:             * If this collection has already been initialized, returns
3378:             * the collection. Otherwise returns the results of
3379:             * getUserVotes(new Criteria(),Connection)
3380:             * This method takes in the Connection also as input so that
3381:             * referenced objects can also be obtained using a Connection
3382:             * that is taken as input
3383:             */
3384:            public List getUserVotes(Connection con) throws TorqueException {
3385:                if (collUserVotes == null) {
3386:                    collUserVotes = getUserVotes(new Criteria(10), con);
3387:                }
3388:                return collUserVotes;
3389:            }
3390:
3391:            /**
3392:             * If this collection has already been initialized with
3393:             * an identical criteria, it returns the collection.
3394:             * Otherwise if this ScarabUserImpl has previously
3395:             * been saved, it will retrieve related UserVotes from storage.
3396:             * If this ScarabUserImpl is new, it will return
3397:             * an empty collection or the current collection, the criteria
3398:             * is ignored on a new object.
3399:             * This method takes in the Connection also as input so that
3400:             * referenced objects can also be obtained using a Connection
3401:             * that is taken as input
3402:             */
3403:            public List getUserVotes(Criteria criteria, Connection con)
3404:                    throws TorqueException {
3405:                if (collUserVotes == null) {
3406:                    if (isNew()) {
3407:                        collUserVotes = new ArrayList();
3408:                    } else {
3409:                        criteria.add(UserVotePeer.USER_ID, getUserId());
3410:                        collUserVotes = UserVotePeer.doSelect(criteria, con);
3411:                    }
3412:                } else {
3413:                    // criteria has no effect for a new object
3414:                    if (!isNew()) {
3415:                        // the following code is to determine if a new query is
3416:                        // called for.  If the criteria is the same as the last
3417:                        // one, just return the collection.
3418:                        criteria.add(UserVotePeer.USER_ID, getUserId());
3419:                        if (!lastUserVotesCriteria.equals(criteria)) {
3420:                            collUserVotes = UserVotePeer
3421:                                    .doSelect(criteria, con);
3422:                        }
3423:                    }
3424:                }
3425:                lastUserVotesCriteria = criteria;
3426:
3427:                return collUserVotes;
3428:            }
3429:
3430:            /**
3431:             * If this collection has already been initialized with
3432:             * an identical criteria, it returns the collection.
3433:             * Otherwise if this ScarabUserImpl is new, it will return
3434:             * an empty collection; or if this ScarabUserImpl has previously
3435:             * been saved, it will retrieve related UserVotes from storage.
3436:             *
3437:             * This method is protected by default in order to keep the public
3438:             * api reasonable.  You can provide public methods for those you
3439:             * actually need in ScarabUserImpl.
3440:             */
3441:            protected List getUserVotesJoinScarabModule(Criteria criteria)
3442:                    throws TorqueException {
3443:                if (collUserVotes == null) {
3444:                    if (isNew()) {
3445:                        collUserVotes = new ArrayList();
3446:                    } else {
3447:                        criteria.add(UserVotePeer.USER_ID, getUserId());
3448:                        collUserVotes = UserVotePeer
3449:                                .doSelectJoinScarabModule(criteria);
3450:                    }
3451:                } else {
3452:                    // the following code is to determine if a new query is
3453:                    // called for.  If the criteria is the same as the last
3454:                    // one, just return the collection.
3455:                    criteria.add(UserVotePeer.USER_ID, getUserId());
3456:                    if (!lastUserVotesCriteria.equals(criteria)) {
3457:                        collUserVotes = UserVotePeer
3458:                                .doSelectJoinScarabModule(criteria);
3459:                    }
3460:                }
3461:                lastUserVotesCriteria = criteria;
3462:
3463:                return collUserVotes;
3464:            }
3465:
3466:            /**
3467:             * If this collection has already been initialized with
3468:             * an identical criteria, it returns the collection.
3469:             * Otherwise if this ScarabUserImpl is new, it will return
3470:             * an empty collection; or if this ScarabUserImpl has previously
3471:             * been saved, it will retrieve related UserVotes from storage.
3472:             *
3473:             * This method is protected by default in order to keep the public
3474:             * api reasonable.  You can provide public methods for those you
3475:             * actually need in ScarabUserImpl.
3476:             */
3477:            protected List getUserVotesJoinScarabUserImpl(Criteria criteria)
3478:                    throws TorqueException {
3479:                if (collUserVotes == null) {
3480:                    if (isNew()) {
3481:                        collUserVotes = new ArrayList();
3482:                    } else {
3483:                        criteria.add(UserVotePeer.USER_ID, getUserId());
3484:                        collUserVotes = UserVotePeer
3485:                                .doSelectJoinScarabUserImpl(criteria);
3486:                    }
3487:                } else {
3488:                    // the following code is to determine if a new query is
3489:                    // called for.  If the criteria is the same as the last
3490:                    // one, just return the collection.
3491:                    criteria.add(UserVotePeer.USER_ID, getUserId());
3492:                    if (!lastUserVotesCriteria.equals(criteria)) {
3493:                        collUserVotes = UserVotePeer
3494:                                .doSelectJoinScarabUserImpl(criteria);
3495:                    }
3496:                }
3497:                lastUserVotesCriteria = criteria;
3498:
3499:                return collUserVotes;
3500:            }
3501:
3502:            /**
3503:             * Collection to store aggregation of collIssueVotes
3504:             */
3505:            protected List collIssueVotes;
3506:
3507:            /**
3508:             * Temporary storage of collIssueVotes to save a possible db hit in
3509:             * the event objects are add to the collection, but the
3510:             * complete collection is never requested.
3511:             */
3512:            protected void initIssueVotes() {
3513:                if (collIssueVotes == null) {
3514:                    collIssueVotes = new ArrayList();
3515:                }
3516:            }
3517:
3518:            /**
3519:             * Method called to associate a IssueVote object to this object
3520:             * through the IssueVote foreign key attribute
3521:             *
3522:             * @param l IssueVote
3523:             * @throws TorqueException
3524:             */
3525:            public void addIssueVote(IssueVote l) throws TorqueException {
3526:                getIssueVotes().add(l);
3527:                l.setScarabUser((ScarabUserImpl) this );
3528:            }
3529:
3530:            /**
3531:             * The criteria used to select the current contents of collIssueVotes
3532:             */
3533:            private Criteria lastIssueVotesCriteria = null;
3534:
3535:            /**
3536:             * If this collection has already been initialized, returns
3537:             * the collection. Otherwise returns the results of
3538:             * getIssueVotes(new Criteria())
3539:             *
3540:             * @return the collection of associated objects
3541:             * @throws TorqueException
3542:             */
3543:            public List getIssueVotes() throws TorqueException {
3544:                if (collIssueVotes == null) {
3545:                    collIssueVotes = getIssueVotes(new Criteria(10));
3546:                }
3547:                return collIssueVotes;
3548:            }
3549:
3550:            /**
3551:             * If this collection has already been initialized with
3552:             * an identical criteria, it returns the collection.
3553:             * Otherwise if this ScarabUserImpl has previously
3554:             * been saved, it will retrieve related IssueVotes from storage.
3555:             * If this ScarabUserImpl is new, it will return
3556:             * an empty collection or the current collection, the criteria
3557:             * is ignored on a new object.
3558:             *
3559:             * @throws TorqueException
3560:             */
3561:            public List getIssueVotes(Criteria criteria) throws TorqueException {
3562:                if (collIssueVotes == null) {
3563:                    if (isNew()) {
3564:                        collIssueVotes = new ArrayList();
3565:                    } else {
3566:                        criteria.add(IssueVotePeer.USER_ID, getUserId());
3567:                        collIssueVotes = IssueVotePeer.doSelect(criteria);
3568:                    }
3569:                } else {
3570:                    // criteria has no effect for a new object
3571:                    if (!isNew()) {
3572:                        // the following code is to determine if a new query is
3573:                        // called for.  If the criteria is the same as the last
3574:                        // one, just return the collection.
3575:                        criteria.add(IssueVotePeer.USER_ID, getUserId());
3576:                        if (!lastIssueVotesCriteria.equals(criteria)) {
3577:                            collIssueVotes = IssueVotePeer.doSelect(criteria);
3578:                        }
3579:                    }
3580:                }
3581:                lastIssueVotesCriteria = criteria;
3582:
3583:                return collIssueVotes;
3584:            }
3585:
3586:            /**
3587:             * If this collection has already been initialized, returns
3588:             * the collection. Otherwise returns the results of
3589:             * getIssueVotes(new Criteria(),Connection)
3590:             * This method takes in the Connection also as input so that
3591:             * referenced objects can also be obtained using a Connection
3592:             * that is taken as input
3593:             */
3594:            public List getIssueVotes(Connection con) throws TorqueException {
3595:                if (collIssueVotes == null) {
3596:                    collIssueVotes = getIssueVotes(new Criteria(10), con);
3597:                }
3598:                return collIssueVotes;
3599:            }
3600:
3601:            /**
3602:             * If this collection has already been initialized with
3603:             * an identical criteria, it returns the collection.
3604:             * Otherwise if this ScarabUserImpl has previously
3605:             * been saved, it will retrieve related IssueVotes from storage.
3606:             * If this ScarabUserImpl is new, it will return
3607:             * an empty collection or the current collection, the criteria
3608:             * is ignored on a new object.
3609:             * This method takes in the Connection also as input so that
3610:             * referenced objects can also be obtained using a Connection
3611:             * that is taken as input
3612:             */
3613:            public List getIssueVotes(Criteria criteria, Connection con)
3614:                    throws TorqueException {
3615:                if (collIssueVotes == null) {
3616:                    if (isNew()) {
3617:                        collIssueVotes = new ArrayList();
3618:                    } else {
3619:                        criteria.add(IssueVotePeer.USER_ID, getUserId());
3620:                        collIssueVotes = IssueVotePeer.doSelect(criteria, con);
3621:                    }
3622:                } else {
3623:                    // criteria has no effect for a new object
3624:                    if (!isNew()) {
3625:                        // the following code is to determine if a new query is
3626:                        // called for.  If the criteria is the same as the last
3627:                        // one, just return the collection.
3628:                        criteria.add(IssueVotePeer.USER_ID, getUserId());
3629:                        if (!lastIssueVotesCriteria.equals(criteria)) {
3630:                            collIssueVotes = IssueVotePeer.doSelect(criteria,
3631:                                    con);
3632:                        }
3633:                    }
3634:                }
3635:                lastIssueVotesCriteria = criteria;
3636:
3637:                return collIssueVotes;
3638:            }
3639:
3640:            /**
3641:             * If this collection has already been initialized with
3642:             * an identical criteria, it returns the collection.
3643:             * Otherwise if this ScarabUserImpl is new, it will return
3644:             * an empty collection; or if this ScarabUserImpl has previously
3645:             * been saved, it will retrieve related IssueVotes from storage.
3646:             *
3647:             * This method is protected by default in order to keep the public
3648:             * api reasonable.  You can provide public methods for those you
3649:             * actually need in ScarabUserImpl.
3650:             */
3651:            protected List getIssueVotesJoinIssue(Criteria criteria)
3652:                    throws TorqueException {
3653:                if (collIssueVotes == null) {
3654:                    if (isNew()) {
3655:                        collIssueVotes = new ArrayList();
3656:                    } else {
3657:                        criteria.add(IssueVotePeer.USER_ID, getUserId());
3658:                        collIssueVotes = IssueVotePeer
3659:                                .doSelectJoinIssue(criteria);
3660:                    }
3661:                } else {
3662:                    // the following code is to determine if a new query is
3663:                    // called for.  If the criteria is the same as the last
3664:                    // one, just return the collection.
3665:                    criteria.add(IssueVotePeer.USER_ID, getUserId());
3666:                    if (!lastIssueVotesCriteria.equals(criteria)) {
3667:                        collIssueVotes = IssueVotePeer
3668:                                .doSelectJoinIssue(criteria);
3669:                    }
3670:                }
3671:                lastIssueVotesCriteria = criteria;
3672:
3673:                return collIssueVotes;
3674:            }
3675:
3676:            /**
3677:             * If this collection has already been initialized with
3678:             * an identical criteria, it returns the collection.
3679:             * Otherwise if this ScarabUserImpl is new, it will return
3680:             * an empty collection; or if this ScarabUserImpl has previously
3681:             * been saved, it will retrieve related IssueVotes from storage.
3682:             *
3683:             * This method is protected by default in order to keep the public
3684:             * api reasonable.  You can provide public methods for those you
3685:             * actually need in ScarabUserImpl.
3686:             */
3687:            protected List getIssueVotesJoinScarabUserImpl(Criteria criteria)
3688:                    throws TorqueException {
3689:                if (collIssueVotes == null) {
3690:                    if (isNew()) {
3691:                        collIssueVotes = new ArrayList();
3692:                    } else {
3693:                        criteria.add(IssueVotePeer.USER_ID, getUserId());
3694:                        collIssueVotes = IssueVotePeer
3695:                                .doSelectJoinScarabUserImpl(criteria);
3696:                    }
3697:                } else {
3698:                    // the following code is to determine if a new query is
3699:                    // called for.  If the criteria is the same as the last
3700:                    // one, just return the collection.
3701:                    criteria.add(IssueVotePeer.USER_ID, getUserId());
3702:                    if (!lastIssueVotesCriteria.equals(criteria)) {
3703:                        collIssueVotes = IssueVotePeer
3704:                                .doSelectJoinScarabUserImpl(criteria);
3705:                    }
3706:                }
3707:                lastIssueVotesCriteria = criteria;
3708:
3709:                return collIssueVotes;
3710:            }
3711:
3712:            /**
3713:             * Collection to store aggregation of collQuerys
3714:             */
3715:            protected List collQuerys;
3716:
3717:            /**
3718:             * Temporary storage of collQuerys to save a possible db hit in
3719:             * the event objects are add to the collection, but the
3720:             * complete collection is never requested.
3721:             */
3722:            protected void initQuerys() {
3723:                if (collQuerys == null) {
3724:                    collQuerys = new ArrayList();
3725:                }
3726:            }
3727:
3728:            /**
3729:             * Method called to associate a Query object to this object
3730:             * through the Query foreign key attribute
3731:             *
3732:             * @param l Query
3733:             * @throws TorqueException
3734:             */
3735:            public void addQuery(Query l) throws TorqueException {
3736:                getQuerys().add(l);
3737:                l.setScarabUser((ScarabUserImpl) this );
3738:            }
3739:
3740:            /**
3741:             * The criteria used to select the current contents of collQuerys
3742:             */
3743:            private Criteria lastQuerysCriteria = null;
3744:
3745:            /**
3746:             * If this collection has already been initialized, returns
3747:             * the collection. Otherwise returns the results of
3748:             * getQuerys(new Criteria())
3749:             *
3750:             * @return the collection of associated objects
3751:             * @throws TorqueException
3752:             */
3753:            public List getQuerys() throws TorqueException {
3754:                if (collQuerys == null) {
3755:                    collQuerys = getQuerys(new Criteria(10));
3756:                }
3757:                return collQuerys;
3758:            }
3759:
3760:            /**
3761:             * If this collection has already been initialized with
3762:             * an identical criteria, it returns the collection.
3763:             * Otherwise if this ScarabUserImpl has previously
3764:             * been saved, it will retrieve related Querys from storage.
3765:             * If this ScarabUserImpl is new, it will return
3766:             * an empty collection or the current collection, the criteria
3767:             * is ignored on a new object.
3768:             *
3769:             * @throws TorqueException
3770:             */
3771:            public List getQuerys(Criteria criteria) throws TorqueException {
3772:                if (collQuerys == null) {
3773:                    if (isNew()) {
3774:                        collQuerys = new ArrayList();
3775:                    } else {
3776:                        criteria.add(QueryPeer.USER_ID, getUserId());
3777:                        collQuerys = QueryPeer.doSelect(criteria);
3778:                    }
3779:                } else {
3780:                    // criteria has no effect for a new object
3781:                    if (!isNew()) {
3782:                        // the following code is to determine if a new query is
3783:                        // called for.  If the criteria is the same as the last
3784:                        // one, just return the collection.
3785:                        criteria.add(QueryPeer.USER_ID, getUserId());
3786:                        if (!lastQuerysCriteria.equals(criteria)) {
3787:                            collQuerys = QueryPeer.doSelect(criteria);
3788:                        }
3789:                    }
3790:                }
3791:                lastQuerysCriteria = criteria;
3792:
3793:                return collQuerys;
3794:            }
3795:
3796:            /**
3797:             * If this collection has already been initialized, returns
3798:             * the collection. Otherwise returns the results of
3799:             * getQuerys(new Criteria(),Connection)
3800:             * This method takes in the Connection also as input so that
3801:             * referenced objects can also be obtained using a Connection
3802:             * that is taken as input
3803:             */
3804:            public List getQuerys(Connection con) throws TorqueException {
3805:                if (collQuerys == null) {
3806:                    collQuerys = getQuerys(new Criteria(10), con);
3807:                }
3808:                return collQuerys;
3809:            }
3810:
3811:            /**
3812:             * If this collection has already been initialized with
3813:             * an identical criteria, it returns the collection.
3814:             * Otherwise if this ScarabUserImpl has previously
3815:             * been saved, it will retrieve related Querys from storage.
3816:             * If this ScarabUserImpl is new, it will return
3817:             * an empty collection or the current collection, the criteria
3818:             * is ignored on a new object.
3819:             * This method takes in the Connection also as input so that
3820:             * referenced objects can also be obtained using a Connection
3821:             * that is taken as input
3822:             */
3823:            public List getQuerys(Criteria criteria, Connection con)
3824:                    throws TorqueException {
3825:                if (collQuerys == null) {
3826:                    if (isNew()) {
3827:                        collQuerys = new ArrayList();
3828:                    } else {
3829:                        criteria.add(QueryPeer.USER_ID, getUserId());
3830:                        collQuerys = QueryPeer.doSelect(criteria, con);
3831:                    }
3832:                } else {
3833:                    // criteria has no effect for a new object
3834:                    if (!isNew()) {
3835:                        // the following code is to determine if a new query is
3836:                        // called for.  If the criteria is the same as the last
3837:                        // one, just return the collection.
3838:                        criteria.add(QueryPeer.USER_ID, getUserId());
3839:                        if (!lastQuerysCriteria.equals(criteria)) {
3840:                            collQuerys = QueryPeer.doSelect(criteria, con);
3841:                        }
3842:                    }
3843:                }
3844:                lastQuerysCriteria = criteria;
3845:
3846:                return collQuerys;
3847:            }
3848:
3849:            /**
3850:             * If this collection has already been initialized with
3851:             * an identical criteria, it returns the collection.
3852:             * Otherwise if this ScarabUserImpl is new, it will return
3853:             * an empty collection; or if this ScarabUserImpl has previously
3854:             * been saved, it will retrieve related Querys from storage.
3855:             *
3856:             * This method is protected by default in order to keep the public
3857:             * api reasonable.  You can provide public methods for those you
3858:             * actually need in ScarabUserImpl.
3859:             */
3860:            protected List getQuerysJoinScarabUserImpl(Criteria criteria)
3861:                    throws TorqueException {
3862:                if (collQuerys == null) {
3863:                    if (isNew()) {
3864:                        collQuerys = new ArrayList();
3865:                    } else {
3866:                        criteria.add(QueryPeer.USER_ID, getUserId());
3867:                        collQuerys = QueryPeer
3868:                                .doSelectJoinScarabUserImpl(criteria);
3869:                    }
3870:                } else {
3871:                    // the following code is to determine if a new query is
3872:                    // called for.  If the criteria is the same as the last
3873:                    // one, just return the collection.
3874:                    criteria.add(QueryPeer.USER_ID, getUserId());
3875:                    if (!lastQuerysCriteria.equals(criteria)) {
3876:                        collQuerys = QueryPeer
3877:                                .doSelectJoinScarabUserImpl(criteria);
3878:                    }
3879:                }
3880:                lastQuerysCriteria = criteria;
3881:
3882:                return collQuerys;
3883:            }
3884:
3885:            /**
3886:             * If this collection has already been initialized with
3887:             * an identical criteria, it returns the collection.
3888:             * Otherwise if this ScarabUserImpl is new, it will return
3889:             * an empty collection; or if this ScarabUserImpl has previously
3890:             * been saved, it will retrieve related Querys from storage.
3891:             *
3892:             * This method is protected by default in order to keep the public
3893:             * api reasonable.  You can provide public methods for those you
3894:             * actually need in ScarabUserImpl.
3895:             */
3896:            protected List getQuerysJoinScope(Criteria criteria)
3897:                    throws TorqueException {
3898:                if (collQuerys == null) {
3899:                    if (isNew()) {
3900:                        collQuerys = new ArrayList();
3901:                    } else {
3902:                        criteria.add(QueryPeer.USER_ID, getUserId());
3903:                        collQuerys = QueryPeer.doSelectJoinScope(criteria);
3904:                    }
3905:                } else {
3906:                    // the following code is to determine if a new query is
3907:                    // called for.  If the criteria is the same as the last
3908:                    // one, just return the collection.
3909:                    criteria.add(QueryPeer.USER_ID, getUserId());
3910:                    if (!lastQuerysCriteria.equals(criteria)) {
3911:                        collQuerys = QueryPeer.doSelectJoinScope(criteria);
3912:                    }
3913:                }
3914:                lastQuerysCriteria = criteria;
3915:
3916:                return collQuerys;
3917:            }
3918:
3919:            /**
3920:             * If this collection has already been initialized with
3921:             * an identical criteria, it returns the collection.
3922:             * Otherwise if this ScarabUserImpl is new, it will return
3923:             * an empty collection; or if this ScarabUserImpl has previously
3924:             * been saved, it will retrieve related Querys from storage.
3925:             *
3926:             * This method is protected by default in order to keep the public
3927:             * api reasonable.  You can provide public methods for those you
3928:             * actually need in ScarabUserImpl.
3929:             */
3930:            protected List getQuerysJoinScarabModule(Criteria criteria)
3931:                    throws TorqueException {
3932:                if (collQuerys == null) {
3933:                    if (isNew()) {
3934:                        collQuerys = new ArrayList();
3935:                    } else {
3936:                        criteria.add(QueryPeer.USER_ID, getUserId());
3937:                        collQuerys = QueryPeer
3938:                                .doSelectJoinScarabModule(criteria);
3939:                    }
3940:                } else {
3941:                    // the following code is to determine if a new query is
3942:                    // called for.  If the criteria is the same as the last
3943:                    // one, just return the collection.
3944:                    criteria.add(QueryPeer.USER_ID, getUserId());
3945:                    if (!lastQuerysCriteria.equals(criteria)) {
3946:                        collQuerys = QueryPeer
3947:                                .doSelectJoinScarabModule(criteria);
3948:                    }
3949:                }
3950:                lastQuerysCriteria = criteria;
3951:
3952:                return collQuerys;
3953:            }
3954:
3955:            /**
3956:             * If this collection has already been initialized with
3957:             * an identical criteria, it returns the collection.
3958:             * Otherwise if this ScarabUserImpl is new, it will return
3959:             * an empty collection; or if this ScarabUserImpl has previously
3960:             * been saved, it will retrieve related Querys from storage.
3961:             *
3962:             * This method is protected by default in order to keep the public
3963:             * api reasonable.  You can provide public methods for those you
3964:             * actually need in ScarabUserImpl.
3965:             */
3966:            protected List getQuerysJoinIssueType(Criteria criteria)
3967:                    throws TorqueException {
3968:                if (collQuerys == null) {
3969:                    if (isNew()) {
3970:                        collQuerys = new ArrayList();
3971:                    } else {
3972:                        criteria.add(QueryPeer.USER_ID, getUserId());
3973:                        collQuerys = QueryPeer.doSelectJoinIssueType(criteria);
3974:                    }
3975:                } else {
3976:                    // the following code is to determine if a new query is
3977:                    // called for.  If the criteria is the same as the last
3978:                    // one, just return the collection.
3979:                    criteria.add(QueryPeer.USER_ID, getUserId());
3980:                    if (!lastQuerysCriteria.equals(criteria)) {
3981:                        collQuerys = QueryPeer.doSelectJoinIssueType(criteria);
3982:                    }
3983:                }
3984:                lastQuerysCriteria = criteria;
3985:
3986:                return collQuerys;
3987:            }
3988:
3989:            /**
3990:             * If this collection has already been initialized with
3991:             * an identical criteria, it returns the collection.
3992:             * Otherwise if this ScarabUserImpl is new, it will return
3993:             * an empty collection; or if this ScarabUserImpl has previously
3994:             * been saved, it will retrieve related Querys from storage.
3995:             *
3996:             * This method is protected by default in order to keep the public
3997:             * api reasonable.  You can provide public methods for those you
3998:             * actually need in ScarabUserImpl.
3999:             */
4000:            protected List getQuerysJoinMITList(Criteria criteria)
4001:                    throws TorqueException {
4002:                if (collQuerys == null) {
4003:                    if (isNew()) {
4004:                        collQuerys = new ArrayList();
4005:                    } else {
4006:                        criteria.add(QueryPeer.USER_ID, getUserId());
4007:                        collQuerys = QueryPeer.doSelectJoinMITList(criteria);
4008:                    }
4009:                } else {
4010:                    // the following code is to determine if a new query is
4011:                    // called for.  If the criteria is the same as the last
4012:                    // one, just return the collection.
4013:                    criteria.add(QueryPeer.USER_ID, getUserId());
4014:                    if (!lastQuerysCriteria.equals(criteria)) {
4015:                        collQuerys = QueryPeer.doSelectJoinMITList(criteria);
4016:                    }
4017:                }
4018:                lastQuerysCriteria = criteria;
4019:
4020:                return collQuerys;
4021:            }
4022:
4023:            /**
4024:             * If this collection has already been initialized with
4025:             * an identical criteria, it returns the collection.
4026:             * Otherwise if this ScarabUserImpl is new, it will return
4027:             * an empty collection; or if this ScarabUserImpl has previously
4028:             * been saved, it will retrieve related Querys from storage.
4029:             *
4030:             * This method is protected by default in order to keep the public
4031:             * api reasonable.  You can provide public methods for those you
4032:             * actually need in ScarabUserImpl.
4033:             */
4034:            protected List getQuerysJoinFrequency(Criteria criteria)
4035:                    throws TorqueException {
4036:                if (collQuerys == null) {
4037:                    if (isNew()) {
4038:                        collQuerys = new ArrayList();
4039:                    } else {
4040:                        criteria.add(QueryPeer.USER_ID, getUserId());
4041:                        collQuerys = QueryPeer.doSelectJoinFrequency(criteria);
4042:                    }
4043:                } else {
4044:                    // the following code is to determine if a new query is
4045:                    // called for.  If the criteria is the same as the last
4046:                    // one, just return the collection.
4047:                    criteria.add(QueryPeer.USER_ID, getUserId());
4048:                    if (!lastQuerysCriteria.equals(criteria)) {
4049:                        collQuerys = QueryPeer.doSelectJoinFrequency(criteria);
4050:                    }
4051:                }
4052:                lastQuerysCriteria = criteria;
4053:
4054:                return collQuerys;
4055:            }
4056:
4057:            /**
4058:             * Collection to store aggregation of collRQueryUsers
4059:             */
4060:            protected List collRQueryUsers;
4061:
4062:            /**
4063:             * Temporary storage of collRQueryUsers to save a possible db hit in
4064:             * the event objects are add to the collection, but the
4065:             * complete collection is never requested.
4066:             */
4067:            protected void initRQueryUsers() {
4068:                if (collRQueryUsers == null) {
4069:                    collRQueryUsers = new ArrayList();
4070:                }
4071:            }
4072:
4073:            /**
4074:             * Method called to associate a RQueryUser object to this object
4075:             * through the RQueryUser foreign key attribute
4076:             *
4077:             * @param l RQueryUser
4078:             * @throws TorqueException
4079:             */
4080:            public void addRQueryUser(RQueryUser l) throws TorqueException {
4081:                getRQueryUsers().add(l);
4082:                l.setScarabUser((ScarabUserImpl) this );
4083:            }
4084:
4085:            /**
4086:             * The criteria used to select the current contents of collRQueryUsers
4087:             */
4088:            private Criteria lastRQueryUsersCriteria = null;
4089:
4090:            /**
4091:             * If this collection has already been initialized, returns
4092:             * the collection. Otherwise returns the results of
4093:             * getRQueryUsers(new Criteria())
4094:             *
4095:             * @return the collection of associated objects
4096:             * @throws TorqueException
4097:             */
4098:            public List getRQueryUsers() throws TorqueException {
4099:                if (collRQueryUsers == null) {
4100:                    collRQueryUsers = getRQueryUsers(new Criteria(10));
4101:                }
4102:                return collRQueryUsers;
4103:            }
4104:
4105:            /**
4106:             * If this collection has already been initialized with
4107:             * an identical criteria, it returns the collection.
4108:             * Otherwise if this ScarabUserImpl has previously
4109:             * been saved, it will retrieve related RQueryUsers from storage.
4110:             * If this ScarabUserImpl is new, it will return
4111:             * an empty collection or the current collection, the criteria
4112:             * is ignored on a new object.
4113:             *
4114:             * @throws TorqueException
4115:             */
4116:            public List getRQueryUsers(Criteria criteria)
4117:                    throws TorqueException {
4118:                if (collRQueryUsers == null) {
4119:                    if (isNew()) {
4120:                        collRQueryUsers = new ArrayList();
4121:                    } else {
4122:                        criteria.add(RQueryUserPeer.USER_ID, getUserId());
4123:                        collRQueryUsers = RQueryUserPeer.doSelect(criteria);
4124:                    }
4125:                } else {
4126:                    // criteria has no effect for a new object
4127:                    if (!isNew()) {
4128:                        // the following code is to determine if a new query is
4129:                        // called for.  If the criteria is the same as the last
4130:                        // one, just return the collection.
4131:                        criteria.add(RQueryUserPeer.USER_ID, getUserId());
4132:                        if (!lastRQueryUsersCriteria.equals(criteria)) {
4133:                            collRQueryUsers = RQueryUserPeer.doSelect(criteria);
4134:                        }
4135:                    }
4136:                }
4137:                lastRQueryUsersCriteria = criteria;
4138:
4139:                return collRQueryUsers;
4140:            }
4141:
4142:            /**
4143:             * If this collection has already been initialized, returns
4144:             * the collection. Otherwise returns the results of
4145:             * getRQueryUsers(new Criteria(),Connection)
4146:             * This method takes in the Connection also as input so that
4147:             * referenced objects can also be obtained using a Connection
4148:             * that is taken as input
4149:             */
4150:            public List getRQueryUsers(Connection con) throws TorqueException {
4151:                if (collRQueryUsers == null) {
4152:                    collRQueryUsers = getRQueryUsers(new Criteria(10), con);
4153:                }
4154:                return collRQueryUsers;
4155:            }
4156:
4157:            /**
4158:             * If this collection has already been initialized with
4159:             * an identical criteria, it returns the collection.
4160:             * Otherwise if this ScarabUserImpl has previously
4161:             * been saved, it will retrieve related RQueryUsers from storage.
4162:             * If this ScarabUserImpl is new, it will return
4163:             * an empty collection or the current collection, the criteria
4164:             * is ignored on a new object.
4165:             * This method takes in the Connection also as input so that
4166:             * referenced objects can also be obtained using a Connection
4167:             * that is taken as input
4168:             */
4169:            public List getRQueryUsers(Criteria criteria, Connection con)
4170:                    throws TorqueException {
4171:                if (collRQueryUsers == null) {
4172:                    if (isNew()) {
4173:                        collRQueryUsers = new ArrayList();
4174:                    } else {
4175:                        criteria.add(RQueryUserPeer.USER_ID, getUserId());
4176:                        collRQueryUsers = RQueryUserPeer
4177:                                .doSelect(criteria, con);
4178:                    }
4179:                } else {
4180:                    // criteria has no effect for a new object
4181:                    if (!isNew()) {
4182:                        // the following code is to determine if a new query is
4183:                        // called for.  If the criteria is the same as the last
4184:                        // one, just return the collection.
4185:                        criteria.add(RQueryUserPeer.USER_ID, getUserId());
4186:                        if (!lastRQueryUsersCriteria.equals(criteria)) {
4187:                            collRQueryUsers = RQueryUserPeer.doSelect(criteria,
4188:                                    con);
4189:                        }
4190:                    }
4191:                }
4192:                lastRQueryUsersCriteria = criteria;
4193:
4194:                return collRQueryUsers;
4195:            }
4196:
4197:            /**
4198:             * If this collection has already been initialized with
4199:             * an identical criteria, it returns the collection.
4200:             * Otherwise if this ScarabUserImpl is new, it will return
4201:             * an empty collection; or if this ScarabUserImpl has previously
4202:             * been saved, it will retrieve related RQueryUsers from storage.
4203:             *
4204:             * This method is protected by default in order to keep the public
4205:             * api reasonable.  You can provide public methods for those you
4206:             * actually need in ScarabUserImpl.
4207:             */
4208:            protected List getRQueryUsersJoinQuery(Criteria criteria)
4209:                    throws TorqueException {
4210:                if (collRQueryUsers == null) {
4211:                    if (isNew()) {
4212:                        collRQueryUsers = new ArrayList();
4213:                    } else {
4214:                        criteria.add(RQueryUserPeer.USER_ID, getUserId());
4215:                        collRQueryUsers = RQueryUserPeer
4216:                                .doSelectJoinQuery(criteria);
4217:                    }
4218:                } else {
4219:                    // the following code is to determine if a new query is
4220:                    // called for.  If the criteria is the same as the last
4221:                    // one, just return the collection.
4222:                    criteria.add(RQueryUserPeer.USER_ID, getUserId());
4223:                    if (!lastRQueryUsersCriteria.equals(criteria)) {
4224:                        collRQueryUsers = RQueryUserPeer
4225:                                .doSelectJoinQuery(criteria);
4226:                    }
4227:                }
4228:                lastRQueryUsersCriteria = criteria;
4229:
4230:                return collRQueryUsers;
4231:            }
4232:
4233:            /**
4234:             * If this collection has already been initialized with
4235:             * an identical criteria, it returns the collection.
4236:             * Otherwise if this ScarabUserImpl is new, it will return
4237:             * an empty collection; or if this ScarabUserImpl has previously
4238:             * been saved, it will retrieve related RQueryUsers from storage.
4239:             *
4240:             * This method is protected by default in order to keep the public
4241:             * api reasonable.  You can provide public methods for those you
4242:             * actually need in ScarabUserImpl.
4243:             */
4244:            protected List getRQueryUsersJoinScarabUserImpl(Criteria criteria)
4245:                    throws TorqueException {
4246:                if (collRQueryUsers == null) {
4247:                    if (isNew()) {
4248:                        collRQueryUsers = new ArrayList();
4249:                    } else {
4250:                        criteria.add(RQueryUserPeer.USER_ID, getUserId());
4251:                        collRQueryUsers = RQueryUserPeer
4252:                                .doSelectJoinScarabUserImpl(criteria);
4253:                    }
4254:                } else {
4255:                    // the following code is to determine if a new query is
4256:                    // called for.  If the criteria is the same as the last
4257:                    // one, just return the collection.
4258:                    criteria.add(RQueryUserPeer.USER_ID, getUserId());
4259:                    if (!lastRQueryUsersCriteria.equals(criteria)) {
4260:                        collRQueryUsers = RQueryUserPeer
4261:                                .doSelectJoinScarabUserImpl(criteria);
4262:                    }
4263:                }
4264:                lastRQueryUsersCriteria = criteria;
4265:
4266:                return collRQueryUsers;
4267:            }
4268:
4269:            /**
4270:             * If this collection has already been initialized with
4271:             * an identical criteria, it returns the collection.
4272:             * Otherwise if this ScarabUserImpl is new, it will return
4273:             * an empty collection; or if this ScarabUserImpl has previously
4274:             * been saved, it will retrieve related RQueryUsers from storage.
4275:             *
4276:             * This method is protected by default in order to keep the public
4277:             * api reasonable.  You can provide public methods for those you
4278:             * actually need in ScarabUserImpl.
4279:             */
4280:            protected List getRQueryUsersJoinFrequency(Criteria criteria)
4281:                    throws TorqueException {
4282:                if (collRQueryUsers == null) {
4283:                    if (isNew()) {
4284:                        collRQueryUsers = new ArrayList();
4285:                    } else {
4286:                        criteria.add(RQueryUserPeer.USER_ID, getUserId());
4287:                        collRQueryUsers = RQueryUserPeer
4288:                                .doSelectJoinFrequency(criteria);
4289:                    }
4290:                } else {
4291:                    // the following code is to determine if a new query is
4292:                    // called for.  If the criteria is the same as the last
4293:                    // one, just return the collection.
4294:                    criteria.add(RQueryUserPeer.USER_ID, getUserId());
4295:                    if (!lastRQueryUsersCriteria.equals(criteria)) {
4296:                        collRQueryUsers = RQueryUserPeer
4297:                                .doSelectJoinFrequency(criteria);
4298:                    }
4299:                }
4300:                lastRQueryUsersCriteria = criteria;
4301:
4302:                return collRQueryUsers;
4303:            }
4304:
4305:            /**
4306:             * Collection to store aggregation of collReports
4307:             */
4308:            protected List collReports;
4309:
4310:            /**
4311:             * Temporary storage of collReports to save a possible db hit in
4312:             * the event objects are add to the collection, but the
4313:             * complete collection is never requested.
4314:             */
4315:            protected void initReports() {
4316:                if (collReports == null) {
4317:                    collReports = new ArrayList();
4318:                }
4319:            }
4320:
4321:            /**
4322:             * Method called to associate a Report object to this object
4323:             * through the Report foreign key attribute
4324:             *
4325:             * @param l Report
4326:             * @throws TorqueException
4327:             */
4328:            public void addReport(Report l) throws TorqueException {
4329:                getReports().add(l);
4330:                l.setScarabUser((ScarabUserImpl) this );
4331:            }
4332:
4333:            /**
4334:             * The criteria used to select the current contents of collReports
4335:             */
4336:            private Criteria lastReportsCriteria = null;
4337:
4338:            /**
4339:             * If this collection has already been initialized, returns
4340:             * the collection. Otherwise returns the results of
4341:             * getReports(new Criteria())
4342:             *
4343:             * @return the collection of associated objects
4344:             * @throws TorqueException
4345:             */
4346:            public List getReports() throws TorqueException {
4347:                if (collReports == null) {
4348:                    collReports = getReports(new Criteria(10));
4349:                }
4350:                return collReports;
4351:            }
4352:
4353:            /**
4354:             * If this collection has already been initialized with
4355:             * an identical criteria, it returns the collection.
4356:             * Otherwise if this ScarabUserImpl has previously
4357:             * been saved, it will retrieve related Reports from storage.
4358:             * If this ScarabUserImpl is new, it will return
4359:             * an empty collection or the current collection, the criteria
4360:             * is ignored on a new object.
4361:             *
4362:             * @throws TorqueException
4363:             */
4364:            public List getReports(Criteria criteria) throws TorqueException {
4365:                if (collReports == null) {
4366:                    if (isNew()) {
4367:                        collReports = new ArrayList();
4368:                    } else {
4369:                        criteria.add(ReportPeer.USER_ID, getUserId());
4370:                        collReports = ReportPeer.doSelect(criteria);
4371:                    }
4372:                } else {
4373:                    // criteria has no effect for a new object
4374:                    if (!isNew()) {
4375:                        // the following code is to determine if a new query is
4376:                        // called for.  If the criteria is the same as the last
4377:                        // one, just return the collection.
4378:                        criteria.add(ReportPeer.USER_ID, getUserId());
4379:                        if (!lastReportsCriteria.equals(criteria)) {
4380:                            collReports = ReportPeer.doSelect(criteria);
4381:                        }
4382:                    }
4383:                }
4384:                lastReportsCriteria = criteria;
4385:
4386:                return collReports;
4387:            }
4388:
4389:            /**
4390:             * If this collection has already been initialized, returns
4391:             * the collection. Otherwise returns the results of
4392:             * getReports(new Criteria(),Connection)
4393:             * This method takes in the Connection also as input so that
4394:             * referenced objects can also be obtained using a Connection
4395:             * that is taken as input
4396:             */
4397:            public List getReports(Connection con) throws TorqueException {
4398:                if (collReports == null) {
4399:                    collReports = getReports(new Criteria(10), con);
4400:                }
4401:                return collReports;
4402:            }
4403:
4404:            /**
4405:             * If this collection has already been initialized with
4406:             * an identical criteria, it returns the collection.
4407:             * Otherwise if this ScarabUserImpl has previously
4408:             * been saved, it will retrieve related Reports from storage.
4409:             * If this ScarabUserImpl is new, it will return
4410:             * an empty collection or the current collection, the criteria
4411:             * is ignored on a new object.
4412:             * This method takes in the Connection also as input so that
4413:             * referenced objects can also be obtained using a Connection
4414:             * that is taken as input
4415:             */
4416:            public List getReports(Criteria criteria, Connection con)
4417:                    throws TorqueException {
4418:                if (collReports == null) {
4419:                    if (isNew()) {
4420:                        collReports = new ArrayList();
4421:                    } else {
4422:                        criteria.add(ReportPeer.USER_ID, getUserId());
4423:                        collReports = ReportPeer.doSelect(criteria, con);
4424:                    }
4425:                } else {
4426:                    // criteria has no effect for a new object
4427:                    if (!isNew()) {
4428:                        // the following code is to determine if a new query is
4429:                        // called for.  If the criteria is the same as the last
4430:                        // one, just return the collection.
4431:                        criteria.add(ReportPeer.USER_ID, getUserId());
4432:                        if (!lastReportsCriteria.equals(criteria)) {
4433:                            collReports = ReportPeer.doSelect(criteria, con);
4434:                        }
4435:                    }
4436:                }
4437:                lastReportsCriteria = criteria;
4438:
4439:                return collReports;
4440:            }
4441:
4442:            /**
4443:             * If this collection has already been initialized with
4444:             * an identical criteria, it returns the collection.
4445:             * Otherwise if this ScarabUserImpl is new, it will return
4446:             * an empty collection; or if this ScarabUserImpl has previously
4447:             * been saved, it will retrieve related Reports from storage.
4448:             *
4449:             * This method is protected by default in order to keep the public
4450:             * api reasonable.  You can provide public methods for those you
4451:             * actually need in ScarabUserImpl.
4452:             */
4453:            protected List getReportsJoinIssueType(Criteria criteria)
4454:                    throws TorqueException {
4455:                if (collReports == null) {
4456:                    if (isNew()) {
4457:                        collReports = new ArrayList();
4458:                    } else {
4459:                        criteria.add(ReportPeer.USER_ID, getUserId());
4460:                        collReports = ReportPeer
4461:                                .doSelectJoinIssueType(criteria);
4462:                    }
4463:                } else {
4464:                    // the following code is to determine if a new query is
4465:                    // called for.  If the criteria is the same as the last
4466:                    // one, just return the collection.
4467:                    criteria.add(ReportPeer.USER_ID, getUserId());
4468:                    if (!lastReportsCriteria.equals(criteria)) {
4469:                        collReports = ReportPeer
4470:                                .doSelectJoinIssueType(criteria);
4471:                    }
4472:                }
4473:                lastReportsCriteria = criteria;
4474:
4475:                return collReports;
4476:            }
4477:
4478:            /**
4479:             * If this collection has already been initialized with
4480:             * an identical criteria, it returns the collection.
4481:             * Otherwise if this ScarabUserImpl is new, it will return
4482:             * an empty collection; or if this ScarabUserImpl has previously
4483:             * been saved, it will retrieve related Reports from storage.
4484:             *
4485:             * This method is protected by default in order to keep the public
4486:             * api reasonable.  You can provide public methods for those you
4487:             * actually need in ScarabUserImpl.
4488:             */
4489:            protected List getReportsJoinScarabUserImpl(Criteria criteria)
4490:                    throws TorqueException {
4491:                if (collReports == null) {
4492:                    if (isNew()) {
4493:                        collReports = new ArrayList();
4494:                    } else {
4495:                        criteria.add(ReportPeer.USER_ID, getUserId());
4496:                        collReports = ReportPeer
4497:                                .doSelectJoinScarabUserImpl(criteria);
4498:                    }
4499:                } else {
4500:                    // the following code is to determine if a new query is
4501:                    // called for.  If the criteria is the same as the last
4502:                    // one, just return the collection.
4503:                    criteria.add(ReportPeer.USER_ID, getUserId());
4504:                    if (!lastReportsCriteria.equals(criteria)) {
4505:                        collReports = ReportPeer
4506:                                .doSelectJoinScarabUserImpl(criteria);
4507:                    }
4508:                }
4509:                lastReportsCriteria = criteria;
4510:
4511:                return collReports;
4512:            }
4513:
4514:            /**
4515:             * If this collection has already been initialized with
4516:             * an identical criteria, it returns the collection.
4517:             * Otherwise if this ScarabUserImpl is new, it will return
4518:             * an empty collection; or if this ScarabUserImpl has previously
4519:             * been saved, it will retrieve related Reports from storage.
4520:             *
4521:             * This method is protected by default in order to keep the public
4522:             * api reasonable.  You can provide public methods for those you
4523:             * actually need in ScarabUserImpl.
4524:             */
4525:            protected List getReportsJoinScarabModule(Criteria criteria)
4526:                    throws TorqueException {
4527:                if (collReports == null) {
4528:                    if (isNew()) {
4529:                        collReports = new ArrayList();
4530:                    } else {
4531:                        criteria.add(ReportPeer.USER_ID, getUserId());
4532:                        collReports = ReportPeer
4533:                                .doSelectJoinScarabModule(criteria);
4534:                    }
4535:                } else {
4536:                    // the following code is to determine if a new query is
4537:                    // called for.  If the criteria is the same as the last
4538:                    // one, just return the collection.
4539:                    criteria.add(ReportPeer.USER_ID, getUserId());
4540:                    if (!lastReportsCriteria.equals(criteria)) {
4541:                        collReports = ReportPeer
4542:                                .doSelectJoinScarabModule(criteria);
4543:                    }
4544:                }
4545:                lastReportsCriteria = criteria;
4546:
4547:                return collReports;
4548:            }
4549:
4550:            /**
4551:             * If this collection has already been initialized with
4552:             * an identical criteria, it returns the collection.
4553:             * Otherwise if this ScarabUserImpl is new, it will return
4554:             * an empty collection; or if this ScarabUserImpl has previously
4555:             * been saved, it will retrieve related Reports from storage.
4556:             *
4557:             * This method is protected by default in order to keep the public
4558:             * api reasonable.  You can provide public methods for those you
4559:             * actually need in ScarabUserImpl.
4560:             */
4561:            protected List getReportsJoinScope(Criteria criteria)
4562:                    throws TorqueException {
4563:                if (collReports == null) {
4564:                    if (isNew()) {
4565:                        collReports = new ArrayList();
4566:                    } else {
4567:                        criteria.add(ReportPeer.USER_ID, getUserId());
4568:                        collReports = ReportPeer.doSelectJoinScope(criteria);
4569:                    }
4570:                } else {
4571:                    // the following code is to determine if a new query is
4572:                    // called for.  If the criteria is the same as the last
4573:                    // one, just return the collection.
4574:                    criteria.add(ReportPeer.USER_ID, getUserId());
4575:                    if (!lastReportsCriteria.equals(criteria)) {
4576:                        collReports = ReportPeer.doSelectJoinScope(criteria);
4577:                    }
4578:                }
4579:                lastReportsCriteria = criteria;
4580:
4581:                return collReports;
4582:            }
4583:
4584:            /**
4585:             * Collection to store aggregation of collPendingGroupUserRoles
4586:             */
4587:            protected List collPendingGroupUserRoles;
4588:
4589:            /**
4590:             * Temporary storage of collPendingGroupUserRoles to save a possible db hit in
4591:             * the event objects are add to the collection, but the
4592:             * complete collection is never requested.
4593:             */
4594:            protected void initPendingGroupUserRoles() {
4595:                if (collPendingGroupUserRoles == null) {
4596:                    collPendingGroupUserRoles = new ArrayList();
4597:                }
4598:            }
4599:
4600:            /**
4601:             * Method called to associate a PendingGroupUserRole object to this object
4602:             * through the PendingGroupUserRole foreign key attribute
4603:             *
4604:             * @param l PendingGroupUserRole
4605:             * @throws TorqueException
4606:             */
4607:            public void addPendingGroupUserRole(PendingGroupUserRole l)
4608:                    throws TorqueException {
4609:                getPendingGroupUserRoles().add(l);
4610:                l.setScarabUser((ScarabUserImpl) this );
4611:            }
4612:
4613:            /**
4614:             * The criteria used to select the current contents of collPendingGroupUserRoles
4615:             */
4616:            private Criteria lastPendingGroupUserRolesCriteria = null;
4617:
4618:            /**
4619:             * If this collection has already been initialized, returns
4620:             * the collection. Otherwise returns the results of
4621:             * getPendingGroupUserRoles(new Criteria())
4622:             *
4623:             * @return the collection of associated objects
4624:             * @throws TorqueException
4625:             */
4626:            public List getPendingGroupUserRoles() throws TorqueException {
4627:                if (collPendingGroupUserRoles == null) {
4628:                    collPendingGroupUserRoles = getPendingGroupUserRoles(new Criteria(
4629:                            10));
4630:                }
4631:                return collPendingGroupUserRoles;
4632:            }
4633:
4634:            /**
4635:             * If this collection has already been initialized with
4636:             * an identical criteria, it returns the collection.
4637:             * Otherwise if this ScarabUserImpl has previously
4638:             * been saved, it will retrieve related PendingGroupUserRoles from storage.
4639:             * If this ScarabUserImpl is new, it will return
4640:             * an empty collection or the current collection, the criteria
4641:             * is ignored on a new object.
4642:             *
4643:             * @throws TorqueException
4644:             */
4645:            public List getPendingGroupUserRoles(Criteria criteria)
4646:                    throws TorqueException {
4647:                if (collPendingGroupUserRoles == null) {
4648:                    if (isNew()) {
4649:                        collPendingGroupUserRoles = new ArrayList();
4650:                    } else {
4651:                        criteria.add(PendingGroupUserRolePeer.USER_ID,
4652:                                getUserId());
4653:                        collPendingGroupUserRoles = PendingGroupUserRolePeer
4654:                                .doSelect(criteria);
4655:                    }
4656:                } else {
4657:                    // criteria has no effect for a new object
4658:                    if (!isNew()) {
4659:                        // the following code is to determine if a new query is
4660:                        // called for.  If the criteria is the same as the last
4661:                        // one, just return the collection.
4662:                        criteria.add(PendingGroupUserRolePeer.USER_ID,
4663:                                getUserId());
4664:                        if (!lastPendingGroupUserRolesCriteria.equals(criteria)) {
4665:                            collPendingGroupUserRoles = PendingGroupUserRolePeer
4666:                                    .doSelect(criteria);
4667:                        }
4668:                    }
4669:                }
4670:                lastPendingGroupUserRolesCriteria = criteria;
4671:
4672:                return collPendingGroupUserRoles;
4673:            }
4674:
4675:            /**
4676:             * If this collection has already been initialized, returns
4677:             * the collection. Otherwise returns the results of
4678:             * getPendingGroupUserRoles(new Criteria(),Connection)
4679:             * This method takes in the Connection also as input so that
4680:             * referenced objects can also be obtained using a Connection
4681:             * that is taken as input
4682:             */
4683:            public List getPendingGroupUserRoles(Connection con)
4684:                    throws TorqueException {
4685:                if (collPendingGroupUserRoles == null) {
4686:                    collPendingGroupUserRoles = getPendingGroupUserRoles(
4687:                            new Criteria(10), con);
4688:                }
4689:                return collPendingGroupUserRoles;
4690:            }
4691:
4692:            /**
4693:             * If this collection has already been initialized with
4694:             * an identical criteria, it returns the collection.
4695:             * Otherwise if this ScarabUserImpl has previously
4696:             * been saved, it will retrieve related PendingGroupUserRoles from storage.
4697:             * If this ScarabUserImpl is new, it will return
4698:             * an empty collection or the current collection, the criteria
4699:             * is ignored on a new object.
4700:             * This method takes in the Connection also as input so that
4701:             * referenced objects can also be obtained using a Connection
4702:             * that is taken as input
4703:             */
4704:            public List getPendingGroupUserRoles(Criteria criteria,
4705:                    Connection con) throws TorqueException {
4706:                if (collPendingGroupUserRoles == null) {
4707:                    if (isNew()) {
4708:                        collPendingGroupUserRoles = new ArrayList();
4709:                    } else {
4710:                        criteria.add(PendingGroupUserRolePeer.USER_ID,
4711:                                getUserId());
4712:                        collPendingGroupUserRoles = PendingGroupUserRolePeer
4713:                                .doSelect(criteria, con);
4714:                    }
4715:                } else {
4716:                    // criteria has no effect for a new object
4717:                    if (!isNew()) {
4718:                        // the following code is to determine if a new query is
4719:                        // called for.  If the criteria is the same as the last
4720:                        // one, just return the collection.
4721:                        criteria.add(PendingGroupUserRolePeer.USER_ID,
4722:                                getUserId());
4723:                        if (!lastPendingGroupUserRolesCriteria.equals(criteria)) {
4724:                            collPendingGroupUserRoles = PendingGroupUserRolePeer
4725:                                    .doSelect(criteria, con);
4726:                        }
4727:                    }
4728:                }
4729:                lastPendingGroupUserRolesCriteria = criteria;
4730:
4731:                return collPendingGroupUserRoles;
4732:            }
4733:
4734:            /**
4735:             * If this collection has already been initialized with
4736:             * an identical criteria, it returns the collection.
4737:             * Otherwise if this ScarabUserImpl is new, it will return
4738:             * an empty collection; or if this ScarabUserImpl has previously
4739:             * been saved, it will retrieve related PendingGroupUserRoles from storage.
4740:             *
4741:             * This method is protected by default in order to keep the public
4742:             * api reasonable.  You can provide public methods for those you
4743:             * actually need in ScarabUserImpl.
4744:             */
4745:            protected List getPendingGroupUserRolesJoinScarabUserImpl(
4746:                    Criteria criteria) throws TorqueException {
4747:                if (collPendingGroupUserRoles == null) {
4748:                    if (isNew()) {
4749:                        collPendingGroupUserRoles = new ArrayList();
4750:                    } else {
4751:                        criteria.add(PendingGroupUserRolePeer.USER_ID,
4752:                                getUserId());
4753:                        collPendingGroupUserRoles = PendingGroupUserRolePeer
4754:                                .doSelectJoinScarabUserImpl(criteria);
4755:                    }
4756:                } else {
4757:                    // the following code is to determine if a new query is
4758:                    // called for.  If the criteria is the same as the last
4759:                    // one, just return the collection.
4760:                    criteria.add(PendingGroupUserRolePeer.USER_ID, getUserId());
4761:                    if (!lastPendingGroupUserRolesCriteria.equals(criteria)) {
4762:                        collPendingGroupUserRoles = PendingGroupUserRolePeer
4763:                                .doSelectJoinScarabUserImpl(criteria);
4764:                    }
4765:                }
4766:                lastPendingGroupUserRolesCriteria = criteria;
4767:
4768:                return collPendingGroupUserRoles;
4769:            }
4770:
4771:            /**
4772:             * If this collection has already been initialized with
4773:             * an identical criteria, it returns the collection.
4774:             * Otherwise if this ScarabUserImpl is new, it will return
4775:             * an empty collection; or if this ScarabUserImpl has previously
4776:             * been saved, it will retrieve related PendingGroupUserRoles from storage.
4777:             *
4778:             * This method is protected by default in order to keep the public
4779:             * api reasonable.  You can provide public methods for those you
4780:             * actually need in ScarabUserImpl.
4781:             */
4782:            protected List getPendingGroupUserRolesJoinScarabModule(
4783:                    Criteria criteria) throws TorqueException {
4784:                if (collPendingGroupUserRoles == null) {
4785:                    if (isNew()) {
4786:                        collPendingGroupUserRoles = new ArrayList();
4787:                    } else {
4788:                        criteria.add(PendingGroupUserRolePeer.USER_ID,
4789:                                getUserId());
4790:                        collPendingGroupUserRoles = PendingGroupUserRolePeer
4791:                                .doSelectJoinScarabModule(criteria);
4792:                    }
4793:                } else {
4794:                    // the following code is to determine if a new query is
4795:                    // called for.  If the criteria is the same as the last
4796:                    // one, just return the collection.
4797:                    criteria.add(PendingGroupUserRolePeer.USER_ID, getUserId());
4798:                    if (!lastPendingGroupUserRolesCriteria.equals(criteria)) {
4799:                        collPendingGroupUserRoles = PendingGroupUserRolePeer
4800:                                .doSelectJoinScarabModule(criteria);
4801:                    }
4802:                }
4803:                lastPendingGroupUserRolesCriteria = criteria;
4804:
4805:                return collPendingGroupUserRoles;
4806:            }
4807:
4808:            /**
4809:             * Collection to store aggregation of collNotificationStatuss
4810:             */
4811:            protected List collNotificationStatuss;
4812:
4813:            /**
4814:             * Temporary storage of collNotificationStatuss to save a possible db hit in
4815:             * the event objects are add to the collection, but the
4816:             * complete collection is never requested.
4817:             */
4818:            protected void initNotificationStatuss() {
4819:                if (collNotificationStatuss == null) {
4820:                    collNotificationStatuss = new ArrayList();
4821:                }
4822:            }
4823:
4824:            /**
4825:             * Method called to associate a NotificationStatus object to this object
4826:             * through the NotificationStatus foreign key attribute
4827:             *
4828:             * @param l NotificationStatus
4829:             * @throws TorqueException
4830:             */
4831:            public void addNotificationStatus(NotificationStatus l)
4832:                    throws TorqueException {
4833:                getNotificationStatuss().add(l);
4834:                l.setScarabUser((ScarabUserImpl) this );
4835:            }
4836:
4837:            /**
4838:             * The criteria used to select the current contents of collNotificationStatuss
4839:             */
4840:            private Criteria lastNotificationStatussCriteria = null;
4841:
4842:            /**
4843:             * If this collection has already been initialized, returns
4844:             * the collection. Otherwise returns the results of
4845:             * getNotificationStatuss(new Criteria())
4846:             *
4847:             * @return the collection of associated objects
4848:             * @throws TorqueException
4849:             */
4850:            public List getNotificationStatuss() throws TorqueException {
4851:                if (collNotificationStatuss == null) {
4852:                    collNotificationStatuss = getNotificationStatuss(new Criteria(
4853:                            10));
4854:                }
4855:                return collNotificationStatuss;
4856:            }
4857:
4858:            /**
4859:             * If this collection has already been initialized with
4860:             * an identical criteria, it returns the collection.
4861:             * Otherwise if this ScarabUserImpl has previously
4862:             * been saved, it will retrieve related NotificationStatuss from storage.
4863:             * If this ScarabUserImpl is new, it will return
4864:             * an empty collection or the current collection, the criteria
4865:             * is ignored on a new object.
4866:             *
4867:             * @throws TorqueException
4868:             */
4869:            public List getNotificationStatuss(Criteria criteria)
4870:                    throws TorqueException {
4871:                if (collNotificationStatuss == null) {
4872:                    if (isNew()) {
4873:                        collNotificationStatuss = new ArrayList();
4874:                    } else {
4875:                        criteria.add(NotificationStatusPeer.CREATOR_ID,
4876:                                getUserId());
4877:                        collNotificationStatuss = NotificationStatusPeer
4878:                                .doSelect(criteria);
4879:                    }
4880:                } else {
4881:                    // criteria has no effect for a new object
4882:                    if (!isNew()) {
4883:                        // the following code is to determine if a new query is
4884:                        // called for.  If the criteria is the same as the last
4885:                        // one, just return the collection.
4886:                        criteria.add(NotificationStatusPeer.CREATOR_ID,
4887:                                getUserId());
4888:                        if (!lastNotificationStatussCriteria.equals(criteria)) {
4889:                            collNotificationStatuss = NotificationStatusPeer
4890:                                    .doSelect(criteria);
4891:                        }
4892:                    }
4893:                }
4894:                lastNotificationStatussCriteria = criteria;
4895:
4896:                return collNotificationStatuss;
4897:            }
4898:
4899:            /**
4900:             * If this collection has already been initialized, returns
4901:             * the collection. Otherwise returns the results of
4902:             * getNotificationStatuss(new Criteria(),Connection)
4903:             * This method takes in the Connection also as input so that
4904:             * referenced objects can also be obtained using a Connection
4905:             * that is taken as input
4906:             */
4907:            public List getNotificationStatuss(Connection con)
4908:                    throws TorqueException {
4909:                if (collNotificationStatuss == null) {
4910:                    collNotificationStatuss = getNotificationStatuss(
4911:                            new Criteria(10), con);
4912:                }
4913:                return collNotificationStatuss;
4914:            }
4915:
4916:            /**
4917:             * If this collection has already been initialized with
4918:             * an identical criteria, it returns the collection.
4919:             * Otherwise if this ScarabUserImpl has previously
4920:             * been saved, it will retrieve related NotificationStatuss from storage.
4921:             * If this ScarabUserImpl is new, it will return
4922:             * an empty collection or the current collection, the criteria
4923:             * is ignored on a new object.
4924:             * This method takes in the Connection also as input so that
4925:             * referenced objects can also be obtained using a Connection
4926:             * that is taken as input
4927:             */
4928:            public List getNotificationStatuss(Criteria criteria, Connection con)
4929:                    throws TorqueException {
4930:                if (collNotificationStatuss == null) {
4931:                    if (isNew()) {
4932:                        collNotificationStatuss = new ArrayList();
4933:                    } else {
4934:                        criteria.add(NotificationStatusPeer.CREATOR_ID,
4935:                                getUserId());
4936:                        collNotificationStatuss = NotificationStatusPeer
4937:                                .doSelect(criteria, con);
4938:                    }
4939:                } else {
4940:                    // criteria has no effect for a new object
4941:                    if (!isNew()) {
4942:                        // the following code is to determine if a new query is
4943:                        // called for.  If the criteria is the same as the last
4944:                        // one, just return the collection.
4945:                        criteria.add(NotificationStatusPeer.CREATOR_ID,
4946:                                getUserId());
4947:                        if (!lastNotificationStatussCriteria.equals(criteria)) {
4948:                            collNotificationStatuss = NotificationStatusPeer
4949:                                    .doSelect(criteria, con);
4950:                        }
4951:                    }
4952:                }
4953:                lastNotificationStatussCriteria = criteria;
4954:
4955:                return collNotificationStatuss;
4956:            }
4957:
4958:            /**
4959:             * If this collection has already been initialized with
4960:             * an identical criteria, it returns the collection.
4961:             * Otherwise if this ScarabUserImpl is new, it will return
4962:             * an empty collection; or if this ScarabUserImpl has previously
4963:             * been saved, it will retrieve related NotificationStatuss from storage.
4964:             *
4965:             * This method is protected by default in order to keep the public
4966:             * api reasonable.  You can provide public methods for those you
4967:             * actually need in ScarabUserImpl.
4968:             */
4969:            protected List getNotificationStatussJoinScarabUserImpl(
4970:                    Criteria criteria) throws TorqueException {
4971:                if (collNotificationStatuss == null) {
4972:                    if (isNew()) {
4973:                        collNotificationStatuss = new ArrayList();
4974:                    } else {
4975:                        criteria.add(NotificationStatusPeer.CREATOR_ID,
4976:                                getUserId());
4977:                        collNotificationStatuss = NotificationStatusPeer
4978:                                .doSelectJoinScarabUserImpl(criteria);
4979:                    }
4980:                } else {
4981:                    // the following code is to determine if a new query is
4982:                    // called for.  If the criteria is the same as the last
4983:                    // one, just return the collection.
4984:                    criteria
4985:                            .add(NotificationStatusPeer.CREATOR_ID, getUserId());
4986:                    if (!lastNotificationStatussCriteria.equals(criteria)) {
4987:                        collNotificationStatuss = NotificationStatusPeer
4988:                                .doSelectJoinScarabUserImpl(criteria);
4989:                    }
4990:                }
4991:                lastNotificationStatussCriteria = criteria;
4992:
4993:                return collNotificationStatuss;
4994:            }
4995:
4996:            /**
4997:             * If this collection has already been initialized with
4998:             * an identical criteria, it returns the collection.
4999:             * Otherwise if this ScarabUserImpl is new, it will return
5000:             * an empty collection; or if this ScarabUserImpl has previously
5001:             * been saved, it will retrieve related NotificationStatuss from storage.
5002:             *
5003:             * This method is protected by default in order to keep the public
5004:             * api reasonable.  You can provide public methods for those you
5005:             * actually need in ScarabUserImpl.
5006:             */
5007:            protected List getNotificationStatussJoinActivity(Criteria criteria)
5008:                    throws TorqueException {
5009:                if (collNotificationStatuss == null) {
5010:                    if (isNew()) {
5011:                        collNotificationStatuss = new ArrayList();
5012:                    } else {
5013:                        criteria.add(NotificationStatusPeer.CREATOR_ID,
5014:                                getUserId());
5015:                        collNotificationStatuss = NotificationStatusPeer
5016:                                .doSelectJoinActivity(criteria);
5017:                    }
5018:                } else {
5019:                    // the following code is to determine if a new query is
5020:                    // called for.  If the criteria is the same as the last
5021:                    // one, just return the collection.
5022:                    criteria
5023:                            .add(NotificationStatusPeer.CREATOR_ID, getUserId());
5024:                    if (!lastNotificationStatussCriteria.equals(criteria)) {
5025:                        collNotificationStatuss = NotificationStatusPeer
5026:                                .doSelectJoinActivity(criteria);
5027:                    }
5028:                }
5029:                lastNotificationStatussCriteria = criteria;
5030:
5031:                return collNotificationStatuss;
5032:            }
5033:
5034:            /**
5035:             * Collection to store aggregation of collNotificationFilters
5036:             */
5037:            protected List collNotificationFilters;
5038:
5039:            /**
5040:             * Temporary storage of collNotificationFilters to save a possible db hit in
5041:             * the event objects are add to the collection, but the
5042:             * complete collection is never requested.
5043:             */
5044:            protected void initNotificationFilters() {
5045:                if (collNotificationFilters == null) {
5046:                    collNotificationFilters = new ArrayList();
5047:                }
5048:            }
5049:
5050:            /**
5051:             * Method called to associate a NotificationFilter object to this object
5052:             * through the NotificationFilter foreign key attribute
5053:             *
5054:             * @param l NotificationFilter
5055:             * @throws TorqueException
5056:             */
5057:            public void addNotificationFilter(NotificationFilter l)
5058:                    throws TorqueException {
5059:                getNotificationFilters().add(l);
5060:                l.setScarabUser((ScarabUserImpl) this );
5061:            }
5062:
5063:            /**
5064:             * The criteria used to select the current contents of collNotificationFilters
5065:             */
5066:            private Criteria lastNotificationFiltersCriteria = null;
5067:
5068:            /**
5069:             * If this collection has already been initialized, returns
5070:             * the collection. Otherwise returns the results of
5071:             * getNotificationFilters(new Criteria())
5072:             *
5073:             * @return the collection of associated objects
5074:             * @throws TorqueException
5075:             */
5076:            public List getNotificationFilters() throws TorqueException {
5077:                if (collNotificationFilters == null) {
5078:                    collNotificationFilters = getNotificationFilters(new Criteria(
5079:                            10));
5080:                }
5081:                return collNotificationFilters;
5082:            }
5083:
5084:            /**
5085:             * If this collection has already been initialized with
5086:             * an identical criteria, it returns the collection.
5087:             * Otherwise if this ScarabUserImpl has previously
5088:             * been saved, it will retrieve related NotificationFilters from storage.
5089:             * If this ScarabUserImpl is new, it will return
5090:             * an empty collection or the current collection, the criteria
5091:             * is ignored on a new object.
5092:             *
5093:             * @throws TorqueException
5094:             */
5095:            public List getNotificationFilters(Criteria criteria)
5096:                    throws TorqueException {
5097:                if (collNotificationFilters == null) {
5098:                    if (isNew()) {
5099:                        collNotificationFilters = new ArrayList();
5100:                    } else {
5101:                        criteria.add(NotificationFilterPeer.USER_ID,
5102:                                getUserId());
5103:                        collNotificationFilters = NotificationFilterPeer
5104:                                .doSelect(criteria);
5105:                    }
5106:                } else {
5107:                    // criteria has no effect for a new object
5108:                    if (!isNew()) {
5109:                        // the following code is to determine if a new query is
5110:                        // called for.  If the criteria is the same as the last
5111:                        // one, just return the collection.
5112:                        criteria.add(NotificationFilterPeer.USER_ID,
5113:                                getUserId());
5114:                        if (!lastNotificationFiltersCriteria.equals(criteria)) {
5115:                            collNotificationFilters = NotificationFilterPeer
5116:                                    .doSelect(criteria);
5117:                        }
5118:                    }
5119:                }
5120:                lastNotificationFiltersCriteria = criteria;
5121:
5122:                return collNotificationFilters;
5123:            }
5124:
5125:            /**
5126:             * If this collection has already been initialized, returns
5127:             * the collection. Otherwise returns the results of
5128:             * getNotificationFilters(new Criteria(),Connection)
5129:             * This method takes in the Connection also as input so that
5130:             * referenced objects can also be obtained using a Connection
5131:             * that is taken as input
5132:             */
5133:            public List getNotificationFilters(Connection con)
5134:                    throws TorqueException {
5135:                if (collNotificationFilters == null) {
5136:                    collNotificationFilters = getNotificationFilters(
5137:                            new Criteria(10), con);
5138:                }
5139:                return collNotificationFilters;
5140:            }
5141:
5142:            /**
5143:             * If this collection has already been initialized with
5144:             * an identical criteria, it returns the collection.
5145:             * Otherwise if this ScarabUserImpl has previously
5146:             * been saved, it will retrieve related NotificationFilters from storage.
5147:             * If this ScarabUserImpl is new, it will return
5148:             * an empty collection or the current collection, the criteria
5149:             * is ignored on a new object.
5150:             * This method takes in the Connection also as input so that
5151:             * referenced objects can also be obtained using a Connection
5152:             * that is taken as input
5153:             */
5154:            public List getNotificationFilters(Criteria criteria, Connection con)
5155:                    throws TorqueException {
5156:                if (collNotificationFilters == null) {
5157:                    if (isNew()) {
5158:                        collNotificationFilters = new ArrayList();
5159:                    } else {
5160:                        criteria.add(NotificationFilterPeer.USER_ID,
5161:                                getUserId());
5162:                        collNotificationFilters = NotificationFilterPeer
5163:                                .doSelect(criteria, con);
5164:                    }
5165:                } else {
5166:                    // criteria has no effect for a new object
5167:                    if (!isNew()) {
5168:                        // the following code is to determine if a new query is
5169:                        // called for.  If the criteria is the same as the last
5170:                        // one, just return the collection.
5171:                        criteria.add(NotificationFilterPeer.USER_ID,
5172:                                getUserId());
5173:                        if (!lastNotificationFiltersCriteria.equals(criteria)) {
5174:                            collNotificationFilters = NotificationFilterPeer
5175:                                    .doSelect(criteria, con);
5176:                        }
5177:                    }
5178:                }
5179:                lastNotificationFiltersCriteria = criteria;
5180:
5181:                return collNotificationFilters;
5182:            }
5183:
5184:            /**
5185:             * If this collection has already been initialized with
5186:             * an identical criteria, it returns the collection.
5187:             * Otherwise if this ScarabUserImpl is new, it will return
5188:             * an empty collection; or if this ScarabUserImpl has previously
5189:             * been saved, it will retrieve related NotificationFilters from storage.
5190:             *
5191:             * This method is protected by default in order to keep the public
5192:             * api reasonable.  You can provide public methods for those you
5193:             * actually need in ScarabUserImpl.
5194:             */
5195:            protected List getNotificationFiltersJoinScarabUserImpl(
5196:                    Criteria criteria) throws TorqueException {
5197:                if (collNotificationFilters == null) {
5198:                    if (isNew()) {
5199:                        collNotificationFilters = new ArrayList();
5200:                    } else {
5201:                        criteria.add(NotificationFilterPeer.USER_ID,
5202:                                getUserId());
5203:                        collNotificationFilters = NotificationFilterPeer
5204:                                .doSelectJoinScarabUserImpl(criteria);
5205:                    }
5206:                } else {
5207:                    // the following code is to determine if a new query is
5208:                    // called for.  If the criteria is the same as the last
5209:                    // one, just return the collection.
5210:                    criteria.add(NotificationFilterPeer.USER_ID, getUserId());
5211:                    if (!lastNotificationFiltersCriteria.equals(criteria)) {
5212:                        collNotificationFilters = NotificationFilterPeer
5213:                                .doSelectJoinScarabUserImpl(criteria);
5214:                    }
5215:                }
5216:                lastNotificationFiltersCriteria = criteria;
5217:
5218:                return collNotificationFilters;
5219:            }
5220:
5221:            /**
5222:             * If this collection has already been initialized with
5223:             * an identical criteria, it returns the collection.
5224:             * Otherwise if this ScarabUserImpl is new, it will return
5225:             * an empty collection; or if this ScarabUserImpl has previously
5226:             * been saved, it will retrieve related NotificationFilters from storage.
5227:             *
5228:             * This method is protected by default in order to keep the public
5229:             * api reasonable.  You can provide public methods for those you
5230:             * actually need in ScarabUserImpl.
5231:             */
5232:            protected List getNotificationFiltersJoinScarabModule(
5233:                    Criteria criteria) throws TorqueException {
5234:                if (collNotificationFilters == null) {
5235:                    if (isNew()) {
5236:                        collNotificationFilters = new ArrayList();
5237:                    } else {
5238:                        criteria.add(NotificationFilterPeer.USER_ID,
5239:                                getUserId());
5240:                        collNotificationFilters = NotificationFilterPeer
5241:                                .doSelectJoinScarabModule(criteria);
5242:                    }
5243:                } else {
5244:                    // the following code is to determine if a new query is
5245:                    // called for.  If the criteria is the same as the last
5246:                    // one, just return the collection.
5247:                    criteria.add(NotificationFilterPeer.USER_ID, getUserId());
5248:                    if (!lastNotificationFiltersCriteria.equals(criteria)) {
5249:                        collNotificationFilters = NotificationFilterPeer
5250:                                .doSelectJoinScarabModule(criteria);
5251:                    }
5252:                }
5253:                lastNotificationFiltersCriteria = criteria;
5254:
5255:                return collNotificationFilters;
5256:            }
5257:
5258:            /**
5259:             * get an id that differentiates this object from others
5260:             * of its class.
5261:             */
5262:            public String getQueryKey() {
5263:                if (getPrimaryKey() == null) {
5264:                    return "";
5265:                } else {
5266:                    return getPrimaryKey().toString();
5267:                }
5268:            }
5269:
5270:            /**
5271:             * set an id that differentiates this object from others
5272:             * of its class.
5273:             */
5274:            public void setQueryKey(String key) throws TorqueException {
5275:                try {
5276:                    setPrimaryKey(key);
5277:                } catch (Exception e) {
5278:                    throw new TorqueException("Unable to set query key", e);
5279:                }
5280:            }
5281:
5282:            public String toString() {
5283:                StringBuffer str = new StringBuffer();
5284:                str.append("ScarabUserImpl:\n");
5285:                str.append("UserId = ").append(getUserId()).append("\n");
5286:                return (str.toString());
5287:            }
5288:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.