/** * selects a collection of TRoleListType objects pre-filled with their TListType objects. * * <p>This method is protected by default in order to keep the public api reasonable. You can * provide public methods for those you actually need in TRoleListTypePeer. * * @throws TorqueException Any exceptions caught during processing will be rethrown wrapped into a * TorqueException. */ protected static List<TRoleListType> doSelectJoinTListType(Criteria criteria, Connection conn) throws TorqueException { setDbName(criteria); TRoleListTypePeer.addSelectColumns(criteria); int offset = numColumns + 1; TListTypePeer.addSelectColumns(criteria); criteria.addJoin(TRoleListTypePeer.LISTTYPE, TListTypePeer.PKEY); correctBooleans(criteria); List<Record> rows; if (conn == null) { rows = BasePeer.doSelect(criteria); } else { rows = BasePeer.doSelect(criteria, conn); } List<TRoleListType> results = new ArrayList<TRoleListType>(); for (int i = 0; i < rows.size(); i++) { Record row = rows.get(i); Class omClass = TRoleListTypePeer.getOMClass(); TRoleListType obj1 = (TRoleListType) TRoleListTypePeer.row2Object(row, 1, omClass); omClass = TListTypePeer.getOMClass(); TListType obj2 = (TListType) TListTypePeer.row2Object(row, offset, omClass); boolean newObject = true; for (int j = 0; j < results.size(); j++) { TRoleListType temp_obj1 = results.get(j); TListType temp_obj2 = (TListType) temp_obj1.getTListType(); if (temp_obj2.getPrimaryKey().equals(obj2.getPrimaryKey())) { newObject = false; temp_obj2.addTRoleListType(obj1); break; } } if (newObject) { obj2.initTRoleListTypes(); obj2.addTRoleListType(obj1); } results.add(obj1); } return results; }