Exemplo n.º 1
0
 public static function doSelectJoinAllExceptLeaveType(Criteria $c, $con = null)
 {
     $c = clone $c;
     if ($c->getDbName() == Propel::getDefaultDB()) {
         $c->setDbName(self::DATABASE_NAME);
     }
     EmployeeLeavePeer::addSelectColumns($c);
     $startcol2 = EmployeeLeavePeer::NUM_COLUMNS - EmployeeLeavePeer::NUM_LAZY_LOAD_COLUMNS + 1;
     EmployeePeer::addSelectColumns($c);
     $startcol3 = $startcol2 + EmployeePeer::NUM_COLUMNS;
     DepartmentPeer::addSelectColumns($c);
     $startcol4 = $startcol3 + DepartmentPeer::NUM_COLUMNS;
     AcademicCalendarPeer::addSelectColumns($c);
     $startcol5 = $startcol4 + AcademicCalendarPeer::NUM_COLUMNS;
     EmployeeLevelPeer::addSelectColumns($c);
     $startcol6 = $startcol5 + EmployeeLevelPeer::NUM_COLUMNS;
     EmployeeDivisionPeer::addSelectColumns($c);
     $startcol7 = $startcol6 + EmployeeDivisionPeer::NUM_COLUMNS;
     $c->addJoin(EmployeeLeavePeer::EMPLOYEE_ID, EmployeePeer::ID);
     $c->addJoin(EmployeeLeavePeer::DEPARTMENT_ID, DepartmentPeer::ID);
     $c->addJoin(EmployeeLeavePeer::ACADEMIC_CALENDAR_ID, AcademicCalendarPeer::ID);
     $c->addJoin(EmployeeLeavePeer::EMPLOYEE_LEVEL_ID, EmployeeLevelPeer::ID);
     $c->addJoin(EmployeeLeavePeer::EMPLOYEE_DIVISION_ID, EmployeeDivisionPeer::ID);
     $rs = BasePeer::doSelect($c, $con);
     $results = array();
     while ($rs->next()) {
         $omClass = EmployeeLeavePeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj1 = new $cls();
         $obj1->hydrate($rs);
         $omClass = EmployeePeer::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->getEmployee();
             if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj2->addEmployeeLeave($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj2->initEmployeeLeaves();
             $obj2->addEmployeeLeave($obj1);
         }
         $omClass = DepartmentPeer::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->getDepartment();
             if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj3->addEmployeeLeave($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj3->initEmployeeLeaves();
             $obj3->addEmployeeLeave($obj1);
         }
         $omClass = AcademicCalendarPeer::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->getAcademicCalendar();
             if ($temp_obj4->getPrimaryKey() === $obj4->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj4->addEmployeeLeave($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj4->initEmployeeLeaves();
             $obj4->addEmployeeLeave($obj1);
         }
         $omClass = EmployeeLevelPeer::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->getEmployeeLevel();
             if ($temp_obj5->getPrimaryKey() === $obj5->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj5->addEmployeeLeave($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj5->initEmployeeLeaves();
             $obj5->addEmployeeLeave($obj1);
         }
         $omClass = EmployeeDivisionPeer::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->getEmployeeDivision();
             if ($temp_obj6->getPrimaryKey() === $obj6->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj6->addEmployeeLeave($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj6->initEmployeeLeaves();
             $obj6->addEmployeeLeave($obj1);
         }
         $results[] = $obj1;
     }
     return $results;
 }
Exemplo n.º 2
0
 public static function doSelectJoinAllExceptStudentDetail(Criteria $c, $con = null)
 {
     $c = clone $c;
     if ($c->getDbName() == Propel::getDefaultDB()) {
         $c->setDbName(self::DATABASE_NAME);
     }
     VMemberStudentPeer::addSelectColumns($c);
     $startcol2 = VMemberStudentPeer::NUM_COLUMNS - VMemberStudentPeer::NUM_LAZY_LOAD_COLUMNS + 1;
     MemberDetailPeer::addSelectColumns($c);
     $startcol3 = $startcol2 + MemberDetailPeer::NUM_COLUMNS;
     DepartmentPeer::addSelectColumns($c);
     $startcol4 = $startcol3 + DepartmentPeer::NUM_COLUMNS;
     AcademicCalendarPeer::addSelectColumns($c);
     $startcol5 = $startcol4 + AcademicCalendarPeer::NUM_COLUMNS;
     ClassGroupPeer::addSelectColumns($c);
     $startcol6 = $startcol5 + ClassGroupPeer::NUM_COLUMNS;
     StudentPeer::addSelectColumns($c);
     $startcol7 = $startcol6 + StudentPeer::NUM_COLUMNS;
     $c->addJoin(VMemberStudentPeer::MEMBER_DETAIL_ID, MemberDetailPeer::ID);
     $c->addJoin(VMemberStudentPeer::DEPARTMENT_ID, DepartmentPeer::ID);
     $c->addJoin(VMemberStudentPeer::ACADEMIC_CALENDAR_ID, AcademicCalendarPeer::ID);
     $c->addJoin(VMemberStudentPeer::CLASS_GROUP_ID, ClassGroupPeer::ID);
     $c->addJoin(VMemberStudentPeer::STUDENT_ID, StudentPeer::ID);
     $rs = BasePeer::doSelect($c, $con);
     $results = array();
     while ($rs->next()) {
         $omClass = VMemberStudentPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj1 = new $cls();
         $obj1->hydrate($rs);
         $omClass = MemberDetailPeer::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->getMemberDetail();
             if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj2->addVMemberStudent($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj2->initVMemberStudents();
             $obj2->addVMemberStudent($obj1);
         }
         $omClass = DepartmentPeer::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->getDepartment();
             if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj3->addVMemberStudent($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj3->initVMemberStudents();
             $obj3->addVMemberStudent($obj1);
         }
         $omClass = AcademicCalendarPeer::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->getAcademicCalendar();
             if ($temp_obj4->getPrimaryKey() === $obj4->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj4->addVMemberStudent($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj4->initVMemberStudents();
             $obj4->addVMemberStudent($obj1);
         }
         $omClass = ClassGroupPeer::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->getClassGroup();
             if ($temp_obj5->getPrimaryKey() === $obj5->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj5->addVMemberStudent($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj5->initVMemberStudents();
             $obj5->addVMemberStudent($obj1);
         }
         $omClass = StudentPeer::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->getStudent();
             if ($temp_obj6->getPrimaryKey() === $obj6->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj6->addVMemberStudent($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj6->initVMemberStudents();
             $obj6->addVMemberStudent($obj1);
         }
         $results[] = $obj1;
     }
     return $results;
 }
 /**
  * The returned array will contain objects of the default type or
  * objects that inherit from the default.
  *
  * @throws     PropelException Any exceptions caught during processing will be
  *		 rethrown wrapped into a PropelException.
  */
 public static function populateObjects(PDOStatement $stmt)
 {
     $results = array();
     // set the class once to avoid overhead in the loop
     $cls = DepartmentPeer::getOMClass();
     $cls = substr('.' . $cls, strrpos('.' . $cls, '.') + 1);
     // populate the object(s)
     while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
         $key = DepartmentPeer::getPrimaryKeyHashFromRow($row, 0);
         if (null !== ($obj = DepartmentPeer::getInstanceFromPool($key))) {
             // We no longer rehydrate the object, since this can cause data loss.
             // See http://propel.phpdb.org/trac/ticket/509
             // $obj->hydrate($row, 0, true); // rehydrate
             $results[] = $obj;
         } else {
             $obj = new $cls();
             $obj->hydrate($row);
             $results[] = $obj;
             DepartmentPeer::addInstanceToPool($obj, $key);
         }
         // if key exists
     }
     $stmt->closeCursor();
     return $results;
 }
Exemplo n.º 4
0
 public static function doSelectJoinAllExceptPayerType(Criteria $c, $con = null)
 {
     $c = clone $c;
     if ($c->getDbName() == Propel::getDefaultDB()) {
         $c->setDbName(self::DATABASE_NAME);
     }
     VStudentTypePeer::addSelectColumns($c);
     $startcol2 = VStudentTypePeer::NUM_COLUMNS - VStudentTypePeer::NUM_LAZY_LOAD_COLUMNS + 1;
     AcademicCalendarPeer::addSelectColumns($c);
     $startcol3 = $startcol2 + AcademicCalendarPeer::NUM_COLUMNS;
     DepartmentPeer::addSelectColumns($c);
     $startcol4 = $startcol3 + DepartmentPeer::NUM_COLUMNS;
     $c->addJoin(VStudentTypePeer::ACADEMIC_CALENDAR_ID, AcademicCalendarPeer::ID);
     $c->addJoin(VStudentTypePeer::DEPARTMENT_ID, DepartmentPeer::ID);
     $rs = BasePeer::doSelect($c, $con);
     $results = array();
     while ($rs->next()) {
         $omClass = VStudentTypePeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj1 = new $cls();
         $obj1->hydrate($rs);
         $omClass = AcademicCalendarPeer::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->getAcademicCalendar();
             if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj2->addVStudentType($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj2->initVStudentTypes();
             $obj2->addVStudentType($obj1);
         }
         $omClass = DepartmentPeer::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->getDepartment();
             if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj3->addVStudentType($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj3->initVStudentTypes();
             $obj3->addVStudentType($obj1);
         }
         $results[] = $obj1;
     }
     return $results;
 }
Exemplo n.º 5
0
 public static function doSelectJoinAllExceptGradeSpec(Criteria $c, $con = null)
 {
     $c = clone $c;
     if ($c->getDbName() == Propel::getDefaultDB()) {
         $c->setDbName(self::DATABASE_NAME);
     }
     GradeComponentPeer::addSelectColumns($c);
     $startcol2 = GradeComponentPeer::NUM_COLUMNS - GradeComponentPeer::NUM_LAZY_LOAD_COLUMNS + 1;
     DepartmentPeer::addSelectColumns($c);
     $startcol3 = $startcol2 + DepartmentPeer::NUM_COLUMNS;
     $c->addJoin(GradeComponentPeer::DEPARTMENT_ID, DepartmentPeer::ID);
     $rs = BasePeer::doSelect($c, $con);
     $results = array();
     while ($rs->next()) {
         $omClass = GradeComponentPeer::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->addGradeComponent($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj2->initGradeComponents();
             $obj2->addGradeComponent($obj1);
         }
         $results[] = $obj1;
     }
     return $results;
 }
Exemplo n.º 6
0
 public static function doSelectJoinAllExceptClassLevelRelatedByLastClass(Criteria $c, $con = null)
 {
     $c = clone $c;
     if ($c->getDbName() == Propel::getDefaultDB()) {
         $c->setDbName(self::DATABASE_NAME);
     }
     NgTestApplicantPeer::addSelectColumns($c);
     $startcol2 = NgTestApplicantPeer::NUM_COLUMNS - NgTestApplicantPeer::NUM_LAZY_LOAD_COLUMNS + 1;
     NgRegInfoPeer::addSelectColumns($c);
     $startcol3 = $startcol2 + NgRegInfoPeer::NUM_COLUMNS;
     DepartmentPeer::addSelectColumns($c);
     $startcol4 = $startcol3 + DepartmentPeer::NUM_COLUMNS;
     NgRegTestPeriodPeer::addSelectColumns($c);
     $startcol5 = $startcol4 + NgRegTestPeriodPeer::NUM_COLUMNS;
     NgStatusApplicantPeer::addSelectColumns($c);
     $startcol6 = $startcol5 + NgStatusApplicantPeer::NUM_COLUMNS;
     NgApplicantCategoryPeer::addSelectColumns($c);
     $startcol7 = $startcol6 + NgApplicantCategoryPeer::NUM_COLUMNS;
     CountryPeer::addSelectColumns($c);
     $startcol8 = $startcol7 + CountryPeer::NUM_COLUMNS;
     ReligionPeer::addSelectColumns($c);
     $startcol9 = $startcol8 + ReligionPeer::NUM_COLUMNS;
     RegionPeer::addSelectColumns($c);
     $startcol10 = $startcol9 + RegionPeer::NUM_COLUMNS;
     CityPeer::addSelectColumns($c);
     $startcol11 = $startcol10 + CityPeer::NUM_COLUMNS;
     DistrictPeer::addSelectColumns($c);
     $startcol12 = $startcol11 + DistrictPeer::NUM_COLUMNS;
     SubdistrictPeer::addSelectColumns($c);
     $startcol13 = $startcol12 + SubdistrictPeer::NUM_COLUMNS;
     $c->addJoin(NgTestApplicantPeer::NG_REG_INFO_ID, NgRegInfoPeer::ID);
     $c->addJoin(NgTestApplicantPeer::DEPARTMENT_ID, DepartmentPeer::ID);
     $c->addJoin(NgTestApplicantPeer::NG_REG_TEST_PERIOD_ID, NgRegTestPeriodPeer::ID);
     $c->addJoin(NgTestApplicantPeer::NG_STATUS_APPLICANT_ID, NgStatusApplicantPeer::ID);
     $c->addJoin(NgTestApplicantPeer::NG_APPLICANT_CATEGORY_ID, NgApplicantCategoryPeer::ID);
     $c->addJoin(NgTestApplicantPeer::COUNTRY_ID, CountryPeer::ID);
     $c->addJoin(NgTestApplicantPeer::RELIGION_ID, ReligionPeer::ID);
     $c->addJoin(NgTestApplicantPeer::REGION_ID, RegionPeer::ID);
     $c->addJoin(NgTestApplicantPeer::CITY_ID, CityPeer::ID);
     $c->addJoin(NgTestApplicantPeer::DISTRICT_ID, DistrictPeer::ID);
     $c->addJoin(NgTestApplicantPeer::SUBDISTRICT_ID, SubdistrictPeer::ID);
     $rs = BasePeer::doSelect($c, $con);
     $results = array();
     while ($rs->next()) {
         $omClass = NgTestApplicantPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj1 = new $cls();
         $obj1->hydrate($rs);
         $omClass = NgRegInfoPeer::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->getNgRegInfo();
             if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj2->addNgTestApplicant($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj2->initNgTestApplicants();
             $obj2->addNgTestApplicant($obj1);
         }
         $omClass = DepartmentPeer::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->getDepartment();
             if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj3->addNgTestApplicant($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj3->initNgTestApplicants();
             $obj3->addNgTestApplicant($obj1);
         }
         $omClass = NgRegTestPeriodPeer::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->getNgRegTestPeriod();
             if ($temp_obj4->getPrimaryKey() === $obj4->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj4->addNgTestApplicant($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj4->initNgTestApplicants();
             $obj4->addNgTestApplicant($obj1);
         }
         $omClass = NgStatusApplicantPeer::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->getNgStatusApplicant();
             if ($temp_obj5->getPrimaryKey() === $obj5->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj5->addNgTestApplicant($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj5->initNgTestApplicants();
             $obj5->addNgTestApplicant($obj1);
         }
         $omClass = NgApplicantCategoryPeer::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->getNgApplicantCategory();
             if ($temp_obj6->getPrimaryKey() === $obj6->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj6->addNgTestApplicant($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj6->initNgTestApplicants();
             $obj6->addNgTestApplicant($obj1);
         }
         $omClass = CountryPeer::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->getCountry();
             if ($temp_obj7->getPrimaryKey() === $obj7->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj7->addNgTestApplicant($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj7->initNgTestApplicants();
             $obj7->addNgTestApplicant($obj1);
         }
         $omClass = ReligionPeer::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->getReligion();
             if ($temp_obj8->getPrimaryKey() === $obj8->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj8->addNgTestApplicant($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj8->initNgTestApplicants();
             $obj8->addNgTestApplicant($obj1);
         }
         $omClass = RegionPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj9 = new $cls();
         $obj9->hydrate($rs, $startcol9);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj9 = $temp_obj1->getRegion();
             if ($temp_obj9->getPrimaryKey() === $obj9->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj9->addNgTestApplicant($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj9->initNgTestApplicants();
             $obj9->addNgTestApplicant($obj1);
         }
         $omClass = CityPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj10 = new $cls();
         $obj10->hydrate($rs, $startcol10);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj10 = $temp_obj1->getCity();
             if ($temp_obj10->getPrimaryKey() === $obj10->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj10->addNgTestApplicant($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj10->initNgTestApplicants();
             $obj10->addNgTestApplicant($obj1);
         }
         $omClass = DistrictPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj11 = new $cls();
         $obj11->hydrate($rs, $startcol11);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj11 = $temp_obj1->getDistrict();
             if ($temp_obj11->getPrimaryKey() === $obj11->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj11->addNgTestApplicant($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj11->initNgTestApplicants();
             $obj11->addNgTestApplicant($obj1);
         }
         $omClass = SubdistrictPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj12 = new $cls();
         $obj12->hydrate($rs, $startcol12);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj12 = $temp_obj1->getSubdistrict();
             if ($temp_obj12->getPrimaryKey() === $obj12->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj12->addNgTestApplicant($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj12->initNgTestApplicants();
             $obj12->addNgTestApplicant($obj1);
         }
         $results[] = $obj1;
     }
     return $results;
 }
Exemplo n.º 7
0
 public static function doSelectJoinAllExceptStudent(Criteria $c, $con = null)
 {
     $c = clone $c;
     if ($c->getDbName() == Propel::getDefaultDB()) {
         $c->setDbName(self::DATABASE_NAME);
     }
     MemberPeer::addSelectColumns($c);
     $startcol2 = MemberPeer::NUM_COLUMNS - MemberPeer::NUM_LAZY_LOAD_COLUMNS + 1;
     MemberDetailPeer::addSelectColumns($c);
     $startcol3 = $startcol2 + MemberDetailPeer::NUM_COLUMNS;
     DepartmentPeer::addSelectColumns($c);
     $startcol4 = $startcol3 + DepartmentPeer::NUM_COLUMNS;
     StaffTypePeer::addSelectColumns($c);
     $startcol5 = $startcol4 + StaffTypePeer::NUM_COLUMNS;
     EmployeeDetailPeer::addSelectColumns($c);
     $startcol6 = $startcol5 + EmployeeDetailPeer::NUM_COLUMNS;
     $c->addJoin(MemberPeer::MEMBER_DETAIL_ID, MemberDetailPeer::ID);
     $c->addJoin(MemberPeer::DEPARTMENT_ID, DepartmentPeer::ID);
     $c->addJoin(MemberPeer::STAFF_TYPE_ID, StaffTypePeer::ID);
     $c->addJoin(MemberPeer::EMPLOYEE_DETAIL_ID, EmployeeDetailPeer::ID);
     $rs = BasePeer::doSelect($c, $con);
     $results = array();
     while ($rs->next()) {
         $omClass = MemberPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj1 = new $cls();
         $obj1->hydrate($rs);
         $omClass = MemberDetailPeer::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->getMemberDetail();
             if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj2->addMember($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj2->initMembers();
             $obj2->addMember($obj1);
         }
         $omClass = DepartmentPeer::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->getDepartment();
             if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj3->addMember($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj3->initMembers();
             $obj3->addMember($obj1);
         }
         $omClass = StaffTypePeer::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->getStaffType();
             if ($temp_obj4->getPrimaryKey() === $obj4->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj4->addMember($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj4->initMembers();
             $obj4->addMember($obj1);
         }
         $omClass = EmployeeDetailPeer::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->getEmployeeDetail();
             if ($temp_obj5->getPrimaryKey() === $obj5->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj5->addMember($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj5->initMembers();
             $obj5->addMember($obj1);
         }
         $results[] = $obj1;
     }
     return $results;
 }
Exemplo n.º 8
0
 public static function doSelectJoinAllExceptAcademicCalendar(Criteria $c, $con = null)
 {
     $c = clone $c;
     if ($c->getDbName() == Propel::getDefaultDB()) {
         $c->setDbName(self::DATABASE_NAME);
     }
     LocationPeer::addSelectColumns($c);
     $startcol2 = LocationPeer::NUM_COLUMNS - LocationPeer::NUM_LAZY_LOAD_COLUMNS + 1;
     LocationCategoryPeer::addSelectColumns($c);
     $startcol3 = $startcol2 + LocationCategoryPeer::NUM_COLUMNS;
     LocationConditionPeer::addSelectColumns($c);
     $startcol4 = $startcol3 + LocationConditionPeer::NUM_COLUMNS;
     DepartmentPeer::addSelectColumns($c);
     $startcol5 = $startcol4 + DepartmentPeer::NUM_COLUMNS;
     $c->addJoin(LocationPeer::LOCATION_CATEGORY_ID, LocationCategoryPeer::ID);
     $c->addJoin(LocationPeer::LOCATION_CONDITION_ID, LocationConditionPeer::ID);
     $c->addJoin(LocationPeer::DEPARTMENT_ID, DepartmentPeer::ID);
     $rs = BasePeer::doSelect($c, $con);
     $results = array();
     while ($rs->next()) {
         $omClass = LocationPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj1 = new $cls();
         $obj1->hydrate($rs);
         $omClass = LocationCategoryPeer::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->getLocationCategory();
             if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj2->addLocation($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj2->initLocations();
             $obj2->addLocation($obj1);
         }
         $omClass = LocationConditionPeer::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->getLocationCondition();
             if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj3->addLocation($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj3->initLocations();
             $obj3->addLocation($obj1);
         }
         $omClass = DepartmentPeer::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->getDepartment();
             if ($temp_obj4->getPrimaryKey() === $obj4->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj4->addLocation($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj4->initLocations();
             $obj4->addLocation($obj1);
         }
         $results[] = $obj1;
     }
     return $results;
 }
Exemplo n.º 9
0
 public static function doSelectJoinAllExceptEmployeeLevel(Criteria $c, $con = null)
 {
     $c = clone $c;
     if ($c->getDbName() == Propel::getDefaultDB()) {
         $c->setDbName(self::DATABASE_NAME);
     }
     EmployeeJobHistoryPeer::addSelectColumns($c);
     $startcol2 = EmployeeJobHistoryPeer::NUM_COLUMNS - EmployeeJobHistoryPeer::NUM_LAZY_LOAD_COLUMNS + 1;
     EmployeePeer::addSelectColumns($c);
     $startcol3 = $startcol2 + EmployeePeer::NUM_COLUMNS;
     StaffTypePeer::addSelectColumns($c);
     $startcol4 = $startcol3 + StaffTypePeer::NUM_COLUMNS;
     StructuralJobPeer::addSelectColumns($c);
     $startcol5 = $startcol4 + StructuralJobPeer::NUM_COLUMNS;
     FunctionalJobPeer::addSelectColumns($c);
     $startcol6 = $startcol5 + FunctionalJobPeer::NUM_COLUMNS;
     DepartmentPeer::addSelectColumns($c);
     $startcol7 = $startcol6 + DepartmentPeer::NUM_COLUMNS;
     $c->addJoin(EmployeeJobHistoryPeer::EMPLOYEE_ID, EmployeePeer::ID);
     $c->addJoin(EmployeeJobHistoryPeer::STAFF_TYPE_ID, StaffTypePeer::ID);
     $c->addJoin(EmployeeJobHistoryPeer::STRUCTURAL_JOB_ID, StructuralJobPeer::ID);
     $c->addJoin(EmployeeJobHistoryPeer::FUNCTIONAL_JOB_ID, FunctionalJobPeer::ID);
     $c->addJoin(EmployeeJobHistoryPeer::DEPARTMENT_ID, DepartmentPeer::ID);
     $rs = BasePeer::doSelect($c, $con);
     $results = array();
     while ($rs->next()) {
         $omClass = EmployeeJobHistoryPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj1 = new $cls();
         $obj1->hydrate($rs);
         $omClass = EmployeePeer::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->getEmployee();
             if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj2->addEmployeeJobHistory($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj2->initEmployeeJobHistorys();
             $obj2->addEmployeeJobHistory($obj1);
         }
         $omClass = StaffTypePeer::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->getStaffType();
             if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj3->addEmployeeJobHistory($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj3->initEmployeeJobHistorys();
             $obj3->addEmployeeJobHistory($obj1);
         }
         $omClass = StructuralJobPeer::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->getStructuralJob();
             if ($temp_obj4->getPrimaryKey() === $obj4->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj4->addEmployeeJobHistory($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj4->initEmployeeJobHistorys();
             $obj4->addEmployeeJobHistory($obj1);
         }
         $omClass = FunctionalJobPeer::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->getFunctionalJob();
             if ($temp_obj5->getPrimaryKey() === $obj5->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj5->addEmployeeJobHistory($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj5->initEmployeeJobHistorys();
             $obj5->addEmployeeJobHistory($obj1);
         }
         $omClass = DepartmentPeer::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->getDepartment();
             if ($temp_obj6->getPrimaryKey() === $obj6->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj6->addEmployeeJobHistory($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj6->initEmployeeJobHistorys();
             $obj6->addEmployeeJobHistory($obj1);
         }
         $results[] = $obj1;
     }
     return $results;
 }
Exemplo n.º 10
0
 public static function doSelectJoinAll(Criteria $c, $con = null)
 {
     $c = clone $c;
     if ($c->getDbName() == Propel::getDefaultDB()) {
         $c->setDbName(self::DATABASE_NAME);
     }
     DepartmentPeer::addSelectColumns($c);
     $startcol2 = DepartmentPeer::NUM_COLUMNS - DepartmentPeer::NUM_LAZY_LOAD_COLUMNS + 1;
     $rs = BasePeer::doSelect($c, $con);
     $results = array();
     while ($rs->next()) {
         $omClass = DepartmentPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj1 = new $cls();
         $obj1->hydrate($rs);
         $results[] = $obj1;
     }
     return $results;
 }
Exemplo n.º 11
0
 public static function doSelectJoinAllExceptClassGroupRelatedByClassId(Criteria $c, $con = null)
 {
     $c = clone $c;
     if ($c->getDbName() == Propel::getDefaultDB()) {
         $c->setDbName(self::DATABASE_NAME);
     }
     VApplicantTestPeer::addSelectColumns($c);
     $startcol2 = VApplicantTestPeer::NUM_COLUMNS - VApplicantTestPeer::NUM_LAZY_LOAD_COLUMNS + 1;
     TestApplicantDetailPeer::addSelectColumns($c);
     $startcol3 = $startcol2 + TestApplicantDetailPeer::NUM_COLUMNS;
     DepartmentPeer::addSelectColumns($c);
     $startcol4 = $startcol3 + DepartmentPeer::NUM_COLUMNS;
     RegTestPeriodPeer::addSelectColumns($c);
     $startcol5 = $startcol4 + RegTestPeriodPeer::NUM_COLUMNS;
     LocationPeer::addSelectColumns($c);
     $startcol6 = $startcol5 + LocationPeer::NUM_COLUMNS;
     $c->addJoin(VApplicantTestPeer::TEST_APPLICANT_DETAIL_ID, TestApplicantDetailPeer::ID);
     $c->addJoin(VApplicantTestPeer::DEPARTMENT_ID, DepartmentPeer::ID);
     $c->addJoin(VApplicantTestPeer::REG_TEST_PERIOD_ID, RegTestPeriodPeer::ID);
     $c->addJoin(VApplicantTestPeer::LOCATION_ID, LocationPeer::ID);
     $rs = BasePeer::doSelect($c, $con);
     $results = array();
     while ($rs->next()) {
         $omClass = VApplicantTestPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj1 = new $cls();
         $obj1->hydrate($rs);
         $omClass = TestApplicantDetailPeer::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->getTestApplicantDetail();
             if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj2->addVApplicantTest($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj2->initVApplicantTests();
             $obj2->addVApplicantTest($obj1);
         }
         $omClass = DepartmentPeer::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->getDepartment();
             if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj3->addVApplicantTest($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj3->initVApplicantTests();
             $obj3->addVApplicantTest($obj1);
         }
         $omClass = RegTestPeriodPeer::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->getRegTestPeriod();
             if ($temp_obj4->getPrimaryKey() === $obj4->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj4->addVApplicantTest($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj4->initVApplicantTests();
             $obj4->addVApplicantTest($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->addVApplicantTest($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj5->initVApplicantTests();
             $obj5->addVApplicantTest($obj1);
         }
         $results[] = $obj1;
     }
     return $results;
 }
Exemplo n.º 12
0
 /**
  * The returned array will contain objects of the default type or
  * objects that inherit from the default.
  *
  * @throws     PropelException Any exceptions caught during processing will be
  *		 rethrown wrapped into a PropelException.
  */
 public static function populateObjects(ResultSet $rs)
 {
     $results = array();
     // set the class once to avoid overhead in the loop
     $cls = DepartmentPeer::getOMClass();
     $cls = Propel::import($cls);
     // populate the object(s)
     while ($rs->next()) {
         $obj = new $cls();
         $obj->hydrate($rs);
         $results[] = $obj;
     }
     return $results;
 }
 public static function doSelectJoinAllExceptCurriculum(Criteria $c, $con = null)
 {
     $c = clone $c;
     if ($c->getDbName() == Propel::getDefaultDB()) {
         $c->setDbName(self::DATABASE_NAME);
     }
     VSubjectAccalLectorStudentPeer::addSelectColumns($c);
     $startcol2 = VSubjectAccalLectorStudentPeer::NUM_COLUMNS - VSubjectAccalLectorStudentPeer::NUM_LAZY_LOAD_COLUMNS + 1;
     SubjectAccalPeer::addSelectColumns($c);
     $startcol3 = $startcol2 + SubjectAccalPeer::NUM_COLUMNS;
     ClassGroupPeer::addSelectColumns($c);
     $startcol4 = $startcol3 + ClassGroupPeer::NUM_COLUMNS;
     AcademicCalendarPeer::addSelectColumns($c);
     $startcol5 = $startcol4 + AcademicCalendarPeer::NUM_COLUMNS;
     SubjectPeer::addSelectColumns($c);
     $startcol6 = $startcol5 + SubjectPeer::NUM_COLUMNS;
     EmployeePeer::addSelectColumns($c);
     $startcol7 = $startcol6 + EmployeePeer::NUM_COLUMNS;
     DepartmentPeer::addSelectColumns($c);
     $startcol8 = $startcol7 + DepartmentPeer::NUM_COLUMNS;
     $c->addJoin(VSubjectAccalLectorStudentPeer::SUBJECT_ACCAL_ID, SubjectAccalPeer::ID);
     $c->addJoin(VSubjectAccalLectorStudentPeer::CLASS_GROUP_ID, ClassGroupPeer::ID);
     $c->addJoin(VSubjectAccalLectorStudentPeer::ACADEMIC_CALENDAR_ID, AcademicCalendarPeer::ID);
     $c->addJoin(VSubjectAccalLectorStudentPeer::SUBJECT_ID, SubjectPeer::ID);
     $c->addJoin(VSubjectAccalLectorStudentPeer::EMPLOYEE_ID, EmployeePeer::ID);
     $c->addJoin(VSubjectAccalLectorStudentPeer::DEPARTMENT_ID, DepartmentPeer::ID);
     $rs = BasePeer::doSelect($c, $con);
     $results = array();
     while ($rs->next()) {
         $omClass = VSubjectAccalLectorStudentPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj1 = new $cls();
         $obj1->hydrate($rs);
         $omClass = SubjectAccalPeer::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->getSubjectAccal();
             if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj2->addVSubjectAccalLectorStudent($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj2->initVSubjectAccalLectorStudents();
             $obj2->addVSubjectAccalLectorStudent($obj1);
         }
         $omClass = ClassGroupPeer::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->getClassGroup();
             if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj3->addVSubjectAccalLectorStudent($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj3->initVSubjectAccalLectorStudents();
             $obj3->addVSubjectAccalLectorStudent($obj1);
         }
         $omClass = AcademicCalendarPeer::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->getAcademicCalendar();
             if ($temp_obj4->getPrimaryKey() === $obj4->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj4->addVSubjectAccalLectorStudent($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj4->initVSubjectAccalLectorStudents();
             $obj4->addVSubjectAccalLectorStudent($obj1);
         }
         $omClass = SubjectPeer::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->getSubject();
             if ($temp_obj5->getPrimaryKey() === $obj5->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj5->addVSubjectAccalLectorStudent($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj5->initVSubjectAccalLectorStudents();
             $obj5->addVSubjectAccalLectorStudent($obj1);
         }
         $omClass = EmployeePeer::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->getEmployee();
             if ($temp_obj6->getPrimaryKey() === $obj6->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj6->addVSubjectAccalLectorStudent($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj6->initVSubjectAccalLectorStudents();
             $obj6->addVSubjectAccalLectorStudent($obj1);
         }
         $omClass = DepartmentPeer::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->getDepartment();
             if ($temp_obj7->getPrimaryKey() === $obj7->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj7->addVSubjectAccalLectorStudent($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj7->initVSubjectAccalLectorStudents();
             $obj7->addVSubjectAccalLectorStudent($obj1);
         }
         $results[] = $obj1;
     }
     return $results;
 }
Exemplo n.º 14
0
 public static function doSelectJoinAllExceptCurrSystem(Criteria $c, $con = null)
 {
     $c = clone $c;
     if ($c->getDbName() == Propel::getDefaultDB()) {
         $c->setDbName(self::DATABASE_NAME);
     }
     VAcademicCalendarPeer::addSelectColumns($c);
     $startcol2 = VAcademicCalendarPeer::NUM_COLUMNS - VAcademicCalendarPeer::NUM_LAZY_LOAD_COLUMNS + 1;
     AcademicCalendarPeer::addSelectColumns($c);
     $startcol3 = $startcol2 + AcademicCalendarPeer::NUM_COLUMNS;
     CurriculumPeer::addSelectColumns($c);
     $startcol4 = $startcol3 + CurriculumPeer::NUM_COLUMNS;
     ClassGroupPeer::addSelectColumns($c);
     $startcol5 = $startcol4 + ClassGroupPeer::NUM_COLUMNS;
     DepartmentPeer::addSelectColumns($c);
     $startcol6 = $startcol5 + DepartmentPeer::NUM_COLUMNS;
     $c->addJoin(VAcademicCalendarPeer::PARENT, AcademicCalendarPeer::ID);
     $c->addJoin(VAcademicCalendarPeer::CURRICULUM_ID, CurriculumPeer::ID);
     $c->addJoin(VAcademicCalendarPeer::CLASS_GROUP_ID, ClassGroupPeer::ID);
     $c->addJoin(VAcademicCalendarPeer::DEPARTMENT_ID, DepartmentPeer::ID);
     $rs = BasePeer::doSelect($c, $con);
     $results = array();
     while ($rs->next()) {
         $omClass = VAcademicCalendarPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj1 = new $cls();
         $obj1->hydrate($rs);
         $omClass = AcademicCalendarPeer::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->getAcademicCalendar();
             if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj2->addVAcademicCalendar($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj2->initVAcademicCalendars();
             $obj2->addVAcademicCalendar($obj1);
         }
         $omClass = CurriculumPeer::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->getCurriculum();
             if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj3->addVAcademicCalendar($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj3->initVAcademicCalendars();
             $obj3->addVAcademicCalendar($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->addVAcademicCalendar($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj4->initVAcademicCalendars();
             $obj4->addVAcademicCalendar($obj1);
         }
         $omClass = DepartmentPeer::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->getDepartment();
             if ($temp_obj5->getPrimaryKey() === $obj5->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj5->addVAcademicCalendar($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj5->initVAcademicCalendars();
             $obj5->addVAcademicCalendar($obj1);
         }
         $results[] = $obj1;
     }
     return $results;
 }
Exemplo n.º 15
0
 /**
  * Selects a collection of Course objects pre-filled with all related objects.
  *
  * @param      Criteria  $c
  * @param      PropelPDO $con
  * @param      String    $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
  * @return     array Array of Course objects.
  * @throws     PropelException Any exceptions caught during processing will be
  *		 rethrown wrapped into a PropelException.
  */
 public static function doSelectJoinAll(Criteria $c, $con = null, $join_behavior = Criteria::LEFT_JOIN)
 {
     foreach (sfMixer::getCallables('BaseCoursePeer:doSelectJoinAll:doSelectJoinAll') as $callable) {
         call_user_func($callable, 'BaseCoursePeer', $c, $con);
     }
     $c = clone $c;
     // Set the correct dbName if it has not been overridden
     if ($c->getDbName() == Propel::getDefaultDB()) {
         $c->setDbName(self::DATABASE_NAME);
     }
     CoursePeer::addSelectColumns($c);
     $startcol2 = CoursePeer::NUM_COLUMNS - CoursePeer::NUM_LAZY_LOAD_COLUMNS;
     DepartmentPeer::addSelectColumns($c);
     $startcol3 = $startcol2 + (DepartmentPeer::NUM_COLUMNS - DepartmentPeer::NUM_LAZY_LOAD_COLUMNS);
     $c->addJoin(array(CoursePeer::DEPT_ID), array(DepartmentPeer::ID), $join_behavior);
     $stmt = BasePeer::doSelect($c, $con);
     $results = array();
     while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
         $key1 = CoursePeer::getPrimaryKeyHashFromRow($row, 0);
         if (null !== ($obj1 = CoursePeer::getInstanceFromPool($key1))) {
             // We no longer rehydrate the object, since this can cause data loss.
             // See http://propel.phpdb.org/trac/ticket/509
             // $obj1->hydrate($row, 0, true); // rehydrate
         } else {
             $omClass = CoursePeer::getOMClass();
             $cls = substr('.' . $omClass, strrpos('.' . $omClass, '.') + 1);
             $obj1 = new $cls();
             $obj1->hydrate($row);
             CoursePeer::addInstanceToPool($obj1, $key1);
         }
         // if obj1 already loaded
         // Add objects for joined Department rows
         $key2 = DepartmentPeer::getPrimaryKeyHashFromRow($row, $startcol2);
         if ($key2 !== null) {
             $obj2 = DepartmentPeer::getInstanceFromPool($key2);
             if (!$obj2) {
                 $omClass = DepartmentPeer::getOMClass();
                 $cls = substr('.' . $omClass, strrpos('.' . $omClass, '.') + 1);
                 $obj2 = new $cls();
                 $obj2->hydrate($row, $startcol2);
                 DepartmentPeer::addInstanceToPool($obj2, $key2);
             }
             // if obj2 loaded
             // Add the $obj1 (Course) to the collection in $obj2 (Department)
             $obj2->addCourse($obj1);
         }
         // if joined row not null
         $results[] = $obj1;
     }
     $stmt->closeCursor();
     return $results;
 }
Exemplo n.º 16
0
 public static function populateObjects(ResultSet $rs)
 {
     $results = array();
     $cls = DepartmentPeer::getOMClass();
     $cls = Propel::import($cls);
     while ($rs->next()) {
         $obj = new $cls();
         $obj->hydrate($rs);
         $results[] = $obj;
     }
     return $results;
 }
Exemplo n.º 17
0
 public static function doSelectJoinAllExceptLocationRelatedByLocation2(Criteria $c, $con = null)
 {
     $c = clone $c;
     if ($c->getDbName() == Propel::getDefaultDB()) {
         $c->setDbName(self::DATABASE_NAME);
     }
     TestApplicantPeer::addSelectColumns($c);
     $startcol2 = TestApplicantPeer::NUM_COLUMNS - TestApplicantPeer::NUM_LAZY_LOAD_COLUMNS + 1;
     TestApplicantDetailPeer::addSelectColumns($c);
     $startcol3 = $startcol2 + TestApplicantDetailPeer::NUM_COLUMNS;
     DepartmentPeer::addSelectColumns($c);
     $startcol4 = $startcol3 + DepartmentPeer::NUM_COLUMNS;
     ClassGroupPeer::addSelectColumns($c);
     $startcol5 = $startcol4 + ClassGroupPeer::NUM_COLUMNS;
     RegTestPeriodPeer::addSelectColumns($c);
     $startcol6 = $startcol5 + RegTestPeriodPeer::NUM_COLUMNS;
     DepartmentPeer::addSelectColumns($c);
     $startcol7 = $startcol6 + DepartmentPeer::NUM_COLUMNS;
     ClassGroupPeer::addSelectColumns($c);
     $startcol8 = $startcol7 + ClassGroupPeer::NUM_COLUMNS;
     RegTestPeriodPeer::addSelectColumns($c);
     $startcol9 = $startcol8 + RegTestPeriodPeer::NUM_COLUMNS;
     $c->addJoin(TestApplicantPeer::TEST_APPLICANT_DETAIL_ID, TestApplicantDetailPeer::ID);
     $c->addJoin(TestApplicantPeer::DEPARTMENT_1, DepartmentPeer::ID);
     $c->addJoin(TestApplicantPeer::CLASS_GROUP1, ClassGroupPeer::ID);
     $c->addJoin(TestApplicantPeer::REG_TEST_PERIOD1, RegTestPeriodPeer::ID);
     $c->addJoin(TestApplicantPeer::DEPARTMENT_2, DepartmentPeer::ID);
     $c->addJoin(TestApplicantPeer::CLASS_GROUP2, ClassGroupPeer::ID);
     $c->addJoin(TestApplicantPeer::REG_TEST_PERIOD2, RegTestPeriodPeer::ID);
     $rs = BasePeer::doSelect($c, $con);
     $results = array();
     while ($rs->next()) {
         $omClass = TestApplicantPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj1 = new $cls();
         $obj1->hydrate($rs);
         $omClass = TestApplicantDetailPeer::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->getTestApplicantDetail();
             if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj2->addTestApplicant($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj2->initTestApplicants();
             $obj2->addTestApplicant($obj1);
         }
         $omClass = DepartmentPeer::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->getDepartmentRelatedByDepartment1();
             if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj3->addTestApplicantRelatedByDepartment1($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj3->initTestApplicantsRelatedByDepartment1();
             $obj3->addTestApplicantRelatedByDepartment1($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->getClassGroupRelatedByClassGroup1();
             if ($temp_obj4->getPrimaryKey() === $obj4->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj4->addTestApplicantRelatedByClassGroup1($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj4->initTestApplicantsRelatedByClassGroup1();
             $obj4->addTestApplicantRelatedByClassGroup1($obj1);
         }
         $omClass = RegTestPeriodPeer::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->getRegTestPeriodRelatedByRegTestPeriod1();
             if ($temp_obj5->getPrimaryKey() === $obj5->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj5->addTestApplicantRelatedByRegTestPeriod1($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj5->initTestApplicantsRelatedByRegTestPeriod1();
             $obj5->addTestApplicantRelatedByRegTestPeriod1($obj1);
         }
         $omClass = DepartmentPeer::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->getDepartmentRelatedByDepartment2();
             if ($temp_obj6->getPrimaryKey() === $obj6->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj6->addTestApplicantRelatedByDepartment2($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj6->initTestApplicantsRelatedByDepartment2();
             $obj6->addTestApplicantRelatedByDepartment2($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->getClassGroupRelatedByClassGroup2();
             if ($temp_obj7->getPrimaryKey() === $obj7->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj7->addTestApplicantRelatedByClassGroup2($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj7->initTestApplicantsRelatedByClassGroup2();
             $obj7->addTestApplicantRelatedByClassGroup2($obj1);
         }
         $omClass = RegTestPeriodPeer::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->getRegTestPeriodRelatedByRegTestPeriod2();
             if ($temp_obj8->getPrimaryKey() === $obj8->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj8->addTestApplicantRelatedByRegTestPeriod2($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj8->initTestApplicantsRelatedByRegTestPeriod2();
             $obj8->addTestApplicantRelatedByRegTestPeriod2($obj1);
         }
         $results[] = $obj1;
     }
     return $results;
 }
Exemplo n.º 18
0
 public static function doSelectJoinAllExceptColLocation(Criteria $c, $con = null)
 {
     $c = clone $c;
     if ($c->getDbName() == Propel::getDefaultDB()) {
         $c->setDbName(self::DATABASE_NAME);
     }
     VOpacPeer::addSelectColumns($c);
     $startcol2 = VOpacPeer::NUM_COLUMNS - VOpacPeer::NUM_LAZY_LOAD_COLUMNS + 1;
     CatalogPeer::addSelectColumns($c);
     $startcol3 = $startcol2 + CatalogPeer::NUM_COLUMNS;
     DepartmentPeer::addSelectColumns($c);
     $startcol4 = $startcol3 + DepartmentPeer::NUM_COLUMNS;
     CatCategoryPeer::addSelectColumns($c);
     $startcol5 = $startcol4 + CatCategoryPeer::NUM_COLUMNS;
     ColStatusPeer::addSelectColumns($c);
     $startcol6 = $startcol5 + ColStatusPeer::NUM_COLUMNS;
     $c->addJoin(VOpacPeer::CATALOG_ID, CatalogPeer::ID);
     $c->addJoin(VOpacPeer::DEPARTMENT_ID, DepartmentPeer::ID);
     $c->addJoin(VOpacPeer::CAT_CATEGORY_ID, CatCategoryPeer::ID);
     $c->addJoin(VOpacPeer::COL_STATUS_ID, ColStatusPeer::ID);
     $rs = BasePeer::doSelect($c, $con);
     $results = array();
     while ($rs->next()) {
         $omClass = VOpacPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj1 = new $cls();
         $obj1->hydrate($rs);
         $omClass = CatalogPeer::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->getCatalog();
             if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj2->addVOpac($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj2->initVOpacs();
             $obj2->addVOpac($obj1);
         }
         $omClass = DepartmentPeer::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->getDepartment();
             if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj3->addVOpac($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj3->initVOpacs();
             $obj3->addVOpac($obj1);
         }
         $omClass = CatCategoryPeer::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->getCatCategory();
             if ($temp_obj4->getPrimaryKey() === $obj4->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj4->addVOpac($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj4->initVOpacs();
             $obj4->addVOpac($obj1);
         }
         $omClass = ColStatusPeer::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->getColStatus();
             if ($temp_obj5->getPrimaryKey() === $obj5->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj5->addVOpac($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj5->initVOpacs();
             $obj5->addVOpac($obj1);
         }
         $results[] = $obj1;
     }
     return $results;
 }
Exemplo n.º 19
0
 public static function doSelectJoinAllExceptClassGroup(Criteria $c, $con = null)
 {
     $c = clone $c;
     if ($c->getDbName() == Propel::getDefaultDB()) {
         $c->setDbName(self::DATABASE_NAME);
     }
     StudentSiblingPeer::addSelectColumns($c);
     $startcol2 = StudentSiblingPeer::NUM_COLUMNS - StudentSiblingPeer::NUM_LAZY_LOAD_COLUMNS + 1;
     StudentPeer::addSelectColumns($c);
     $startcol3 = $startcol2 + StudentPeer::NUM_COLUMNS;
     StudentPeer::addSelectColumns($c);
     $startcol4 = $startcol3 + StudentPeer::NUM_COLUMNS;
     DepartmentPeer::addSelectColumns($c);
     $startcol5 = $startcol4 + DepartmentPeer::NUM_COLUMNS;
     $c->addJoin(StudentSiblingPeer::STUDENT_ID, StudentPeer::ID);
     $c->addJoin(StudentSiblingPeer::STUDENT_RELATED, StudentPeer::ID);
     $c->addJoin(StudentSiblingPeer::DEPARTMENT_ID, DepartmentPeer::ID);
     $rs = BasePeer::doSelect($c, $con);
     $results = array();
     while ($rs->next()) {
         $omClass = StudentSiblingPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj1 = new $cls();
         $obj1->hydrate($rs);
         $omClass = StudentPeer::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->getStudentRelatedByStudentId();
             if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj2->addStudentSiblingRelatedByStudentId($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj2->initStudentSiblingsRelatedByStudentId();
             $obj2->addStudentSiblingRelatedByStudentId($obj1);
         }
         $omClass = StudentPeer::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->getStudentRelatedByStudentRelated();
             if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj3->addStudentSiblingRelatedByStudentRelated($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj3->initStudentSiblingsRelatedByStudentRelated();
             $obj3->addStudentSiblingRelatedByStudentRelated($obj1);
         }
         $omClass = DepartmentPeer::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->getDepartment();
             if ($temp_obj4->getPrimaryKey() === $obj4->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj4->addStudentSibling($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj4->initStudentSiblings();
             $obj4->addStudentSibling($obj1);
         }
         $results[] = $obj1;
     }
     return $results;
 }
Exemplo n.º 20
0
 public static function doSelectJoinAllExceptCampus(Criteria $c, $con = null)
 {
     foreach (sfMixer::getCallables('BaseProjectApplicationPeer:doSelectJoinAllExcept:doSelectJoinAllExcept') as $callable) {
         call_user_func($callable, 'BaseProjectApplicationPeer', $c, $con);
     }
     $c = clone $c;
     if ($c->getDbName() == Propel::getDefaultDB()) {
         $c->setDbName(self::DATABASE_NAME);
     }
     ProjectApplicationPeer::addSelectColumns($c);
     $startcol2 = ProjectApplicationPeer::NUM_COLUMNS - ProjectApplicationPeer::NUM_LAZY_LOAD_COLUMNS + 1;
     sfGuardUserPeer::addSelectColumns($c);
     $startcol3 = $startcol2 + sfGuardUserPeer::NUM_COLUMNS;
     sfGuardUserPeer::addSelectColumns($c);
     $startcol4 = $startcol3 + sfGuardUserPeer::NUM_COLUMNS;
     DepartmentPeer::addSelectColumns($c);
     $startcol5 = $startcol4 + DepartmentPeer::NUM_COLUMNS;
     $c->addJoin(ProjectApplicationPeer::CREATED_BY, sfGuardUserPeer::ID);
     $c->addJoin(ProjectApplicationPeer::OWNER_ID, sfGuardUserPeer::ID);
     $c->addJoin(ProjectApplicationPeer::DEPARTMENT_ID, DepartmentPeer::ID);
     $rs = BasePeer::doSelect($c, $con);
     $results = array();
     while ($rs->next()) {
         $omClass = ProjectApplicationPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj1 = new $cls();
         $obj1->hydrate($rs);
         $omClass = sfGuardUserPeer::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->getsfGuardUserRelatedByCreatedBy();
             if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj2->addProjectApplicationRelatedByCreatedBy($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj2->initProjectApplicationsRelatedByCreatedBy();
             $obj2->addProjectApplicationRelatedByCreatedBy($obj1);
         }
         $omClass = sfGuardUserPeer::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->getsfGuardUserRelatedByOwnerId();
             if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj3->addProjectApplicationRelatedByOwnerId($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj3->initProjectApplicationsRelatedByOwnerId();
             $obj3->addProjectApplicationRelatedByOwnerId($obj1);
         }
         $omClass = DepartmentPeer::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->getDepartment();
             if ($temp_obj4->getPrimaryKey() === $obj4->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj4->addProjectApplication($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj4->initProjectApplications();
             $obj4->addProjectApplication($obj1);
         }
         $results[] = $obj1;
     }
     return $results;
 }
Exemplo n.º 21
0
 /**
  * Selects a collection of Employee objects pre-filled with all related objects except Role.
  *
  * @param      Criteria  $c
  * @param      PropelPDO $con
  * @param      String    $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
  * @return     array Array of Employee objects.
  * @throws     PropelException Any exceptions caught during processing will be
  *		 rethrown wrapped into a PropelException.
  */
 public static function doSelectJoinAllExceptRole(Criteria $c, $con = null, $join_behavior = Criteria::LEFT_JOIN)
 {
     $c = clone $c;
     // Set the correct dbName if it has not been overridden
     // $c->getDbName() will return the same object if not set to another value
     // so == check is okay and faster
     if ($c->getDbName() == Propel::getDefaultDB()) {
         $c->setDbName(self::DATABASE_NAME);
     }
     EmployeePeer::addSelectColumns($c);
     $startcol2 = EmployeePeer::NUM_COLUMNS - EmployeePeer::NUM_LAZY_LOAD_COLUMNS;
     DepartmentPeer::addSelectColumns($c);
     $startcol3 = $startcol2 + (DepartmentPeer::NUM_COLUMNS - DepartmentPeer::NUM_LAZY_LOAD_COLUMNS);
     DesignationPeer::addSelectColumns($c);
     $startcol4 = $startcol3 + (DesignationPeer::NUM_COLUMNS - DesignationPeer::NUM_LAZY_LOAD_COLUMNS);
     $c->addJoin(array(EmployeePeer::DEPARTMENT_ID), array(DepartmentPeer::ID), $join_behavior);
     $c->addJoin(array(EmployeePeer::DESIGNATION_ID), array(DesignationPeer::ID), $join_behavior);
     $stmt = BasePeer::doSelect($c, $con);
     $results = array();
     while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
         $key1 = EmployeePeer::getPrimaryKeyHashFromRow($row, 0);
         if (null !== ($obj1 = EmployeePeer::getInstanceFromPool($key1))) {
             // We no longer rehydrate the object, since this can cause data loss.
             // See http://propel.phpdb.org/trac/ticket/509
             // $obj1->hydrate($row, 0, true); // rehydrate
         } else {
             $omClass = EmployeePeer::getOMClass();
             $cls = substr('.' . $omClass, strrpos('.' . $omClass, '.') + 1);
             $obj1 = new $cls();
             $obj1->hydrate($row);
             EmployeePeer::addInstanceToPool($obj1, $key1);
         }
         // if obj1 already loaded
         // Add objects for joined Department rows
         $key2 = DepartmentPeer::getPrimaryKeyHashFromRow($row, $startcol2);
         if ($key2 !== null) {
             $obj2 = DepartmentPeer::getInstanceFromPool($key2);
             if (!$obj2) {
                 $omClass = DepartmentPeer::getOMClass();
                 $cls = substr('.' . $omClass, strrpos('.' . $omClass, '.') + 1);
                 $obj2 = new $cls();
                 $obj2->hydrate($row, $startcol2);
                 DepartmentPeer::addInstanceToPool($obj2, $key2);
             }
             // if $obj2 already loaded
             // Add the $obj1 (Employee) to the collection in $obj2 (Department)
             $obj2->addEmployee($obj1);
         }
         // if joined row is not null
         // Add objects for joined Designation rows
         $key3 = DesignationPeer::getPrimaryKeyHashFromRow($row, $startcol3);
         if ($key3 !== null) {
             $obj3 = DesignationPeer::getInstanceFromPool($key3);
             if (!$obj3) {
                 $omClass = DesignationPeer::getOMClass();
                 $cls = substr('.' . $omClass, strrpos('.' . $omClass, '.') + 1);
                 $obj3 = new $cls();
                 $obj3->hydrate($row, $startcol3);
                 DesignationPeer::addInstanceToPool($obj3, $key3);
             }
             // if $obj3 already loaded
             // Add the $obj1 (Employee) to the collection in $obj3 (Designation)
             $obj3->addEmployee($obj1);
         }
         // if joined row is not null
         $results[] = $obj1;
     }
     $stmt->closeCursor();
     return $results;
 }