Source Code Cross Referenced for BaseRModuleUserAttributePeer.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.sql.SQLException;
0006:        import java.util.ArrayList;
0007:        import java.util.Date;
0008:        import java.util.Iterator;
0009:        import java.util.LinkedList;
0010:        import java.util.List;
0011:
0012:        import org.apache.torque.NoRowsException;
0013:        import org.apache.torque.TooManyRowsException;
0014:        import org.apache.torque.Torque;
0015:        import org.apache.torque.TorqueException;
0016:        import org.apache.torque.map.MapBuilder;
0017:        import org.apache.torque.map.TableMap;
0018:        import org.apache.torque.om.DateKey;
0019:        import org.apache.torque.om.NumberKey;
0020:        import org.apache.torque.om.StringKey;
0021:        import org.apache.torque.om.ObjectKey;
0022:        import org.apache.torque.om.SimpleKey;
0023:        import org.apache.torque.util.BasePeer;
0024:        import org.apache.torque.util.Criteria;
0025:
0026:        import com.workingdogs.village.DataSetException;
0027:        import com.workingdogs.village.QueryDataSet;
0028:        import com.workingdogs.village.Record;
0029:
0030:        // Local classes
0031:        import org.tigris.scarab.om.map.*;
0032:
0033:        /**
0034:         */
0035:        public abstract class BaseRModuleUserAttributePeer extends BasePeer {
0036:
0037:            /** the default database name for this class */
0038:            public static final String DATABASE_NAME = "scarab";
0039:
0040:            /** the table name for this class */
0041:            public static final String TABLE_NAME = "SCARAB_R_MODULE_USER_ATTRIBUTE";
0042:
0043:            /**
0044:             * @return the map builder for this peer
0045:             * @throws TorqueException Any exceptions caught during processing will be
0046:             *         rethrown wrapped into a TorqueException.
0047:             */
0048:            public static MapBuilder getMapBuilder() throws TorqueException {
0049:                return getMapBuilder(RModuleUserAttributeMapBuilder.CLASS_NAME);
0050:            }
0051:
0052:            /** the column name for the RMUA_ID field */
0053:            public static final String RMUA_ID;
0054:            /** the column name for the LIST_ID field */
0055:            public static final String LIST_ID;
0056:            /** the column name for the MODULE_ID field */
0057:            public static final String MODULE_ID;
0058:            /** the column name for the USER_ID field */
0059:            public static final String USER_ID;
0060:            /** the column name for the ISSUE_TYPE_ID field */
0061:            public static final String ISSUE_TYPE_ID;
0062:            /** the column name for the ATTRIBUTE_ID field */
0063:            public static final String ATTRIBUTE_ID;
0064:            /** the column name for the INTERNAL_ATTRIBUTE field */
0065:            public static final String INTERNAL_ATTRIBUTE;
0066:            /** the column name for the PREFERRED_ORDER field */
0067:            public static final String PREFERRED_ORDER;
0068:
0069:            static {
0070:                RMUA_ID = "SCARAB_R_MODULE_USER_ATTRIBUTE.RMUA_ID";
0071:                LIST_ID = "SCARAB_R_MODULE_USER_ATTRIBUTE.LIST_ID";
0072:                MODULE_ID = "SCARAB_R_MODULE_USER_ATTRIBUTE.MODULE_ID";
0073:                USER_ID = "SCARAB_R_MODULE_USER_ATTRIBUTE.USER_ID";
0074:                ISSUE_TYPE_ID = "SCARAB_R_MODULE_USER_ATTRIBUTE.ISSUE_TYPE_ID";
0075:                ATTRIBUTE_ID = "SCARAB_R_MODULE_USER_ATTRIBUTE.ATTRIBUTE_ID";
0076:                INTERNAL_ATTRIBUTE = "SCARAB_R_MODULE_USER_ATTRIBUTE.INTERNAL_ATTRIBUTE";
0077:                PREFERRED_ORDER = "SCARAB_R_MODULE_USER_ATTRIBUTE.PREFERRED_ORDER";
0078:                if (Torque.isInit()) {
0079:                    try {
0080:                        getMapBuilder(RModuleUserAttributeMapBuilder.CLASS_NAME);
0081:                    } catch (Exception e) {
0082:                        log.error("Could not initialize Peer", e);
0083:                        throw new RuntimeException(e);
0084:                    }
0085:                } else {
0086:                    Torque
0087:                            .registerMapBuilder(RModuleUserAttributeMapBuilder.CLASS_NAME);
0088:                }
0089:            }
0090:
0091:            /** number of columns for this peer */
0092:            public static final int numColumns = 8;
0093:
0094:            /** A class that can be returned by this peer. */
0095:            protected static final String CLASSNAME_DEFAULT = "org.tigris.scarab.om.RModuleUserAttribute";
0096:
0097:            /** A class that can be returned by this peer. */
0098:            protected static final Class CLASS_DEFAULT = initClass(CLASSNAME_DEFAULT);
0099:
0100:            /**
0101:             * Class object initialization method.
0102:             *
0103:             * @param className name of the class to initialize
0104:             * @return the initialized class
0105:             */
0106:            private static Class initClass(String className) {
0107:                Class c = null;
0108:                try {
0109:                    c = Class.forName(className);
0110:                } catch (Throwable t) {
0111:                    log
0112:                            .error(
0113:                                    "A FATAL ERROR has occurred which should not "
0114:                                            + "have happened under any circumstance.  Please notify "
0115:                                            + "the Torque developers <torque-dev@db.apache.org> "
0116:                                            + "and give as many details as possible (including the error "
0117:                                            + "stack trace).", t);
0118:
0119:                    // Error objects should always be propogated.
0120:                    if (t instanceof  Error) {
0121:                        throw (Error) t.fillInStackTrace();
0122:                    }
0123:                }
0124:                return c;
0125:            }
0126:
0127:            /**
0128:             * Get the list of objects for a ResultSet.  Please not that your
0129:             * resultset MUST return columns in the right order.  You can use
0130:             * getFieldNames() in BaseObject to get the correct sequence.
0131:             *
0132:             * @param results the ResultSet
0133:             * @return the list of objects
0134:             * @throws TorqueException Any exceptions caught during processing will be
0135:             *         rethrown wrapped into a TorqueException.
0136:             */
0137:            public static List resultSet2Objects(java.sql.ResultSet results)
0138:                    throws TorqueException {
0139:                try {
0140:                    QueryDataSet qds = null;
0141:                    List rows = null;
0142:                    try {
0143:                        qds = new QueryDataSet(results);
0144:                        rows = getSelectResults(qds);
0145:                    } finally {
0146:                        if (qds != null) {
0147:                            qds.close();
0148:                        }
0149:                    }
0150:
0151:                    return populateObjects(rows);
0152:                } catch (SQLException e) {
0153:                    throw new TorqueException(e);
0154:                } catch (DataSetException e) {
0155:                    throw new TorqueException(e);
0156:                }
0157:            }
0158:
0159:            /**
0160:             * Method to do inserts.
0161:             *
0162:             * @param criteria object used to create the INSERT statement.
0163:             * @throws TorqueException Any exceptions caught during processing will be
0164:             *         rethrown wrapped into a TorqueException.
0165:             */
0166:            public static ObjectKey doInsert(Criteria criteria)
0167:                    throws TorqueException {
0168:                return BaseRModuleUserAttributePeer.doInsert(criteria,
0169:                        (Connection) null);
0170:            }
0171:
0172:            /**
0173:             * Method to do inserts.  This method is to be used during a transaction,
0174:             * otherwise use the doInsert(Criteria) method.  It will take care of
0175:             * the connection details internally.
0176:             *
0177:             * @param criteria object used to create the INSERT statement.
0178:             * @param con the connection to use
0179:             * @throws TorqueException Any exceptions caught during processing will be
0180:             *         rethrown wrapped into a TorqueException.
0181:             */
0182:            public static ObjectKey doInsert(Criteria criteria, Connection con)
0183:                    throws TorqueException {
0184:                correctBooleans(criteria);
0185:
0186:                setDbName(criteria);
0187:
0188:                if (con == null) {
0189:                    return BasePeer.doInsert(criteria);
0190:                } else {
0191:                    return BasePeer.doInsert(criteria, con);
0192:                }
0193:            }
0194:
0195:            /**
0196:             * Add all the columns needed to create a new object.
0197:             *
0198:             * @param criteria object containing the columns to add.
0199:             * @throws TorqueException Any exceptions caught during processing will be
0200:             *         rethrown wrapped into a TorqueException.
0201:             */
0202:            public static void addSelectColumns(Criteria criteria)
0203:                    throws TorqueException {
0204:                criteria.addSelectColumn(RMUA_ID);
0205:                criteria.addSelectColumn(LIST_ID);
0206:                criteria.addSelectColumn(MODULE_ID);
0207:                criteria.addSelectColumn(USER_ID);
0208:                criteria.addSelectColumn(ISSUE_TYPE_ID);
0209:                criteria.addSelectColumn(ATTRIBUTE_ID);
0210:                criteria.addSelectColumn(INTERNAL_ATTRIBUTE);
0211:                criteria.addSelectColumn(PREFERRED_ORDER);
0212:            }
0213:
0214:            /**
0215:             * changes the boolean values in the criteria to the appropriate type,
0216:             * whenever a booleanchar or booleanint column is involved.
0217:             * This enables the user to create criteria using Boolean values
0218:             * for booleanchar or booleanint columns
0219:             * @param criteria the criteria in which the boolean values should be corrected
0220:             */
0221:            public static void correctBooleans(Criteria criteria) {
0222:            }
0223:
0224:            /**
0225:             * Create a new object of type cls from a resultset row starting
0226:             * from a specified offset.  This is done so that you can select
0227:             * other rows than just those needed for this object.  You may
0228:             * for example want to create two objects from the same row.
0229:             *
0230:             * @throws TorqueException Any exceptions caught during processing will be
0231:             *         rethrown wrapped into a TorqueException.
0232:             */
0233:            public static RModuleUserAttribute row2Object(Record row,
0234:                    int offset, Class cls) throws TorqueException {
0235:                try {
0236:                    RModuleUserAttribute obj = (RModuleUserAttribute) cls
0237:                            .newInstance();
0238:                    RModuleUserAttributePeer.populateObject(row, offset, obj);
0239:                    obj.setModified(false);
0240:                    obj.setNew(false);
0241:
0242:                    return obj;
0243:                } catch (InstantiationException e) {
0244:                    throw new TorqueException(e);
0245:                } catch (IllegalAccessException e) {
0246:                    throw new TorqueException(e);
0247:                }
0248:            }
0249:
0250:            /**
0251:             * Populates an object from a resultset row starting
0252:             * from a specified offset.  This is done so that you can select
0253:             * other rows than just those needed for this object.  You may
0254:             * for example want to create two objects from the same row.
0255:             *
0256:             * @throws TorqueException Any exceptions caught during processing will be
0257:             *         rethrown wrapped into a TorqueException.
0258:             */
0259:            public static void populateObject(Record row, int offset,
0260:                    RModuleUserAttribute obj) throws TorqueException {
0261:                try {
0262:                    obj.setRmuaId(row.getValue(offset + 0).asLongObj());
0263:                    obj.setListId(row.getValue(offset + 1).asLongObj());
0264:                    obj.setModuleId(row.getValue(offset + 2).asIntegerObj());
0265:                    obj.setUserId(row.getValue(offset + 3).asIntegerObj());
0266:                    obj.setIssueTypeId(row.getValue(offset + 4).asIntegerObj());
0267:                    obj.setAttributeId(row.getValue(offset + 5).asIntegerObj());
0268:                    obj.setInternalAttribute(row.getValue(offset + 6)
0269:                            .asString());
0270:                    obj.setOrder(row.getValue(offset + 7).asInt());
0271:                } catch (DataSetException e) {
0272:                    throw new TorqueException(e);
0273:                }
0274:            }
0275:
0276:            /**
0277:             * Method to do selects.
0278:             *
0279:             * @param criteria object used to create the SELECT statement.
0280:             * @return List of selected Objects
0281:             * @throws TorqueException Any exceptions caught during processing will be
0282:             *         rethrown wrapped into a TorqueException.
0283:             */
0284:            public static List doSelect(Criteria criteria)
0285:                    throws TorqueException {
0286:                return populateObjects(doSelectVillageRecords(criteria));
0287:            }
0288:
0289:            /**
0290:             * Method to do selects within a transaction.
0291:             *
0292:             * @param criteria object used to create the SELECT statement.
0293:             * @param con the connection to use
0294:             * @return List of selected Objects
0295:             * @throws TorqueException Any exceptions caught during processing will be
0296:             *         rethrown wrapped into a TorqueException.
0297:             */
0298:            public static List doSelect(Criteria criteria, Connection con)
0299:                    throws TorqueException {
0300:                return populateObjects(doSelectVillageRecords(criteria, con));
0301:            }
0302:
0303:            /**
0304:             * Grabs the raw Village records to be formed into objects.
0305:             * This method handles connections internally.  The Record objects
0306:             * returned by this method should be considered readonly.  Do not
0307:             * alter the data and call save(), your results may vary, but are
0308:             * certainly likely to result in hard to track MT bugs.
0309:             *
0310:             * @throws TorqueException Any exceptions caught during processing will be
0311:             *         rethrown wrapped into a TorqueException.
0312:             */
0313:            public static List doSelectVillageRecords(Criteria criteria)
0314:                    throws TorqueException {
0315:                return BaseRModuleUserAttributePeer.doSelectVillageRecords(
0316:                        criteria, (Connection) null);
0317:            }
0318:
0319:            /**
0320:             * Grabs the raw Village records to be formed into objects.
0321:             * This method should be used for transactions
0322:             *
0323:             * @param criteria object used to create the SELECT statement.
0324:             * @param con the connection to use
0325:             * @throws TorqueException Any exceptions caught during processing will be
0326:             *         rethrown wrapped into a TorqueException.
0327:             */
0328:            public static List doSelectVillageRecords(Criteria criteria,
0329:                    Connection con) throws TorqueException {
0330:                if (criteria.getSelectColumns().size() == 0) {
0331:                    addSelectColumns(criteria);
0332:                }
0333:                correctBooleans(criteria);
0334:
0335:                setDbName(criteria);
0336:
0337:                // BasePeer returns a List of Value (Village) arrays.  The array
0338:                // order follows the order columns were placed in the Select clause.
0339:                if (con == null) {
0340:                    return BasePeer.doSelect(criteria);
0341:                } else {
0342:                    return BasePeer.doSelect(criteria, con);
0343:                }
0344:            }
0345:
0346:            /**
0347:             * The returned List will contain objects of the default type or
0348:             * objects that inherit from the default.
0349:             *
0350:             * @throws TorqueException Any exceptions caught during processing will be
0351:             *         rethrown wrapped into a TorqueException.
0352:             */
0353:            public static List populateObjects(List records)
0354:                    throws TorqueException {
0355:                List results = new ArrayList(records.size());
0356:
0357:                // populate the object(s)
0358:                for (int i = 0; i < records.size(); i++) {
0359:                    Record row = (Record) records.get(i);
0360:                    results.add(RModuleUserAttributePeer.row2Object(row, 1,
0361:                            RModuleUserAttributePeer.getOMClass()));
0362:                }
0363:                return results;
0364:            }
0365:
0366:            /**
0367:             * The class that the Peer will make instances of.
0368:             * If the BO is abstract then you must implement this method
0369:             * in the BO.
0370:             *
0371:             * @throws TorqueException Any exceptions caught during processing will be
0372:             *         rethrown wrapped into a TorqueException.
0373:             */
0374:            public static Class getOMClass() throws TorqueException {
0375:                return CLASS_DEFAULT;
0376:            }
0377:
0378:            /**
0379:             * Method to do updates.
0380:             *
0381:             * @param criteria object containing data that is used to create the UPDATE
0382:             *        statement.
0383:             * @throws TorqueException Any exceptions caught during processing will be
0384:             *         rethrown wrapped into a TorqueException.
0385:             */
0386:            public static void doUpdate(Criteria criteria)
0387:                    throws TorqueException {
0388:                BaseRModuleUserAttributePeer.doUpdate(criteria,
0389:                        (Connection) null);
0390:            }
0391:
0392:            /**
0393:             * Method to do updates.  This method is to be used during a transaction,
0394:             * otherwise use the doUpdate(Criteria) method.  It will take care of
0395:             * the connection details internally.
0396:             *
0397:             * @param criteria object containing data that is used to create the UPDATE
0398:             *        statement.
0399:             * @param con the connection to use
0400:             * @throws TorqueException Any exceptions caught during processing will be
0401:             *         rethrown wrapped into a TorqueException.
0402:             */
0403:            public static void doUpdate(Criteria criteria, Connection con)
0404:                    throws TorqueException {
0405:                Criteria selectCriteria = new Criteria(DATABASE_NAME, 2);
0406:                correctBooleans(criteria);
0407:
0408:                selectCriteria.put(RMUA_ID, criteria.remove(RMUA_ID));
0409:
0410:                setDbName(criteria);
0411:
0412:                if (con == null) {
0413:                    BasePeer.doUpdate(selectCriteria, criteria);
0414:                } else {
0415:                    BasePeer.doUpdate(selectCriteria, criteria, con);
0416:                }
0417:            }
0418:
0419:            /**
0420:             * Method to do deletes.
0421:             *
0422:             * @param criteria object containing data that is used DELETE from database.
0423:             * @throws TorqueException Any exceptions caught during processing will be
0424:             *         rethrown wrapped into a TorqueException.
0425:             */
0426:            public static void doDelete(Criteria criteria)
0427:                    throws TorqueException {
0428:                RModuleUserAttributePeer.doDelete(criteria, (Connection) null);
0429:            }
0430:
0431:            /**
0432:             * Method to do deletes.  This method is to be used during a transaction,
0433:             * otherwise use the doDelete(Criteria) method.  It will take care of
0434:             * the connection details internally.
0435:             *
0436:             * @param criteria object containing data that is used DELETE from database.
0437:             * @param con the connection to use
0438:             * @throws TorqueException Any exceptions caught during processing will be
0439:             *         rethrown wrapped into a TorqueException.
0440:             */
0441:            public static void doDelete(Criteria criteria, Connection con)
0442:                    throws TorqueException {
0443:                correctBooleans(criteria);
0444:
0445:                setDbName(criteria);
0446:
0447:                if (con == null) {
0448:                    BasePeer.doDelete(criteria);
0449:                } else {
0450:                    BasePeer.doDelete(criteria, con);
0451:                }
0452:            }
0453:
0454:            /**
0455:             * Method to do selects
0456:             *
0457:             * @throws TorqueException Any exceptions caught during processing will be
0458:             *         rethrown wrapped into a TorqueException.
0459:             */
0460:            public static List doSelect(RModuleUserAttribute obj)
0461:                    throws TorqueException {
0462:                return doSelect(buildSelectCriteria(obj));
0463:            }
0464:
0465:            /**
0466:             * Method to do inserts
0467:             *
0468:             * @throws TorqueException Any exceptions caught during processing will be
0469:             *         rethrown wrapped into a TorqueException.
0470:             */
0471:            public static void doInsert(RModuleUserAttribute obj)
0472:                    throws TorqueException {
0473:                obj.setPrimaryKey(doInsert(buildCriteria(obj)));
0474:                obj.setNew(false);
0475:                obj.setModified(false);
0476:            }
0477:
0478:            /**
0479:             * @param obj the data object to update in the database.
0480:             * @throws TorqueException Any exceptions caught during processing will be
0481:             *         rethrown wrapped into a TorqueException.
0482:             */
0483:            public static void doUpdate(RModuleUserAttribute obj)
0484:                    throws TorqueException {
0485:                doUpdate(buildCriteria(obj));
0486:                obj.setModified(false);
0487:            }
0488:
0489:            /**
0490:             * @param obj the data object to delete in the database.
0491:             * @throws TorqueException Any exceptions caught during processing will be
0492:             *         rethrown wrapped into a TorqueException.
0493:             */
0494:            public static void doDelete(RModuleUserAttribute obj)
0495:                    throws TorqueException {
0496:                doDelete(buildSelectCriteria(obj));
0497:            }
0498:
0499:            /**
0500:             * Method to do inserts.  This method is to be used during a transaction,
0501:             * otherwise use the doInsert(RModuleUserAttribute) method.  It will take
0502:             * care of the connection details internally.
0503:             *
0504:             * @param obj the data object to insert into the database.
0505:             * @param con the connection to use
0506:             * @throws TorqueException Any exceptions caught during processing will be
0507:             *         rethrown wrapped into a TorqueException.
0508:             */
0509:            public static void doInsert(RModuleUserAttribute obj, Connection con)
0510:                    throws TorqueException {
0511:                obj.setPrimaryKey(doInsert(buildCriteria(obj), con));
0512:                obj.setNew(false);
0513:                obj.setModified(false);
0514:            }
0515:
0516:            /**
0517:             * Method to do update.  This method is to be used during a transaction,
0518:             * otherwise use the doUpdate(RModuleUserAttribute) method.  It will take
0519:             * care of the connection details internally.
0520:             *
0521:             * @param obj the data object to update in the database.
0522:             * @param con the connection to use
0523:             * @throws TorqueException Any exceptions caught during processing will be
0524:             *         rethrown wrapped into a TorqueException.
0525:             */
0526:            public static void doUpdate(RModuleUserAttribute obj, Connection con)
0527:                    throws TorqueException {
0528:                doUpdate(buildCriteria(obj), con);
0529:                obj.setModified(false);
0530:            }
0531:
0532:            /**
0533:             * Method to delete.  This method is to be used during a transaction,
0534:             * otherwise use the doDelete(RModuleUserAttribute) method.  It will take
0535:             * care of the connection details internally.
0536:             *
0537:             * @param obj the data object to delete in the database.
0538:             * @param con the connection to use
0539:             * @throws TorqueException Any exceptions caught during processing will be
0540:             *         rethrown wrapped into a TorqueException.
0541:             */
0542:            public static void doDelete(RModuleUserAttribute obj, Connection con)
0543:                    throws TorqueException {
0544:                doDelete(buildSelectCriteria(obj), con);
0545:            }
0546:
0547:            /**
0548:             * Method to do deletes.
0549:             *
0550:             * @param pk ObjectKey that is used DELETE from database.
0551:             * @throws TorqueException Any exceptions caught during processing will be
0552:             *         rethrown wrapped into a TorqueException.
0553:             */
0554:            public static void doDelete(ObjectKey pk) throws TorqueException {
0555:                BaseRModuleUserAttributePeer.doDelete(pk, (Connection) null);
0556:            }
0557:
0558:            /**
0559:             * Method to delete.  This method is to be used during a transaction,
0560:             * otherwise use the doDelete(ObjectKey) method.  It will take
0561:             * care of the connection details internally.
0562:             *
0563:             * @param pk the primary key for the object to delete in the database.
0564:             * @param con the connection to use
0565:             * @throws TorqueException Any exceptions caught during processing will be
0566:             *         rethrown wrapped into a TorqueException.
0567:             */
0568:            public static void doDelete(ObjectKey pk, Connection con)
0569:                    throws TorqueException {
0570:                doDelete(buildCriteria(pk), con);
0571:            }
0572:
0573:            /** Build a Criteria object from an ObjectKey */
0574:            public static Criteria buildCriteria(ObjectKey pk) {
0575:                Criteria criteria = new Criteria();
0576:                criteria.add(RMUA_ID, pk);
0577:                return criteria;
0578:            }
0579:
0580:            /** Build a Criteria object from the data object for this peer */
0581:            public static Criteria buildCriteria(RModuleUserAttribute obj) {
0582:                Criteria criteria = new Criteria(DATABASE_NAME);
0583:                if (!obj.isNew())
0584:                    criteria.add(RMUA_ID, obj.getRmuaId());
0585:                criteria.add(LIST_ID, obj.getListId());
0586:                criteria.add(MODULE_ID, obj.getModuleId());
0587:                criteria.add(USER_ID, obj.getUserId());
0588:                criteria.add(ISSUE_TYPE_ID, obj.getIssueTypeId());
0589:                criteria.add(ATTRIBUTE_ID, obj.getAttributeId());
0590:                criteria.add(INTERNAL_ATTRIBUTE, obj.getInternalAttribute());
0591:                criteria.add(PREFERRED_ORDER, obj.getOrder());
0592:                return criteria;
0593:            }
0594:
0595:            /** Build a Criteria object from the data object for this peer, skipping all binary columns */
0596:            public static Criteria buildSelectCriteria(RModuleUserAttribute obj) {
0597:                Criteria criteria = new Criteria(DATABASE_NAME);
0598:                if (!obj.isNew()) {
0599:                    criteria.add(RMUA_ID, obj.getRmuaId());
0600:                }
0601:                criteria.add(LIST_ID, obj.getListId());
0602:                criteria.add(MODULE_ID, obj.getModuleId());
0603:                criteria.add(USER_ID, obj.getUserId());
0604:                criteria.add(ISSUE_TYPE_ID, obj.getIssueTypeId());
0605:                criteria.add(ATTRIBUTE_ID, obj.getAttributeId());
0606:                criteria.add(INTERNAL_ATTRIBUTE, obj.getInternalAttribute());
0607:                criteria.add(PREFERRED_ORDER, obj.getOrder());
0608:                return criteria;
0609:            }
0610:
0611:            /**
0612:             * Retrieve a single object by pk
0613:             *
0614:             * @param pk the primary key
0615:             * @throws TorqueException Any exceptions caught during processing will be
0616:             *         rethrown wrapped into a TorqueException.
0617:             * @throws NoRowsException Primary key was not found in database.
0618:             * @throws TooManyRowsException Primary key was not found in database.
0619:             */
0620:            public static RModuleUserAttribute retrieveByPK(Long pk)
0621:                    throws TorqueException, NoRowsException,
0622:                    TooManyRowsException {
0623:                return retrieveByPK(SimpleKey.keyFor(pk));
0624:            }
0625:
0626:            /**
0627:             * Retrieve a single object by pk
0628:             *
0629:             * @param pk the primary key
0630:             * @param con the connection to use
0631:             * @throws TorqueException Any exceptions caught during processing will be
0632:             *         rethrown wrapped into a TorqueException.
0633:             * @throws NoRowsException Primary key was not found in database.
0634:             * @throws TooManyRowsException Primary key was not found in database.
0635:             */
0636:            public static RModuleUserAttribute retrieveByPK(Long pk,
0637:                    Connection con) throws TorqueException, NoRowsException,
0638:                    TooManyRowsException {
0639:                return retrieveByPK(SimpleKey.keyFor(pk), con);
0640:            }
0641:
0642:            /**
0643:             * Retrieve a single object by pk
0644:             *
0645:             * @param pk the primary key
0646:             * @throws TorqueException Any exceptions caught during processing will be
0647:             *         rethrown wrapped into a TorqueException.
0648:             * @throws NoRowsException Primary key was not found in database.
0649:             * @throws TooManyRowsException Primary key was not found in database.
0650:             */
0651:            public static RModuleUserAttribute retrieveByPK(ObjectKey pk)
0652:                    throws TorqueException, NoRowsException,
0653:                    TooManyRowsException {
0654:                Connection db = null;
0655:                RModuleUserAttribute retVal = null;
0656:                try {
0657:                    db = Torque.getConnection(DATABASE_NAME);
0658:                    retVal = retrieveByPK(pk, db);
0659:                } finally {
0660:                    Torque.closeConnection(db);
0661:                }
0662:                return retVal;
0663:            }
0664:
0665:            /**
0666:             * Retrieve a single object by pk
0667:             *
0668:             * @param pk the primary key
0669:             * @param con the connection to use
0670:             * @throws TorqueException Any exceptions caught during processing will be
0671:             *         rethrown wrapped into a TorqueException.
0672:             * @throws NoRowsException Primary key was not found in database.
0673:             * @throws TooManyRowsException Primary key was not found in database.
0674:             */
0675:            public static RModuleUserAttribute retrieveByPK(ObjectKey pk,
0676:                    Connection con) throws TorqueException, NoRowsException,
0677:                    TooManyRowsException {
0678:                Criteria criteria = buildCriteria(pk);
0679:                List v = doSelect(criteria, con);
0680:                if (v.size() == 0) {
0681:                    throw new NoRowsException("Failed to select a row.");
0682:                } else if (v.size() > 1) {
0683:                    throw new TooManyRowsException(
0684:                            "Failed to select only one row.");
0685:                } else {
0686:                    return (RModuleUserAttribute) v.get(0);
0687:                }
0688:            }
0689:
0690:            /**
0691:             * Retrieve a multiple objects by pk
0692:             *
0693:             * @param pks List of primary keys
0694:             * @throws TorqueException Any exceptions caught during processing will be
0695:             *         rethrown wrapped into a TorqueException.
0696:             */
0697:            public static List retrieveByPKs(List pks) throws TorqueException {
0698:                Connection db = null;
0699:                List retVal = null;
0700:                try {
0701:                    db = Torque.getConnection(DATABASE_NAME);
0702:                    retVal = retrieveByPKs(pks, db);
0703:                } finally {
0704:                    Torque.closeConnection(db);
0705:                }
0706:                return retVal;
0707:            }
0708:
0709:            /**
0710:             * Retrieve a multiple objects by pk
0711:             *
0712:             * @param pks List of primary keys
0713:             * @param dbcon the connection to use
0714:             * @throws TorqueException Any exceptions caught during processing will be
0715:             *         rethrown wrapped into a TorqueException.
0716:             */
0717:            public static List retrieveByPKs(List pks, Connection dbcon)
0718:                    throws TorqueException {
0719:                List objs = null;
0720:                if (pks == null || pks.size() == 0) {
0721:                    objs = new LinkedList();
0722:                } else {
0723:                    Criteria criteria = new Criteria();
0724:                    criteria.addIn(RMUA_ID, pks);
0725:                    objs = doSelect(criteria, dbcon);
0726:                }
0727:                return objs;
0728:            }
0729:
0730:            /**
0731:             * selects a collection of RModuleUserAttribute objects pre-filled with their
0732:             * MITList objects.
0733:             *
0734:             * This method is protected by default in order to keep the public
0735:             * api reasonable.  You can provide public methods for those you
0736:             * actually need in RModuleUserAttributePeer.
0737:             *
0738:             * @throws TorqueException Any exceptions caught during processing will be
0739:             *         rethrown wrapped into a TorqueException.
0740:             */
0741:            protected static List doSelectJoinMITList(Criteria criteria)
0742:                    throws TorqueException {
0743:                return doSelectJoinMITList(criteria, null);
0744:            }
0745:
0746:            /**
0747:             * selects a collection of RModuleUserAttribute objects pre-filled with their
0748:             * MITList objects.
0749:             *
0750:             * This method is protected by default in order to keep the public
0751:             * api reasonable.  You can provide public methods for those you
0752:             * actually need in RModuleUserAttributePeer.
0753:             *
0754:             * @throws TorqueException Any exceptions caught during processing will be
0755:             *         rethrown wrapped into a TorqueException.
0756:             */
0757:            protected static List doSelectJoinMITList(Criteria criteria,
0758:                    Connection conn) throws TorqueException {
0759:                setDbName(criteria);
0760:
0761:                RModuleUserAttributePeer.addSelectColumns(criteria);
0762:                int offset = numColumns + 1;
0763:                MITListPeer.addSelectColumns(criteria);
0764:
0765:                criteria.addJoin(RModuleUserAttributePeer.LIST_ID,
0766:                        MITListPeer.LIST_ID);
0767:
0768:                correctBooleans(criteria);
0769:
0770:                List rows;
0771:                if (conn == null) {
0772:                    rows = BasePeer.doSelect(criteria);
0773:                } else {
0774:                    rows = BasePeer.doSelect(criteria, conn);
0775:                }
0776:
0777:                List results = new ArrayList();
0778:
0779:                for (int i = 0; i < rows.size(); i++) {
0780:                    Record row = (Record) rows.get(i);
0781:
0782:                    Class omClass = RModuleUserAttributePeer.getOMClass();
0783:                    RModuleUserAttribute obj1 = (RModuleUserAttribute) RModuleUserAttributePeer
0784:                            .row2Object(row, 1, omClass);
0785:                    omClass = MITListPeer.getOMClass();
0786:                    MITList obj2 = (MITList) MITListPeer.row2Object(row,
0787:                            offset, omClass);
0788:
0789:                    boolean newObject = true;
0790:                    for (int j = 0; j < results.size(); j++) {
0791:                        RModuleUserAttribute temp_obj1 = (RModuleUserAttribute) results
0792:                                .get(j);
0793:                        MITList temp_obj2 = (MITList) temp_obj1.getMITList();
0794:                        if (temp_obj2.getPrimaryKey().equals(
0795:                                obj2.getPrimaryKey())) {
0796:                            newObject = false;
0797:                            temp_obj2.addRModuleUserAttribute(obj1);
0798:                            break;
0799:                        }
0800:                    }
0801:                    if (newObject) {
0802:                        obj2.initRModuleUserAttributes();
0803:                        obj2.addRModuleUserAttribute(obj1);
0804:                    }
0805:                    results.add(obj1);
0806:                }
0807:                return results;
0808:            }
0809:
0810:            /**
0811:             * selects a collection of RModuleUserAttribute objects pre-filled with their
0812:             * ScarabModule objects.
0813:             *
0814:             * This method is protected by default in order to keep the public
0815:             * api reasonable.  You can provide public methods for those you
0816:             * actually need in RModuleUserAttributePeer.
0817:             *
0818:             * @throws TorqueException Any exceptions caught during processing will be
0819:             *         rethrown wrapped into a TorqueException.
0820:             */
0821:            protected static List doSelectJoinScarabModule(Criteria criteria)
0822:                    throws TorqueException {
0823:                return doSelectJoinScarabModule(criteria, null);
0824:            }
0825:
0826:            /**
0827:             * selects a collection of RModuleUserAttribute objects pre-filled with their
0828:             * ScarabModule objects.
0829:             *
0830:             * This method is protected by default in order to keep the public
0831:             * api reasonable.  You can provide public methods for those you
0832:             * actually need in RModuleUserAttributePeer.
0833:             *
0834:             * @throws TorqueException Any exceptions caught during processing will be
0835:             *         rethrown wrapped into a TorqueException.
0836:             */
0837:            protected static List doSelectJoinScarabModule(Criteria criteria,
0838:                    Connection conn) throws TorqueException {
0839:                setDbName(criteria);
0840:
0841:                RModuleUserAttributePeer.addSelectColumns(criteria);
0842:                int offset = numColumns + 1;
0843:                ScarabModulePeer.addSelectColumns(criteria);
0844:
0845:                criteria.addJoin(RModuleUserAttributePeer.MODULE_ID,
0846:                        ScarabModulePeer.MODULE_ID);
0847:
0848:                correctBooleans(criteria);
0849:
0850:                List rows;
0851:                if (conn == null) {
0852:                    rows = BasePeer.doSelect(criteria);
0853:                } else {
0854:                    rows = BasePeer.doSelect(criteria, conn);
0855:                }
0856:
0857:                List results = new ArrayList();
0858:
0859:                for (int i = 0; i < rows.size(); i++) {
0860:                    Record row = (Record) rows.get(i);
0861:
0862:                    Class omClass = RModuleUserAttributePeer.getOMClass();
0863:                    RModuleUserAttribute obj1 = (RModuleUserAttribute) RModuleUserAttributePeer
0864:                            .row2Object(row, 1, omClass);
0865:                    omClass = ScarabModulePeer.getOMClass(row, offset);
0866:                    ScarabModule obj2 = (ScarabModule) ScarabModulePeer
0867:                            .row2Object(row, offset, omClass);
0868:
0869:                    boolean newObject = true;
0870:                    for (int j = 0; j < results.size(); j++) {
0871:                        RModuleUserAttribute temp_obj1 = (RModuleUserAttribute) results
0872:                                .get(j);
0873:                        ScarabModule temp_obj2 = (ScarabModule) temp_obj1
0874:                                .getModule();
0875:                        if (temp_obj2.getPrimaryKey().equals(
0876:                                obj2.getPrimaryKey())) {
0877:                            newObject = false;
0878:                            temp_obj2.addRModuleUserAttribute(obj1);
0879:                            break;
0880:                        }
0881:                    }
0882:                    if (newObject) {
0883:                        obj2.initRModuleUserAttributes();
0884:                        obj2.addRModuleUserAttribute(obj1);
0885:                    }
0886:                    results.add(obj1);
0887:                }
0888:                return results;
0889:            }
0890:
0891:            /**
0892:             * selects a collection of RModuleUserAttribute objects pre-filled with their
0893:             * ScarabUserImpl objects.
0894:             *
0895:             * This method is protected by default in order to keep the public
0896:             * api reasonable.  You can provide public methods for those you
0897:             * actually need in RModuleUserAttributePeer.
0898:             *
0899:             * @throws TorqueException Any exceptions caught during processing will be
0900:             *         rethrown wrapped into a TorqueException.
0901:             */
0902:            protected static List doSelectJoinScarabUserImpl(Criteria criteria)
0903:                    throws TorqueException {
0904:                return doSelectJoinScarabUserImpl(criteria, null);
0905:            }
0906:
0907:            /**
0908:             * selects a collection of RModuleUserAttribute objects pre-filled with their
0909:             * ScarabUserImpl objects.
0910:             *
0911:             * This method is protected by default in order to keep the public
0912:             * api reasonable.  You can provide public methods for those you
0913:             * actually need in RModuleUserAttributePeer.
0914:             *
0915:             * @throws TorqueException Any exceptions caught during processing will be
0916:             *         rethrown wrapped into a TorqueException.
0917:             */
0918:            protected static List doSelectJoinScarabUserImpl(Criteria criteria,
0919:                    Connection conn) throws TorqueException {
0920:                setDbName(criteria);
0921:
0922:                RModuleUserAttributePeer.addSelectColumns(criteria);
0923:                int offset = numColumns + 1;
0924:                ScarabUserImplPeer.addSelectColumns(criteria);
0925:
0926:                criteria.addJoin(RModuleUserAttributePeer.USER_ID,
0927:                        ScarabUserImplPeer.USER_ID);
0928:
0929:                correctBooleans(criteria);
0930:
0931:                List rows;
0932:                if (conn == null) {
0933:                    rows = BasePeer.doSelect(criteria);
0934:                } else {
0935:                    rows = BasePeer.doSelect(criteria, conn);
0936:                }
0937:
0938:                List results = new ArrayList();
0939:
0940:                for (int i = 0; i < rows.size(); i++) {
0941:                    Record row = (Record) rows.get(i);
0942:
0943:                    Class omClass = RModuleUserAttributePeer.getOMClass();
0944:                    RModuleUserAttribute obj1 = (RModuleUserAttribute) RModuleUserAttributePeer
0945:                            .row2Object(row, 1, omClass);
0946:                    omClass = ScarabUserImplPeer.getOMClass();
0947:                    ScarabUserImpl obj2 = (ScarabUserImpl) ScarabUserImplPeer
0948:                            .row2Object(row, offset, omClass);
0949:
0950:                    boolean newObject = true;
0951:                    for (int j = 0; j < results.size(); j++) {
0952:                        RModuleUserAttribute temp_obj1 = (RModuleUserAttribute) results
0953:                                .get(j);
0954:                        ScarabUserImpl temp_obj2 = (ScarabUserImpl) temp_obj1
0955:                                .getScarabUser();
0956:                        if (temp_obj2.getPrimaryKey().equals(
0957:                                obj2.getPrimaryKey())) {
0958:                            newObject = false;
0959:                            temp_obj2.addRModuleUserAttribute(obj1);
0960:                            break;
0961:                        }
0962:                    }
0963:                    if (newObject) {
0964:                        obj2.initRModuleUserAttributes();
0965:                        obj2.addRModuleUserAttribute(obj1);
0966:                    }
0967:                    results.add(obj1);
0968:                }
0969:                return results;
0970:            }
0971:
0972:            /**
0973:             * selects a collection of RModuleUserAttribute objects pre-filled with their
0974:             * IssueType objects.
0975:             *
0976:             * This method is protected by default in order to keep the public
0977:             * api reasonable.  You can provide public methods for those you
0978:             * actually need in RModuleUserAttributePeer.
0979:             *
0980:             * @throws TorqueException Any exceptions caught during processing will be
0981:             *         rethrown wrapped into a TorqueException.
0982:             */
0983:            protected static List doSelectJoinIssueType(Criteria criteria)
0984:                    throws TorqueException {
0985:                return doSelectJoinIssueType(criteria, null);
0986:            }
0987:
0988:            /**
0989:             * selects a collection of RModuleUserAttribute objects pre-filled with their
0990:             * IssueType objects.
0991:             *
0992:             * This method is protected by default in order to keep the public
0993:             * api reasonable.  You can provide public methods for those you
0994:             * actually need in RModuleUserAttributePeer.
0995:             *
0996:             * @throws TorqueException Any exceptions caught during processing will be
0997:             *         rethrown wrapped into a TorqueException.
0998:             */
0999:            protected static List doSelectJoinIssueType(Criteria criteria,
1000:                    Connection conn) throws TorqueException {
1001:                setDbName(criteria);
1002:
1003:                RModuleUserAttributePeer.addSelectColumns(criteria);
1004:                int offset = numColumns + 1;
1005:                IssueTypePeer.addSelectColumns(criteria);
1006:
1007:                criteria.addJoin(RModuleUserAttributePeer.ISSUE_TYPE_ID,
1008:                        IssueTypePeer.ISSUE_TYPE_ID);
1009:
1010:                correctBooleans(criteria);
1011:
1012:                List rows;
1013:                if (conn == null) {
1014:                    rows = BasePeer.doSelect(criteria);
1015:                } else {
1016:                    rows = BasePeer.doSelect(criteria, conn);
1017:                }
1018:
1019:                List results = new ArrayList();
1020:
1021:                for (int i = 0; i < rows.size(); i++) {
1022:                    Record row = (Record) rows.get(i);
1023:
1024:                    Class omClass = RModuleUserAttributePeer.getOMClass();
1025:                    RModuleUserAttribute obj1 = (RModuleUserAttribute) RModuleUserAttributePeer
1026:                            .row2Object(row, 1, omClass);
1027:                    omClass = IssueTypePeer.getOMClass();
1028:                    IssueType obj2 = (IssueType) IssueTypePeer.row2Object(row,
1029:                            offset, omClass);
1030:
1031:                    boolean newObject = true;
1032:                    for (int j = 0; j < results.size(); j++) {
1033:                        RModuleUserAttribute temp_obj1 = (RModuleUserAttribute) results
1034:                                .get(j);
1035:                        IssueType temp_obj2 = (IssueType) temp_obj1
1036:                                .getIssueType();
1037:                        if (temp_obj2.getPrimaryKey().equals(
1038:                                obj2.getPrimaryKey())) {
1039:                            newObject = false;
1040:                            temp_obj2.addRModuleUserAttribute(obj1);
1041:                            break;
1042:                        }
1043:                    }
1044:                    if (newObject) {
1045:                        obj2.initRModuleUserAttributes();
1046:                        obj2.addRModuleUserAttribute(obj1);
1047:                    }
1048:                    results.add(obj1);
1049:                }
1050:                return results;
1051:            }
1052:
1053:            /**
1054:             * selects a collection of RModuleUserAttribute objects pre-filled with their
1055:             * Attribute objects.
1056:             *
1057:             * This method is protected by default in order to keep the public
1058:             * api reasonable.  You can provide public methods for those you
1059:             * actually need in RModuleUserAttributePeer.
1060:             *
1061:             * @throws TorqueException Any exceptions caught during processing will be
1062:             *         rethrown wrapped into a TorqueException.
1063:             */
1064:            protected static List doSelectJoinAttribute(Criteria criteria)
1065:                    throws TorqueException {
1066:                return doSelectJoinAttribute(criteria, null);
1067:            }
1068:
1069:            /**
1070:             * selects a collection of RModuleUserAttribute objects pre-filled with their
1071:             * Attribute objects.
1072:             *
1073:             * This method is protected by default in order to keep the public
1074:             * api reasonable.  You can provide public methods for those you
1075:             * actually need in RModuleUserAttributePeer.
1076:             *
1077:             * @throws TorqueException Any exceptions caught during processing will be
1078:             *         rethrown wrapped into a TorqueException.
1079:             */
1080:            protected static List doSelectJoinAttribute(Criteria criteria,
1081:                    Connection conn) throws TorqueException {
1082:                setDbName(criteria);
1083:
1084:                RModuleUserAttributePeer.addSelectColumns(criteria);
1085:                int offset = numColumns + 1;
1086:                AttributePeer.addSelectColumns(criteria);
1087:
1088:                criteria.addJoin(RModuleUserAttributePeer.ATTRIBUTE_ID,
1089:                        AttributePeer.ATTRIBUTE_ID);
1090:
1091:                correctBooleans(criteria);
1092:
1093:                List rows;
1094:                if (conn == null) {
1095:                    rows = BasePeer.doSelect(criteria);
1096:                } else {
1097:                    rows = BasePeer.doSelect(criteria, conn);
1098:                }
1099:
1100:                List results = new ArrayList();
1101:
1102:                for (int i = 0; i < rows.size(); i++) {
1103:                    Record row = (Record) rows.get(i);
1104:
1105:                    Class omClass = RModuleUserAttributePeer.getOMClass();
1106:                    RModuleUserAttribute obj1 = (RModuleUserAttribute) RModuleUserAttributePeer
1107:                            .row2Object(row, 1, omClass);
1108:                    omClass = AttributePeer.getOMClass();
1109:                    Attribute obj2 = (Attribute) AttributePeer.row2Object(row,
1110:                            offset, omClass);
1111:
1112:                    boolean newObject = true;
1113:                    for (int j = 0; j < results.size(); j++) {
1114:                        RModuleUserAttribute temp_obj1 = (RModuleUserAttribute) results
1115:                                .get(j);
1116:                        Attribute temp_obj2 = (Attribute) temp_obj1
1117:                                .getAttribute();
1118:                        if (temp_obj2.getPrimaryKey().equals(
1119:                                obj2.getPrimaryKey())) {
1120:                            newObject = false;
1121:                            temp_obj2.addRModuleUserAttribute(obj1);
1122:                            break;
1123:                        }
1124:                    }
1125:                    if (newObject) {
1126:                        obj2.initRModuleUserAttributes();
1127:                        obj2.addRModuleUserAttribute(obj1);
1128:                    }
1129:                    results.add(obj1);
1130:                }
1131:                return results;
1132:            }
1133:
1134:            /**
1135:             * selects a collection of RModuleUserAttribute objects pre-filled with
1136:             * all related objects.
1137:             *
1138:             * This method is protected by default in order to keep the public
1139:             * api reasonable.  You can provide public methods for those you
1140:             * actually need in RModuleUserAttributePeer.
1141:             *
1142:             * @throws TorqueException Any exceptions caught during processing will be
1143:             *         rethrown wrapped into a TorqueException.
1144:             */
1145:            protected static List doSelectJoinAllExceptMITList(Criteria criteria)
1146:                    throws TorqueException {
1147:                return doSelectJoinAllExceptMITList(criteria, null);
1148:            }
1149:
1150:            /**
1151:             * selects a collection of RModuleUserAttribute objects pre-filled with
1152:             * all related objects.
1153:             *
1154:             * This method is protected by default in order to keep the public
1155:             * api reasonable.  You can provide public methods for those you
1156:             * actually need in RModuleUserAttributePeer.
1157:             *
1158:             * @throws TorqueException Any exceptions caught during processing will be
1159:             *         rethrown wrapped into a TorqueException.
1160:             */
1161:            protected static List doSelectJoinAllExceptMITList(
1162:                    Criteria criteria, Connection conn) throws TorqueException {
1163:                setDbName(criteria);
1164:
1165:                addSelectColumns(criteria);
1166:                int offset2 = numColumns + 1;
1167:
1168:                ScarabModulePeer.addSelectColumns(criteria);
1169:                criteria.addJoin(RModuleUserAttributePeer.MODULE_ID,
1170:                        ScarabModulePeer.MODULE_ID);
1171:                int offset3 = offset2 + ScarabModulePeer.numColumns;
1172:
1173:                ScarabUserImplPeer.addSelectColumns(criteria);
1174:                criteria.addJoin(RModuleUserAttributePeer.USER_ID,
1175:                        ScarabUserImplPeer.USER_ID);
1176:                int offset4 = offset3 + ScarabUserImplPeer.numColumns;
1177:
1178:                IssueTypePeer.addSelectColumns(criteria);
1179:                criteria.addJoin(RModuleUserAttributePeer.ISSUE_TYPE_ID,
1180:                        IssueTypePeer.ISSUE_TYPE_ID);
1181:                int offset5 = offset4 + IssueTypePeer.numColumns;
1182:
1183:                AttributePeer.addSelectColumns(criteria);
1184:                criteria.addJoin(RModuleUserAttributePeer.ATTRIBUTE_ID,
1185:                        AttributePeer.ATTRIBUTE_ID);
1186:
1187:                correctBooleans(criteria);
1188:
1189:                List rows;
1190:                if (conn == null) {
1191:                    rows = BasePeer.doSelect(criteria);
1192:                } else {
1193:                    rows = BasePeer.doSelect(criteria, conn);
1194:                }
1195:
1196:                List results = new ArrayList();
1197:
1198:                for (int i = 0; i < rows.size(); i++) {
1199:                    Record row = (Record) rows.get(i);
1200:
1201:                    Class omClass = RModuleUserAttributePeer.getOMClass();
1202:                    RModuleUserAttribute obj1 = (RModuleUserAttribute) RModuleUserAttributePeer
1203:                            .row2Object(row, 1, omClass);
1204:
1205:                    omClass = ScarabModulePeer.getOMClass(row, offset2);
1206:                    ScarabModule obj2 = (ScarabModule) ScarabModulePeer
1207:                            .row2Object(row, offset2, omClass);
1208:
1209:                    boolean newObject = true;
1210:                    for (int j = 0; j < results.size(); j++) {
1211:                        RModuleUserAttribute temp_obj1 = (RModuleUserAttribute) results
1212:                                .get(j);
1213:                        ScarabModule temp_obj2 = (ScarabModule) temp_obj1
1214:                                .getModule();
1215:                        if (temp_obj2.getPrimaryKey().equals(
1216:                                obj2.getPrimaryKey())) {
1217:                            newObject = false;
1218:                            temp_obj2.addRModuleUserAttribute(obj1);
1219:                            break;
1220:                        }
1221:                    }
1222:                    if (newObject) {
1223:                        obj2.initRModuleUserAttributes();
1224:                        obj2.addRModuleUserAttribute(obj1);
1225:                    }
1226:
1227:                    omClass = ScarabUserImplPeer.getOMClass();
1228:                    ScarabUserImpl obj3 = (ScarabUserImpl) ScarabUserImplPeer
1229:                            .row2Object(row, offset3, omClass);
1230:
1231:                    newObject = true;
1232:                    for (int j = 0; j < results.size(); j++) {
1233:                        RModuleUserAttribute temp_obj1 = (RModuleUserAttribute) results
1234:                                .get(j);
1235:                        ScarabUserImpl temp_obj3 = (ScarabUserImpl) temp_obj1
1236:                                .getScarabUser();
1237:                        if (temp_obj3.getPrimaryKey().equals(
1238:                                obj3.getPrimaryKey())) {
1239:                            newObject = false;
1240:                            temp_obj3.addRModuleUserAttribute(obj1);
1241:                            break;
1242:                        }
1243:                    }
1244:                    if (newObject) {
1245:                        obj3.initRModuleUserAttributes();
1246:                        obj3.addRModuleUserAttribute(obj1);
1247:                    }
1248:
1249:                    omClass = IssueTypePeer.getOMClass();
1250:                    IssueType obj4 = (IssueType) IssueTypePeer.row2Object(row,
1251:                            offset4, omClass);
1252:
1253:                    newObject = true;
1254:                    for (int j = 0; j < results.size(); j++) {
1255:                        RModuleUserAttribute temp_obj1 = (RModuleUserAttribute) results
1256:                                .get(j);
1257:                        IssueType temp_obj4 = (IssueType) temp_obj1
1258:                                .getIssueType();
1259:                        if (temp_obj4.getPrimaryKey().equals(
1260:                                obj4.getPrimaryKey())) {
1261:                            newObject = false;
1262:                            temp_obj4.addRModuleUserAttribute(obj1);
1263:                            break;
1264:                        }
1265:                    }
1266:                    if (newObject) {
1267:                        obj4.initRModuleUserAttributes();
1268:                        obj4.addRModuleUserAttribute(obj1);
1269:                    }
1270:
1271:                    omClass = AttributePeer.getOMClass();
1272:                    Attribute obj5 = (Attribute) AttributePeer.row2Object(row,
1273:                            offset5, omClass);
1274:
1275:                    newObject = true;
1276:                    for (int j = 0; j < results.size(); j++) {
1277:                        RModuleUserAttribute temp_obj1 = (RModuleUserAttribute) results
1278:                                .get(j);
1279:                        Attribute temp_obj5 = (Attribute) temp_obj1
1280:                                .getAttribute();
1281:                        if (temp_obj5.getPrimaryKey().equals(
1282:                                obj5.getPrimaryKey())) {
1283:                            newObject = false;
1284:                            temp_obj5.addRModuleUserAttribute(obj1);
1285:                            break;
1286:                        }
1287:                    }
1288:                    if (newObject) {
1289:                        obj5.initRModuleUserAttributes();
1290:                        obj5.addRModuleUserAttribute(obj1);
1291:                    }
1292:                    results.add(obj1);
1293:                }
1294:                return results;
1295:            }
1296:
1297:            /**
1298:             * selects a collection of RModuleUserAttribute objects pre-filled with
1299:             * all related objects.
1300:             *
1301:             * This method is protected by default in order to keep the public
1302:             * api reasonable.  You can provide public methods for those you
1303:             * actually need in RModuleUserAttributePeer.
1304:             *
1305:             * @throws TorqueException Any exceptions caught during processing will be
1306:             *         rethrown wrapped into a TorqueException.
1307:             */
1308:            protected static List doSelectJoinAllExceptScarabModule(
1309:                    Criteria criteria) throws TorqueException {
1310:                return doSelectJoinAllExceptScarabModule(criteria, null);
1311:            }
1312:
1313:            /**
1314:             * selects a collection of RModuleUserAttribute objects pre-filled with
1315:             * all related objects.
1316:             *
1317:             * This method is protected by default in order to keep the public
1318:             * api reasonable.  You can provide public methods for those you
1319:             * actually need in RModuleUserAttributePeer.
1320:             *
1321:             * @throws TorqueException Any exceptions caught during processing will be
1322:             *         rethrown wrapped into a TorqueException.
1323:             */
1324:            protected static List doSelectJoinAllExceptScarabModule(
1325:                    Criteria criteria, Connection conn) throws TorqueException {
1326:                setDbName(criteria);
1327:
1328:                addSelectColumns(criteria);
1329:                int offset2 = numColumns + 1;
1330:
1331:                MITListPeer.addSelectColumns(criteria);
1332:                criteria.addJoin(RModuleUserAttributePeer.LIST_ID,
1333:                        MITListPeer.LIST_ID);
1334:                int offset3 = offset2 + MITListPeer.numColumns;
1335:
1336:                ScarabUserImplPeer.addSelectColumns(criteria);
1337:                criteria.addJoin(RModuleUserAttributePeer.USER_ID,
1338:                        ScarabUserImplPeer.USER_ID);
1339:                int offset4 = offset3 + ScarabUserImplPeer.numColumns;
1340:
1341:                IssueTypePeer.addSelectColumns(criteria);
1342:                criteria.addJoin(RModuleUserAttributePeer.ISSUE_TYPE_ID,
1343:                        IssueTypePeer.ISSUE_TYPE_ID);
1344:                int offset5 = offset4 + IssueTypePeer.numColumns;
1345:
1346:                AttributePeer.addSelectColumns(criteria);
1347:                criteria.addJoin(RModuleUserAttributePeer.ATTRIBUTE_ID,
1348:                        AttributePeer.ATTRIBUTE_ID);
1349:
1350:                correctBooleans(criteria);
1351:
1352:                List rows;
1353:                if (conn == null) {
1354:                    rows = BasePeer.doSelect(criteria);
1355:                } else {
1356:                    rows = BasePeer.doSelect(criteria, conn);
1357:                }
1358:
1359:                List results = new ArrayList();
1360:
1361:                for (int i = 0; i < rows.size(); i++) {
1362:                    Record row = (Record) rows.get(i);
1363:
1364:                    Class omClass = RModuleUserAttributePeer.getOMClass();
1365:                    RModuleUserAttribute obj1 = (RModuleUserAttribute) RModuleUserAttributePeer
1366:                            .row2Object(row, 1, omClass);
1367:
1368:                    omClass = MITListPeer.getOMClass();
1369:                    MITList obj2 = (MITList) MITListPeer.row2Object(row,
1370:                            offset2, omClass);
1371:
1372:                    boolean newObject = true;
1373:                    for (int j = 0; j < results.size(); j++) {
1374:                        RModuleUserAttribute temp_obj1 = (RModuleUserAttribute) results
1375:                                .get(j);
1376:                        MITList temp_obj2 = (MITList) temp_obj1.getMITList();
1377:                        if (temp_obj2.getPrimaryKey().equals(
1378:                                obj2.getPrimaryKey())) {
1379:                            newObject = false;
1380:                            temp_obj2.addRModuleUserAttribute(obj1);
1381:                            break;
1382:                        }
1383:                    }
1384:                    if (newObject) {
1385:                        obj2.initRModuleUserAttributes();
1386:                        obj2.addRModuleUserAttribute(obj1);
1387:                    }
1388:
1389:                    omClass = ScarabUserImplPeer.getOMClass();
1390:                    ScarabUserImpl obj3 = (ScarabUserImpl) ScarabUserImplPeer
1391:                            .row2Object(row, offset3, omClass);
1392:
1393:                    newObject = true;
1394:                    for (int j = 0; j < results.size(); j++) {
1395:                        RModuleUserAttribute temp_obj1 = (RModuleUserAttribute) results
1396:                                .get(j);
1397:                        ScarabUserImpl temp_obj3 = (ScarabUserImpl) temp_obj1
1398:                                .getScarabUser();
1399:                        if (temp_obj3.getPrimaryKey().equals(
1400:                                obj3.getPrimaryKey())) {
1401:                            newObject = false;
1402:                            temp_obj3.addRModuleUserAttribute(obj1);
1403:                            break;
1404:                        }
1405:                    }
1406:                    if (newObject) {
1407:                        obj3.initRModuleUserAttributes();
1408:                        obj3.addRModuleUserAttribute(obj1);
1409:                    }
1410:
1411:                    omClass = IssueTypePeer.getOMClass();
1412:                    IssueType obj4 = (IssueType) IssueTypePeer.row2Object(row,
1413:                            offset4, omClass);
1414:
1415:                    newObject = true;
1416:                    for (int j = 0; j < results.size(); j++) {
1417:                        RModuleUserAttribute temp_obj1 = (RModuleUserAttribute) results
1418:                                .get(j);
1419:                        IssueType temp_obj4 = (IssueType) temp_obj1
1420:                                .getIssueType();
1421:                        if (temp_obj4.getPrimaryKey().equals(
1422:                                obj4.getPrimaryKey())) {
1423:                            newObject = false;
1424:                            temp_obj4.addRModuleUserAttribute(obj1);
1425:                            break;
1426:                        }
1427:                    }
1428:                    if (newObject) {
1429:                        obj4.initRModuleUserAttributes();
1430:                        obj4.addRModuleUserAttribute(obj1);
1431:                    }
1432:
1433:                    omClass = AttributePeer.getOMClass();
1434:                    Attribute obj5 = (Attribute) AttributePeer.row2Object(row,
1435:                            offset5, omClass);
1436:
1437:                    newObject = true;
1438:                    for (int j = 0; j < results.size(); j++) {
1439:                        RModuleUserAttribute temp_obj1 = (RModuleUserAttribute) results
1440:                                .get(j);
1441:                        Attribute temp_obj5 = (Attribute) temp_obj1
1442:                                .getAttribute();
1443:                        if (temp_obj5.getPrimaryKey().equals(
1444:                                obj5.getPrimaryKey())) {
1445:                            newObject = false;
1446:                            temp_obj5.addRModuleUserAttribute(obj1);
1447:                            break;
1448:                        }
1449:                    }
1450:                    if (newObject) {
1451:                        obj5.initRModuleUserAttributes();
1452:                        obj5.addRModuleUserAttribute(obj1);
1453:                    }
1454:                    results.add(obj1);
1455:                }
1456:                return results;
1457:            }
1458:
1459:            /**
1460:             * selects a collection of RModuleUserAttribute objects pre-filled with
1461:             * all related objects.
1462:             *
1463:             * This method is protected by default in order to keep the public
1464:             * api reasonable.  You can provide public methods for those you
1465:             * actually need in RModuleUserAttributePeer.
1466:             *
1467:             * @throws TorqueException Any exceptions caught during processing will be
1468:             *         rethrown wrapped into a TorqueException.
1469:             */
1470:            protected static List doSelectJoinAllExceptScarabUserImpl(
1471:                    Criteria criteria) throws TorqueException {
1472:                return doSelectJoinAllExceptScarabUserImpl(criteria, null);
1473:            }
1474:
1475:            /**
1476:             * selects a collection of RModuleUserAttribute objects pre-filled with
1477:             * all related objects.
1478:             *
1479:             * This method is protected by default in order to keep the public
1480:             * api reasonable.  You can provide public methods for those you
1481:             * actually need in RModuleUserAttributePeer.
1482:             *
1483:             * @throws TorqueException Any exceptions caught during processing will be
1484:             *         rethrown wrapped into a TorqueException.
1485:             */
1486:            protected static List doSelectJoinAllExceptScarabUserImpl(
1487:                    Criteria criteria, Connection conn) throws TorqueException {
1488:                setDbName(criteria);
1489:
1490:                addSelectColumns(criteria);
1491:                int offset2 = numColumns + 1;
1492:
1493:                MITListPeer.addSelectColumns(criteria);
1494:                criteria.addJoin(RModuleUserAttributePeer.LIST_ID,
1495:                        MITListPeer.LIST_ID);
1496:                int offset3 = offset2 + MITListPeer.numColumns;
1497:
1498:                ScarabModulePeer.addSelectColumns(criteria);
1499:                criteria.addJoin(RModuleUserAttributePeer.MODULE_ID,
1500:                        ScarabModulePeer.MODULE_ID);
1501:                int offset4 = offset3 + ScarabModulePeer.numColumns;
1502:
1503:                IssueTypePeer.addSelectColumns(criteria);
1504:                criteria.addJoin(RModuleUserAttributePeer.ISSUE_TYPE_ID,
1505:                        IssueTypePeer.ISSUE_TYPE_ID);
1506:                int offset5 = offset4 + IssueTypePeer.numColumns;
1507:
1508:                AttributePeer.addSelectColumns(criteria);
1509:                criteria.addJoin(RModuleUserAttributePeer.ATTRIBUTE_ID,
1510:                        AttributePeer.ATTRIBUTE_ID);
1511:
1512:                correctBooleans(criteria);
1513:
1514:                List rows;
1515:                if (conn == null) {
1516:                    rows = BasePeer.doSelect(criteria);
1517:                } else {
1518:                    rows = BasePeer.doSelect(criteria, conn);
1519:                }
1520:
1521:                List results = new ArrayList();
1522:
1523:                for (int i = 0; i < rows.size(); i++) {
1524:                    Record row = (Record) rows.get(i);
1525:
1526:                    Class omClass = RModuleUserAttributePeer.getOMClass();
1527:                    RModuleUserAttribute obj1 = (RModuleUserAttribute) RModuleUserAttributePeer
1528:                            .row2Object(row, 1, omClass);
1529:
1530:                    omClass = MITListPeer.getOMClass();
1531:                    MITList obj2 = (MITList) MITListPeer.row2Object(row,
1532:                            offset2, omClass);
1533:
1534:                    boolean newObject = true;
1535:                    for (int j = 0; j < results.size(); j++) {
1536:                        RModuleUserAttribute temp_obj1 = (RModuleUserAttribute) results
1537:                                .get(j);
1538:                        MITList temp_obj2 = (MITList) temp_obj1.getMITList();
1539:                        if (temp_obj2.getPrimaryKey().equals(
1540:                                obj2.getPrimaryKey())) {
1541:                            newObject = false;
1542:                            temp_obj2.addRModuleUserAttribute(obj1);
1543:                            break;
1544:                        }
1545:                    }
1546:                    if (newObject) {
1547:                        obj2.initRModuleUserAttributes();
1548:                        obj2.addRModuleUserAttribute(obj1);
1549:                    }
1550:
1551:                    omClass = ScarabModulePeer.getOMClass(row, offset3);
1552:                    ScarabModule obj3 = (ScarabModule) ScarabModulePeer
1553:                            .row2Object(row, offset3, omClass);
1554:
1555:                    newObject = true;
1556:                    for (int j = 0; j < results.size(); j++) {
1557:                        RModuleUserAttribute temp_obj1 = (RModuleUserAttribute) results
1558:                                .get(j);
1559:                        ScarabModule temp_obj3 = (ScarabModule) temp_obj1
1560:                                .getModule();
1561:                        if (temp_obj3.getPrimaryKey().equals(
1562:                                obj3.getPrimaryKey())) {
1563:                            newObject = false;
1564:                            temp_obj3.addRModuleUserAttribute(obj1);
1565:                            break;
1566:                        }
1567:                    }
1568:                    if (newObject) {
1569:                        obj3.initRModuleUserAttributes();
1570:                        obj3.addRModuleUserAttribute(obj1);
1571:                    }
1572:
1573:                    omClass = IssueTypePeer.getOMClass();
1574:                    IssueType obj4 = (IssueType) IssueTypePeer.row2Object(row,
1575:                            offset4, omClass);
1576:
1577:                    newObject = true;
1578:                    for (int j = 0; j < results.size(); j++) {
1579:                        RModuleUserAttribute temp_obj1 = (RModuleUserAttribute) results
1580:                                .get(j);
1581:                        IssueType temp_obj4 = (IssueType) temp_obj1
1582:                                .getIssueType();
1583:                        if (temp_obj4.getPrimaryKey().equals(
1584:                                obj4.getPrimaryKey())) {
1585:                            newObject = false;
1586:                            temp_obj4.addRModuleUserAttribute(obj1);
1587:                            break;
1588:                        }
1589:                    }
1590:                    if (newObject) {
1591:                        obj4.initRModuleUserAttributes();
1592:                        obj4.addRModuleUserAttribute(obj1);
1593:                    }
1594:
1595:                    omClass = AttributePeer.getOMClass();
1596:                    Attribute obj5 = (Attribute) AttributePeer.row2Object(row,
1597:                            offset5, omClass);
1598:
1599:                    newObject = true;
1600:                    for (int j = 0; j < results.size(); j++) {
1601:                        RModuleUserAttribute temp_obj1 = (RModuleUserAttribute) results
1602:                                .get(j);
1603:                        Attribute temp_obj5 = (Attribute) temp_obj1
1604:                                .getAttribute();
1605:                        if (temp_obj5.getPrimaryKey().equals(
1606:                                obj5.getPrimaryKey())) {
1607:                            newObject = false;
1608:                            temp_obj5.addRModuleUserAttribute(obj1);
1609:                            break;
1610:                        }
1611:                    }
1612:                    if (newObject) {
1613:                        obj5.initRModuleUserAttributes();
1614:                        obj5.addRModuleUserAttribute(obj1);
1615:                    }
1616:                    results.add(obj1);
1617:                }
1618:                return results;
1619:            }
1620:
1621:            /**
1622:             * selects a collection of RModuleUserAttribute objects pre-filled with
1623:             * all related objects.
1624:             *
1625:             * This method is protected by default in order to keep the public
1626:             * api reasonable.  You can provide public methods for those you
1627:             * actually need in RModuleUserAttributePeer.
1628:             *
1629:             * @throws TorqueException Any exceptions caught during processing will be
1630:             *         rethrown wrapped into a TorqueException.
1631:             */
1632:            protected static List doSelectJoinAllExceptIssueType(
1633:                    Criteria criteria) throws TorqueException {
1634:                return doSelectJoinAllExceptIssueType(criteria, null);
1635:            }
1636:
1637:            /**
1638:             * selects a collection of RModuleUserAttribute objects pre-filled with
1639:             * all related objects.
1640:             *
1641:             * This method is protected by default in order to keep the public
1642:             * api reasonable.  You can provide public methods for those you
1643:             * actually need in RModuleUserAttributePeer.
1644:             *
1645:             * @throws TorqueException Any exceptions caught during processing will be
1646:             *         rethrown wrapped into a TorqueException.
1647:             */
1648:            protected static List doSelectJoinAllExceptIssueType(
1649:                    Criteria criteria, Connection conn) throws TorqueException {
1650:                setDbName(criteria);
1651:
1652:                addSelectColumns(criteria);
1653:                int offset2 = numColumns + 1;
1654:
1655:                MITListPeer.addSelectColumns(criteria);
1656:                criteria.addJoin(RModuleUserAttributePeer.LIST_ID,
1657:                        MITListPeer.LIST_ID);
1658:                int offset3 = offset2 + MITListPeer.numColumns;
1659:
1660:                ScarabModulePeer.addSelectColumns(criteria);
1661:                criteria.addJoin(RModuleUserAttributePeer.MODULE_ID,
1662:                        ScarabModulePeer.MODULE_ID);
1663:                int offset4 = offset3 + ScarabModulePeer.numColumns;
1664:
1665:                ScarabUserImplPeer.addSelectColumns(criteria);
1666:                criteria.addJoin(RModuleUserAttributePeer.USER_ID,
1667:                        ScarabUserImplPeer.USER_ID);
1668:                int offset5 = offset4 + ScarabUserImplPeer.numColumns;
1669:
1670:                AttributePeer.addSelectColumns(criteria);
1671:                criteria.addJoin(RModuleUserAttributePeer.ATTRIBUTE_ID,
1672:                        AttributePeer.ATTRIBUTE_ID);
1673:
1674:                correctBooleans(criteria);
1675:
1676:                List rows;
1677:                if (conn == null) {
1678:                    rows = BasePeer.doSelect(criteria);
1679:                } else {
1680:                    rows = BasePeer.doSelect(criteria, conn);
1681:                }
1682:
1683:                List results = new ArrayList();
1684:
1685:                for (int i = 0; i < rows.size(); i++) {
1686:                    Record row = (Record) rows.get(i);
1687:
1688:                    Class omClass = RModuleUserAttributePeer.getOMClass();
1689:                    RModuleUserAttribute obj1 = (RModuleUserAttribute) RModuleUserAttributePeer
1690:                            .row2Object(row, 1, omClass);
1691:
1692:                    omClass = MITListPeer.getOMClass();
1693:                    MITList obj2 = (MITList) MITListPeer.row2Object(row,
1694:                            offset2, omClass);
1695:
1696:                    boolean newObject = true;
1697:                    for (int j = 0; j < results.size(); j++) {
1698:                        RModuleUserAttribute temp_obj1 = (RModuleUserAttribute) results
1699:                                .get(j);
1700:                        MITList temp_obj2 = (MITList) temp_obj1.getMITList();
1701:                        if (temp_obj2.getPrimaryKey().equals(
1702:                                obj2.getPrimaryKey())) {
1703:                            newObject = false;
1704:                            temp_obj2.addRModuleUserAttribute(obj1);
1705:                            break;
1706:                        }
1707:                    }
1708:                    if (newObject) {
1709:                        obj2.initRModuleUserAttributes();
1710:                        obj2.addRModuleUserAttribute(obj1);
1711:                    }
1712:
1713:                    omClass = ScarabModulePeer.getOMClass(row, offset3);
1714:                    ScarabModule obj3 = (ScarabModule) ScarabModulePeer
1715:                            .row2Object(row, offset3, omClass);
1716:
1717:                    newObject = true;
1718:                    for (int j = 0; j < results.size(); j++) {
1719:                        RModuleUserAttribute temp_obj1 = (RModuleUserAttribute) results
1720:                                .get(j);
1721:                        ScarabModule temp_obj3 = (ScarabModule) temp_obj1
1722:                                .getModule();
1723:                        if (temp_obj3.getPrimaryKey().equals(
1724:                                obj3.getPrimaryKey())) {
1725:                            newObject = false;
1726:                            temp_obj3.addRModuleUserAttribute(obj1);
1727:                            break;
1728:                        }
1729:                    }
1730:                    if (newObject) {
1731:                        obj3.initRModuleUserAttributes();
1732:                        obj3.addRModuleUserAttribute(obj1);
1733:                    }
1734:
1735:                    omClass = ScarabUserImplPeer.getOMClass();
1736:                    ScarabUserImpl obj4 = (ScarabUserImpl) ScarabUserImplPeer
1737:                            .row2Object(row, offset4, omClass);
1738:
1739:                    newObject = true;
1740:                    for (int j = 0; j < results.size(); j++) {
1741:                        RModuleUserAttribute temp_obj1 = (RModuleUserAttribute) results
1742:                                .get(j);
1743:                        ScarabUserImpl temp_obj4 = (ScarabUserImpl) temp_obj1
1744:                                .getScarabUser();
1745:                        if (temp_obj4.getPrimaryKey().equals(
1746:                                obj4.getPrimaryKey())) {
1747:                            newObject = false;
1748:                            temp_obj4.addRModuleUserAttribute(obj1);
1749:                            break;
1750:                        }
1751:                    }
1752:                    if (newObject) {
1753:                        obj4.initRModuleUserAttributes();
1754:                        obj4.addRModuleUserAttribute(obj1);
1755:                    }
1756:
1757:                    omClass = AttributePeer.getOMClass();
1758:                    Attribute obj5 = (Attribute) AttributePeer.row2Object(row,
1759:                            offset5, omClass);
1760:
1761:                    newObject = true;
1762:                    for (int j = 0; j < results.size(); j++) {
1763:                        RModuleUserAttribute temp_obj1 = (RModuleUserAttribute) results
1764:                                .get(j);
1765:                        Attribute temp_obj5 = (Attribute) temp_obj1
1766:                                .getAttribute();
1767:                        if (temp_obj5.getPrimaryKey().equals(
1768:                                obj5.getPrimaryKey())) {
1769:                            newObject = false;
1770:                            temp_obj5.addRModuleUserAttribute(obj1);
1771:                            break;
1772:                        }
1773:                    }
1774:                    if (newObject) {
1775:                        obj5.initRModuleUserAttributes();
1776:                        obj5.addRModuleUserAttribute(obj1);
1777:                    }
1778:                    results.add(obj1);
1779:                }
1780:                return results;
1781:            }
1782:
1783:            /**
1784:             * selects a collection of RModuleUserAttribute objects pre-filled with
1785:             * all related objects.
1786:             *
1787:             * This method is protected by default in order to keep the public
1788:             * api reasonable.  You can provide public methods for those you
1789:             * actually need in RModuleUserAttributePeer.
1790:             *
1791:             * @throws TorqueException Any exceptions caught during processing will be
1792:             *         rethrown wrapped into a TorqueException.
1793:             */
1794:            protected static List doSelectJoinAllExceptAttribute(
1795:                    Criteria criteria) throws TorqueException {
1796:                return doSelectJoinAllExceptAttribute(criteria, null);
1797:            }
1798:
1799:            /**
1800:             * selects a collection of RModuleUserAttribute objects pre-filled with
1801:             * all related objects.
1802:             *
1803:             * This method is protected by default in order to keep the public
1804:             * api reasonable.  You can provide public methods for those you
1805:             * actually need in RModuleUserAttributePeer.
1806:             *
1807:             * @throws TorqueException Any exceptions caught during processing will be
1808:             *         rethrown wrapped into a TorqueException.
1809:             */
1810:            protected static List doSelectJoinAllExceptAttribute(
1811:                    Criteria criteria, Connection conn) throws TorqueException {
1812:                setDbName(criteria);
1813:
1814:                addSelectColumns(criteria);
1815:                int offset2 = numColumns + 1;
1816:
1817:                MITListPeer.addSelectColumns(criteria);
1818:                criteria.addJoin(RModuleUserAttributePeer.LIST_ID,
1819:                        MITListPeer.LIST_ID);
1820:                int offset3 = offset2 + MITListPeer.numColumns;
1821:
1822:                ScarabModulePeer.addSelectColumns(criteria);
1823:                criteria.addJoin(RModuleUserAttributePeer.MODULE_ID,
1824:                        ScarabModulePeer.MODULE_ID);
1825:                int offset4 = offset3 + ScarabModulePeer.numColumns;
1826:
1827:                ScarabUserImplPeer.addSelectColumns(criteria);
1828:                criteria.addJoin(RModuleUserAttributePeer.USER_ID,
1829:                        ScarabUserImplPeer.USER_ID);
1830:                int offset5 = offset4 + ScarabUserImplPeer.numColumns;
1831:
1832:                IssueTypePeer.addSelectColumns(criteria);
1833:                criteria.addJoin(RModuleUserAttributePeer.ISSUE_TYPE_ID,
1834:                        IssueTypePeer.ISSUE_TYPE_ID);
1835:
1836:                correctBooleans(criteria);
1837:
1838:                List rows;
1839:                if (conn == null) {
1840:                    rows = BasePeer.doSelect(criteria);
1841:                } else {
1842:                    rows = BasePeer.doSelect(criteria, conn);
1843:                }
1844:
1845:                List results = new ArrayList();
1846:
1847:                for (int i = 0; i < rows.size(); i++) {
1848:                    Record row = (Record) rows.get(i);
1849:
1850:                    Class omClass = RModuleUserAttributePeer.getOMClass();
1851:                    RModuleUserAttribute obj1 = (RModuleUserAttribute) RModuleUserAttributePeer
1852:                            .row2Object(row, 1, omClass);
1853:
1854:                    omClass = MITListPeer.getOMClass();
1855:                    MITList obj2 = (MITList) MITListPeer.row2Object(row,
1856:                            offset2, omClass);
1857:
1858:                    boolean newObject = true;
1859:                    for (int j = 0; j < results.size(); j++) {
1860:                        RModuleUserAttribute temp_obj1 = (RModuleUserAttribute) results
1861:                                .get(j);
1862:                        MITList temp_obj2 = (MITList) temp_obj1.getMITList();
1863:                        if (temp_obj2.getPrimaryKey().equals(
1864:                                obj2.getPrimaryKey())) {
1865:                            newObject = false;
1866:                            temp_obj2.addRModuleUserAttribute(obj1);
1867:                            break;
1868:                        }
1869:                    }
1870:                    if (newObject) {
1871:                        obj2.initRModuleUserAttributes();
1872:                        obj2.addRModuleUserAttribute(obj1);
1873:                    }
1874:
1875:                    omClass = ScarabModulePeer.getOMClass(row, offset3);
1876:                    ScarabModule obj3 = (ScarabModule) ScarabModulePeer
1877:                            .row2Object(row, offset3, omClass);
1878:
1879:                    newObject = true;
1880:                    for (int j = 0; j < results.size(); j++) {
1881:                        RModuleUserAttribute temp_obj1 = (RModuleUserAttribute) results
1882:                                .get(j);
1883:                        ScarabModule temp_obj3 = (ScarabModule) temp_obj1
1884:                                .getModule();
1885:                        if (temp_obj3.getPrimaryKey().equals(
1886:                                obj3.getPrimaryKey())) {
1887:                            newObject = false;
1888:                            temp_obj3.addRModuleUserAttribute(obj1);
1889:                            break;
1890:                        }
1891:                    }
1892:                    if (newObject) {
1893:                        obj3.initRModuleUserAttributes();
1894:                        obj3.addRModuleUserAttribute(obj1);
1895:                    }
1896:
1897:                    omClass = ScarabUserImplPeer.getOMClass();
1898:                    ScarabUserImpl obj4 = (ScarabUserImpl) ScarabUserImplPeer
1899:                            .row2Object(row, offset4, omClass);
1900:
1901:                    newObject = true;
1902:                    for (int j = 0; j < results.size(); j++) {
1903:                        RModuleUserAttribute temp_obj1 = (RModuleUserAttribute) results
1904:                                .get(j);
1905:                        ScarabUserImpl temp_obj4 = (ScarabUserImpl) temp_obj1
1906:                                .getScarabUser();
1907:                        if (temp_obj4.getPrimaryKey().equals(
1908:                                obj4.getPrimaryKey())) {
1909:                            newObject = false;
1910:                            temp_obj4.addRModuleUserAttribute(obj1);
1911:                            break;
1912:                        }
1913:                    }
1914:                    if (newObject) {
1915:                        obj4.initRModuleUserAttributes();
1916:                        obj4.addRModuleUserAttribute(obj1);
1917:                    }
1918:
1919:                    omClass = IssueTypePeer.getOMClass();
1920:                    IssueType obj5 = (IssueType) IssueTypePeer.row2Object(row,
1921:                            offset5, omClass);
1922:
1923:                    newObject = true;
1924:                    for (int j = 0; j < results.size(); j++) {
1925:                        RModuleUserAttribute temp_obj1 = (RModuleUserAttribute) results
1926:                                .get(j);
1927:                        IssueType temp_obj5 = (IssueType) temp_obj1
1928:                                .getIssueType();
1929:                        if (temp_obj5.getPrimaryKey().equals(
1930:                                obj5.getPrimaryKey())) {
1931:                            newObject = false;
1932:                            temp_obj5.addRModuleUserAttribute(obj1);
1933:                            break;
1934:                        }
1935:                    }
1936:                    if (newObject) {
1937:                        obj5.initRModuleUserAttributes();
1938:                        obj5.addRModuleUserAttribute(obj1);
1939:                    }
1940:
1941:                    results.add(obj1);
1942:                }
1943:                return results;
1944:            }
1945:
1946:            /**
1947:             * Returns the TableMap related to this peer.  This method is not
1948:             * needed for general use but a specific application could have a need.
1949:             *
1950:             * @throws TorqueException Any exceptions caught during processing will be
1951:             *         rethrown wrapped into a TorqueException.
1952:             */
1953:            protected static TableMap getTableMap() throws TorqueException {
1954:                return Torque.getDatabaseMap(DATABASE_NAME)
1955:                        .getTable(TABLE_NAME);
1956:            }
1957:
1958:            private static void setDbName(Criteria crit) {
1959:                // Set the correct dbName if it has not been overridden
1960:                // crit.getDbName will return the same object if not set to
1961:                // another value so == check is okay and faster
1962:                if (crit.getDbName() == Torque.getDefaultDB()) {
1963:                    crit.setDbName(DATABASE_NAME);
1964:                }
1965:            }
1966:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.