Exemplo n.º 1
0
 public static function doSelectJoinAllExceptGradeComponent(Criteria $c, $con = null)
 {
     $c = clone $c;
     if ($c->getDbName() == Propel::getDefaultDB()) {
         $c->setDbName(self::DATABASE_NAME);
     }
     SchedulePeer::addSelectColumns($c);
     $startcol2 = SchedulePeer::NUM_COLUMNS - SchedulePeer::NUM_LAZY_LOAD_COLUMNS + 1;
     SubjectCurrPeer::addSelectColumns($c);
     $startcol3 = $startcol2 + SubjectCurrPeer::NUM_COLUMNS;
     EmployeePeer::addSelectColumns($c);
     $startcol4 = $startcol3 + EmployeePeer::NUM_COLUMNS;
     ClassGroupPeer::addSelectColumns($c);
     $startcol5 = $startcol4 + ClassGroupPeer::NUM_COLUMNS;
     LocationPeer::addSelectColumns($c);
     $startcol6 = $startcol5 + LocationPeer::NUM_COLUMNS;
     ClassSessionPeer::addSelectColumns($c);
     $startcol7 = $startcol6 + ClassSessionPeer::NUM_COLUMNS;
     AcademicCalendarPeer::addSelectColumns($c);
     $startcol8 = $startcol7 + AcademicCalendarPeer::NUM_COLUMNS;
     GradeSpecPeer::addSelectColumns($c);
     $startcol9 = $startcol8 + GradeSpecPeer::NUM_COLUMNS;
     $c->addJoin(SchedulePeer::SUBJECT_CURR_ID, SubjectCurrPeer::ID);
     $c->addJoin(SchedulePeer::EMPLOYEE_ID, EmployeePeer::ID);
     $c->addJoin(SchedulePeer::CLASS_GROUP_ID, ClassGroupPeer::ID);
     $c->addJoin(SchedulePeer::LOCATION_ID, LocationPeer::ID);
     $c->addJoin(SchedulePeer::CLASS_SESSION_ID, ClassSessionPeer::ID);
     $c->addJoin(SchedulePeer::ACADEMIC_CALENDAR_ID, AcademicCalendarPeer::ID);
     $c->addJoin(SchedulePeer::GRADE_SPEC_ID, GradeSpecPeer::ID);
     $rs = BasePeer::doSelect($c, $con);
     $results = array();
     while ($rs->next()) {
         $omClass = SchedulePeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj1 = new $cls();
         $obj1->hydrate($rs);
         $omClass = SubjectCurrPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj2 = new $cls();
         $obj2->hydrate($rs, $startcol2);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj2 = $temp_obj1->getSubjectCurr();
             if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj2->addSchedule($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj2->initSchedules();
             $obj2->addSchedule($obj1);
         }
         $omClass = EmployeePeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj3 = new $cls();
         $obj3->hydrate($rs, $startcol3);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj3 = $temp_obj1->getEmployee();
             if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj3->addSchedule($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj3->initSchedules();
             $obj3->addSchedule($obj1);
         }
         $omClass = ClassGroupPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj4 = new $cls();
         $obj4->hydrate($rs, $startcol4);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj4 = $temp_obj1->getClassGroup();
             if ($temp_obj4->getPrimaryKey() === $obj4->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj4->addSchedule($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj4->initSchedules();
             $obj4->addSchedule($obj1);
         }
         $omClass = LocationPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj5 = new $cls();
         $obj5->hydrate($rs, $startcol5);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj5 = $temp_obj1->getLocation();
             if ($temp_obj5->getPrimaryKey() === $obj5->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj5->addSchedule($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj5->initSchedules();
             $obj5->addSchedule($obj1);
         }
         $omClass = ClassSessionPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj6 = new $cls();
         $obj6->hydrate($rs, $startcol6);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj6 = $temp_obj1->getClassSession();
             if ($temp_obj6->getPrimaryKey() === $obj6->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj6->addSchedule($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj6->initSchedules();
             $obj6->addSchedule($obj1);
         }
         $omClass = AcademicCalendarPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj7 = new $cls();
         $obj7->hydrate($rs, $startcol7);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj7 = $temp_obj1->getAcademicCalendar();
             if ($temp_obj7->getPrimaryKey() === $obj7->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj7->addSchedule($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj7->initSchedules();
             $obj7->addSchedule($obj1);
         }
         $omClass = GradeSpecPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj8 = new $cls();
         $obj8->hydrate($rs, $startcol8);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj8 = $temp_obj1->getGradeSpec();
             if ($temp_obj8->getPrimaryKey() === $obj8->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj8->addSchedule($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj8->initSchedules();
             $obj8->addSchedule($obj1);
         }
         $results[] = $obj1;
     }
     return $results;
 }
Exemplo n.º 2
0
 public static function doSelectJoinAllExceptEmployee(Criteria $c, $con = null)
 {
     $c = clone $c;
     if ($c->getDbName() == Propel::getDefaultDB()) {
         $c->setDbName(self::DATABASE_NAME);
     }
     ClassAgendaPeer::addSelectColumns($c);
     $startcol2 = ClassAgendaPeer::NUM_COLUMNS - ClassAgendaPeer::NUM_LAZY_LOAD_COLUMNS + 1;
     CourseSchedulePeer::addSelectColumns($c);
     $startcol3 = $startcol2 + CourseSchedulePeer::NUM_COLUMNS;
     ClassSessionPeer::addSelectColumns($c);
     $startcol4 = $startcol3 + ClassSessionPeer::NUM_COLUMNS;
     SubjectGradingPeer::addSelectColumns($c);
     $startcol5 = $startcol4 + SubjectGradingPeer::NUM_COLUMNS;
     StudentPeer::addSelectColumns($c);
     $startcol6 = $startcol5 + StudentPeer::NUM_COLUMNS;
     StudentAbsencePeer::addSelectColumns($c);
     $startcol7 = $startcol6 + StudentAbsencePeer::NUM_COLUMNS;
     ClassGroupPeer::addSelectColumns($c);
     $startcol8 = $startcol7 + ClassGroupPeer::NUM_COLUMNS;
     SchedulePeer::addSelectColumns($c);
     $startcol9 = $startcol8 + SchedulePeer::NUM_COLUMNS;
     $c->addJoin(ClassAgendaPeer::COURSE_SCHEDULE_ID, CourseSchedulePeer::ID);
     $c->addJoin(ClassAgendaPeer::CLASS_SESSION_ID, ClassSessionPeer::ID);
     $c->addJoin(ClassAgendaPeer::SUBJECT_GRADING_ID, SubjectGradingPeer::ID);
     $c->addJoin(ClassAgendaPeer::STUDENT_ID, StudentPeer::ID);
     $c->addJoin(ClassAgendaPeer::STUDENT_ABSENCE_ID, StudentAbsencePeer::ID);
     $c->addJoin(ClassAgendaPeer::CLASS_GROUP_ID, ClassGroupPeer::ID);
     $c->addJoin(ClassAgendaPeer::SCHEDULE_ID, SchedulePeer::ID);
     $rs = BasePeer::doSelect($c, $con);
     $results = array();
     while ($rs->next()) {
         $omClass = ClassAgendaPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj1 = new $cls();
         $obj1->hydrate($rs);
         $omClass = CourseSchedulePeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj2 = new $cls();
         $obj2->hydrate($rs, $startcol2);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj2 = $temp_obj1->getCourseSchedule();
             if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj2->addClassAgenda($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj2->initClassAgendas();
             $obj2->addClassAgenda($obj1);
         }
         $omClass = ClassSessionPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj3 = new $cls();
         $obj3->hydrate($rs, $startcol3);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj3 = $temp_obj1->getClassSession();
             if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj3->addClassAgenda($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj3->initClassAgendas();
             $obj3->addClassAgenda($obj1);
         }
         $omClass = SubjectGradingPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj4 = new $cls();
         $obj4->hydrate($rs, $startcol4);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj4 = $temp_obj1->getSubjectGrading();
             if ($temp_obj4->getPrimaryKey() === $obj4->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj4->addClassAgenda($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj4->initClassAgendas();
             $obj4->addClassAgenda($obj1);
         }
         $omClass = StudentPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj5 = new $cls();
         $obj5->hydrate($rs, $startcol5);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj5 = $temp_obj1->getStudent();
             if ($temp_obj5->getPrimaryKey() === $obj5->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj5->addClassAgenda($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj5->initClassAgendas();
             $obj5->addClassAgenda($obj1);
         }
         $omClass = StudentAbsencePeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj6 = new $cls();
         $obj6->hydrate($rs, $startcol6);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj6 = $temp_obj1->getStudentAbsence();
             if ($temp_obj6->getPrimaryKey() === $obj6->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj6->addClassAgenda($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj6->initClassAgendas();
             $obj6->addClassAgenda($obj1);
         }
         $omClass = ClassGroupPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj7 = new $cls();
         $obj7->hydrate($rs, $startcol7);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj7 = $temp_obj1->getClassGroup();
             if ($temp_obj7->getPrimaryKey() === $obj7->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj7->addClassAgenda($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj7->initClassAgendas();
             $obj7->addClassAgenda($obj1);
         }
         $omClass = SchedulePeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj8 = new $cls();
         $obj8->hydrate($rs, $startcol8);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj8 = $temp_obj1->getSchedule();
             if ($temp_obj8->getPrimaryKey() === $obj8->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj8->addClassAgenda($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj8->initClassAgendas();
             $obj8->addClassAgenda($obj1);
         }
         $results[] = $obj1;
     }
     return $results;
 }
Exemplo n.º 3
0
 public static function doSelectJoinAllExceptLocation(Criteria $c, $con = null)
 {
     $c = clone $c;
     if ($c->getDbName() == Propel::getDefaultDB()) {
         $c->setDbName(self::DATABASE_NAME);
     }
     ScheduleDetailPeer::addSelectColumns($c);
     $startcol2 = ScheduleDetailPeer::NUM_COLUMNS - ScheduleDetailPeer::NUM_LAZY_LOAD_COLUMNS + 1;
     SchedulePeer::addSelectColumns($c);
     $startcol3 = $startcol2 + SchedulePeer::NUM_COLUMNS;
     ClassSessionPeer::addSelectColumns($c);
     $startcol4 = $startcol3 + ClassSessionPeer::NUM_COLUMNS;
     $c->addJoin(ScheduleDetailPeer::SCHEDULE_ID, SchedulePeer::ID);
     $c->addJoin(ScheduleDetailPeer::CLASS_SESSION_ID, ClassSessionPeer::ID);
     $rs = BasePeer::doSelect($c, $con);
     $results = array();
     while ($rs->next()) {
         $omClass = ScheduleDetailPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj1 = new $cls();
         $obj1->hydrate($rs);
         $omClass = SchedulePeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj2 = new $cls();
         $obj2->hydrate($rs, $startcol2);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj2 = $temp_obj1->getSchedule();
             if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj2->addScheduleDetail($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj2->initScheduleDetails();
             $obj2->addScheduleDetail($obj1);
         }
         $omClass = ClassSessionPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj3 = new $cls();
         $obj3->hydrate($rs, $startcol3);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj3 = $temp_obj1->getClassSession();
             if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj3->addScheduleDetail($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj3->initScheduleDetails();
             $obj3->addScheduleDetail($obj1);
         }
         $results[] = $obj1;
     }
     return $results;
 }
Exemplo n.º 4
0
 public static function doSelectJoinAll(Criteria $c, $con = null)
 {
     $c = clone $c;
     if ($c->getDbName() == Propel::getDefaultDB()) {
         $c->setDbName(self::DATABASE_NAME);
     }
     ClassSessionPeer::addSelectColumns($c);
     $startcol2 = ClassSessionPeer::NUM_COLUMNS - ClassSessionPeer::NUM_LAZY_LOAD_COLUMNS + 1;
     DepartmentPeer::addSelectColumns($c);
     $startcol3 = $startcol2 + DepartmentPeer::NUM_COLUMNS;
     $c->addJoin(ClassSessionPeer::DEPARTMENT_ID, DepartmentPeer::ID);
     $rs = BasePeer::doSelect($c, $con);
     $results = array();
     while ($rs->next()) {
         $omClass = ClassSessionPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj1 = new $cls();
         $obj1->hydrate($rs);
         $omClass = DepartmentPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj2 = new $cls();
         $obj2->hydrate($rs, $startcol2);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj2 = $temp_obj1->getDepartment();
             if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj2->addClassSession($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj2->initClassSessions();
             $obj2->addClassSession($obj1);
         }
         $results[] = $obj1;
     }
     return $results;
 }