コード例 #1
0
 public function getComprehensiveExamsJoinStudent($criteria = null, $con = null)
 {
     include_once 'lib/model/om/BaseComprehensiveExamPeer.php';
     if ($criteria === null) {
         $criteria = new Criteria();
     } elseif ($criteria instanceof Criteria) {
         $criteria = clone $criteria;
     }
     if ($this->collComprehensiveExams === null) {
         if ($this->isNew()) {
             $this->collComprehensiveExams = array();
         } else {
             $criteria->add(ComprehensiveExamPeer::ACADEMIC_CALENDAR_ID, $this->getId());
             $this->collComprehensiveExams = ComprehensiveExamPeer::doSelectJoinStudent($criteria, $con);
         }
     } else {
         $criteria->add(ComprehensiveExamPeer::ACADEMIC_CALENDAR_ID, $this->getId());
         if (!isset($this->lastComprehensiveExamCriteria) || !$this->lastComprehensiveExamCriteria->equals($criteria)) {
             $this->collComprehensiveExams = ComprehensiveExamPeer::doSelectJoinStudent($criteria, $con);
         }
     }
     $this->lastComprehensiveExamCriteria = $criteria;
     return $this->collComprehensiveExams;
 }
コード例 #2
0
ファイル: actions.class.php プロジェクト: taryono/school
 public function executeYudisiumLetter()
 {
     $this->comprehensive_exam = ComprehensiveExamPeer::retrieveByPK($this->getRequestParameter('id'));
     $this->stu = $this->comprehensive_exam->getStudent();
     $this->setViewClass('sfDomPDF');
 }
コード例 #3
0
 public static function retrieveByPKs($pks, $con = null)
 {
     if ($con === null) {
         $con = Propel::getConnection(self::DATABASE_NAME);
     }
     $objs = null;
     if (empty($pks)) {
         $objs = array();
     } else {
         $criteria = new Criteria();
         $criteria->add(ComprehensiveExamPeer::ID, $pks, Criteria::IN);
         $objs = ComprehensiveExamPeer::doSelect($criteria, $con);
     }
     return $objs;
 }
コード例 #4
0
 public static function doSelectJoinAllExceptEmployee(Criteria $c, $con = null)
 {
     $c = clone $c;
     if ($c->getDbName() == Propel::getDefaultDB()) {
         $c->setDbName(self::DATABASE_NAME);
     }
     ComprehensiveReviewerPeer::addSelectColumns($c);
     $startcol2 = ComprehensiveReviewerPeer::NUM_COLUMNS - ComprehensiveReviewerPeer::NUM_LAZY_LOAD_COLUMNS + 1;
     ComprehensiveExamPeer::addSelectColumns($c);
     $startcol3 = $startcol2 + ComprehensiveExamPeer::NUM_COLUMNS;
     $c->addJoin(ComprehensiveReviewerPeer::COMPREHENSIVE_EXAM_ID, ComprehensiveExamPeer::ID);
     $rs = BasePeer::doSelect($c, $con);
     $results = array();
     while ($rs->next()) {
         $omClass = ComprehensiveReviewerPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj1 = new $cls();
         $obj1->hydrate($rs);
         $omClass = ComprehensiveExamPeer::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->getComprehensiveExam();
             if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj2->addComprehensiveReviewer($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj2->initComprehensiveReviewers();
             $obj2->addComprehensiveReviewer($obj1);
         }
         $results[] = $obj1;
     }
     return $results;
 }
コード例 #5
0
 public function getComprehensiveExam($con = null)
 {
     include_once 'lib/model/om/BaseComprehensiveExamPeer.php';
     if ($this->aComprehensiveExam === null && $this->comprehensive_exam_id !== null) {
         $this->aComprehensiveExam = ComprehensiveExamPeer::retrieveByPK($this->comprehensive_exam_id, $con);
     }
     return $this->aComprehensiveExam;
 }
コード例 #6
0
 public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)
 {
     $keys = ComprehensiveExamPeer::getFieldNames($keyType);
     if (array_key_exists($keys[0], $arr)) {
         $this->setId($arr[$keys[0]]);
     }
     if (array_key_exists($keys[1], $arr)) {
         $this->setStudentId($arr[$keys[1]]);
     }
     if (array_key_exists($keys[2], $arr)) {
         $this->setExamDate($arr[$keys[2]]);
     }
     if (array_key_exists($keys[3], $arr)) {
         $this->setStatus($arr[$keys[3]]);
     }
     if (array_key_exists($keys[4], $arr)) {
         $this->setAcademicCalendarId($arr[$keys[4]]);
     }
 }