Ejemplo n.º 1
0
 public function getSubjectGradings($criteria = null, $con = null)
 {
     include_once 'lib/model/om/BaseSubjectGradingPeer.php';
     if ($criteria === null) {
         $criteria = new Criteria();
     } elseif ($criteria instanceof Criteria) {
         $criteria = clone $criteria;
     }
     if ($this->collSubjectGradings === null) {
         if ($this->isNew()) {
             $this->collSubjectGradings = array();
         } else {
             $criteria->add(SubjectGradingPeer::SUBJECT_CURR_ID, $this->getId());
             SubjectGradingPeer::addSelectColumns($criteria);
             $this->collSubjectGradings = SubjectGradingPeer::doSelect($criteria, $con);
         }
     } else {
         if (!$this->isNew()) {
             $criteria->add(SubjectGradingPeer::SUBJECT_CURR_ID, $this->getId());
             SubjectGradingPeer::addSelectColumns($criteria);
             if (!isset($this->lastSubjectGradingCriteria) || !$this->lastSubjectGradingCriteria->equals($criteria)) {
                 $this->collSubjectGradings = SubjectGradingPeer::doSelect($criteria, $con);
             }
         }
     }
     $this->lastSubjectGradingCriteria = $criteria;
     return $this->collSubjectGradings;
 }
Ejemplo n.º 2
0
 public static function doSelectJoinAll(Criteria $c, $con = null)
 {
     $c = clone $c;
     if ($c->getDbName() == Propel::getDefaultDB()) {
         $c->setDbName(self::DATABASE_NAME);
     }
     SubjectCompetencyPeer::addSelectColumns($c);
     $startcol2 = SubjectCompetencyPeer::NUM_COLUMNS - SubjectCompetencyPeer::NUM_LAZY_LOAD_COLUMNS + 1;
     SubjectGradingPeer::addSelectColumns($c);
     $startcol3 = $startcol2 + SubjectGradingPeer::NUM_COLUMNS;
     $c->addJoin(SubjectCompetencyPeer::SUBJECT_GRADING_ID, SubjectGradingPeer::ID);
     $rs = BasePeer::doSelect($c, $con);
     $results = array();
     while ($rs->next()) {
         $omClass = SubjectCompetencyPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj1 = new $cls();
         $obj1->hydrate($rs);
         $omClass = SubjectGradingPeer::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->getSubjectGrading();
             if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj2->addSubjectCompetency($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj2->initSubjectCompetencys();
             $obj2->addSubjectCompetency($obj1);
         }
         $results[] = $obj1;
     }
     return $results;
 }
Ejemplo n.º 3
0
 public static function doSelectJoinAllExceptFormula(Criteria $c, $con = null)
 {
     $c = clone $c;
     if ($c->getDbName() == Propel::getDefaultDB()) {
         $c->setDbName(self::DATABASE_NAME);
     }
     CourseRegulationPeer::addSelectColumns($c);
     $startcol2 = CourseRegulationPeer::NUM_COLUMNS - CourseRegulationPeer::NUM_LAZY_LOAD_COLUMNS + 1;
     ClassGroupPeer::addSelectColumns($c);
     $startcol3 = $startcol2 + ClassGroupPeer::NUM_COLUMNS;
     AcademicCalendarPeer::addSelectColumns($c);
     $startcol4 = $startcol3 + AcademicCalendarPeer::NUM_COLUMNS;
     SubjectGradingPeer::addSelectColumns($c);
     $startcol5 = $startcol4 + SubjectGradingPeer::NUM_COLUMNS;
     SubjectCurrPeer::addSelectColumns($c);
     $startcol6 = $startcol5 + SubjectCurrPeer::NUM_COLUMNS;
     $c->addJoin(CourseRegulationPeer::CLASS_GROUP_ID, ClassGroupPeer::ID);
     $c->addJoin(CourseRegulationPeer::ACADEMIC_CALENDAR_ID, AcademicCalendarPeer::ID);
     $c->addJoin(CourseRegulationPeer::SUBJECT_GRADING_ID, SubjectGradingPeer::ID);
     $c->addJoin(CourseRegulationPeer::SUBJECT_CURR_ID, SubjectCurrPeer::ID);
     $rs = BasePeer::doSelect($c, $con);
     $results = array();
     while ($rs->next()) {
         $omClass = CourseRegulationPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj1 = new $cls();
         $obj1->hydrate($rs);
         $omClass = ClassGroupPeer::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->getClassGroup();
             if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj2->addCourseRegulation($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj2->initCourseRegulations();
             $obj2->addCourseRegulation($obj1);
         }
         $omClass = AcademicCalendarPeer::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->getAcademicCalendar();
             if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj3->addCourseRegulation($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj3->initCourseRegulations();
             $obj3->addCourseRegulation($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->addCourseRegulation($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj4->initCourseRegulations();
             $obj4->addCourseRegulation($obj1);
         }
         $omClass = SubjectCurrPeer::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->getSubjectCurr();
             if ($temp_obj5->getPrimaryKey() === $obj5->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj5->addCourseRegulation($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj5->initCourseRegulations();
             $obj5->addCourseRegulation($obj1);
         }
         $results[] = $obj1;
     }
     return $results;
 }
Ejemplo n.º 4
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;
 }