Esempio n. 1
0
 public function executeDocument()
 {
     $c = new Criteria();
     $test_files = TestFilePeer::doSelect($c);
     $applicant = new TestApplicant();
     $applicant_detail = new TestApplicantDetail();
     $this->applicant = $applicant;
     $this->applicant_detail = $applicant_detail;
     $this->test_files = $test_files;
 }
Esempio n. 2
0
 public function getTestFile($con = null)
 {
     include_once 'lib/model/om/BaseTestFilePeer.php';
     if ($this->aTestFile === null && $this->test_file_id !== null) {
         $this->aTestFile = TestFilePeer::retrieveByPK($this->test_file_id, $con);
     }
     return $this->aTestFile;
 }
Esempio n. 3
0
 public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)
 {
     $keys = TestFilePeer::getFieldNames($keyType);
     if (array_key_exists($keys[0], $arr)) {
         $this->setId($arr[$keys[0]]);
     }
     if (array_key_exists($keys[1], $arr)) {
         $this->setCode($arr[$keys[1]]);
     }
     if (array_key_exists($keys[2], $arr)) {
         $this->setName($arr[$keys[2]]);
     }
     if (array_key_exists($keys[3], $arr)) {
         $this->setFormat($arr[$keys[3]]);
     }
 }
 public static function doSelectJoinAllExceptTestApplicant(Criteria $c, $con = null)
 {
     $c = clone $c;
     if ($c->getDbName() == Propel::getDefaultDB()) {
         $c->setDbName(self::DATABASE_NAME);
     }
     TestApplicantFilePeer::addSelectColumns($c);
     $startcol2 = TestApplicantFilePeer::NUM_COLUMNS - TestApplicantFilePeer::NUM_LAZY_LOAD_COLUMNS + 1;
     TestFilePeer::addSelectColumns($c);
     $startcol3 = $startcol2 + TestFilePeer::NUM_COLUMNS;
     $c->addJoin(TestApplicantFilePeer::TEST_FILE_ID, TestFilePeer::ID);
     $rs = BasePeer::doSelect($c, $con);
     $results = array();
     while ($rs->next()) {
         $omClass = TestApplicantFilePeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj1 = new $cls();
         $obj1->hydrate($rs);
         $omClass = TestFilePeer::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->getTestFile();
             if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj2->addTestApplicantFile($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj2->initTestApplicantFiles();
             $obj2->addTestApplicantFile($obj1);
         }
         $results[] = $obj1;
     }
     return $results;
 }
Esempio n. 5
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(TestFilePeer::ID, $pks, Criteria::IN);
         $objs = TestFilePeer::doSelect($criteria, $con);
     }
     return $objs;
 }