Пример #1
0
 public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)
 {
     $keys = VApplicantTestPeer::getFieldNames($keyType);
     if (array_key_exists($keys[0], $arr)) {
         $this->setId($arr[$keys[0]]);
     }
     if (array_key_exists($keys[1], $arr)) {
         $this->setTestApplicantDetailId($arr[$keys[1]]);
     }
     if (array_key_exists($keys[2], $arr)) {
         $this->setCode($arr[$keys[2]]);
     }
     if (array_key_exists($keys[3], $arr)) {
         $this->setCode2($arr[$keys[3]]);
     }
     if (array_key_exists($keys[4], $arr)) {
         $this->setName($arr[$keys[4]]);
     }
     if (array_key_exists($keys[5], $arr)) {
         $this->setDepartmentId($arr[$keys[5]]);
     }
     if (array_key_exists($keys[6], $arr)) {
         $this->setClassGroupId($arr[$keys[6]]);
     }
     if (array_key_exists($keys[7], $arr)) {
         $this->setRegTestPeriodId($arr[$keys[7]]);
     }
     if (array_key_exists($keys[8], $arr)) {
         $this->setLocationId($arr[$keys[8]]);
     }
     if (array_key_exists($keys[9], $arr)) {
         $this->setClassId($arr[$keys[9]]);
     }
     if (array_key_exists($keys[10], $arr)) {
         $this->setIspass1($arr[$keys[10]]);
     }
     if (array_key_exists($keys[11], $arr)) {
         $this->setRank1($arr[$keys[11]]);
     }
     if (array_key_exists($keys[12], $arr)) {
         $this->setApplicantType($arr[$keys[12]]);
     }
     if (array_key_exists($keys[13], $arr)) {
         $this->setEnrolled($arr[$keys[13]]);
     }
     if (array_key_exists($keys[14], $arr)) {
         $this->setRegInfo($arr[$keys[14]]);
     }
     if (array_key_exists($keys[15], $arr)) {
         $this->setStatus($arr[$keys[15]]);
     }
     if (array_key_exists($keys[16], $arr)) {
         $this->setIsAlazhar($arr[$keys[16]]);
     }
     if (array_key_exists($keys[17], $arr)) {
         $this->setHeregStatus($arr[$keys[17]]);
     }
     if (array_key_exists($keys[18], $arr)) {
         $this->setYear($arr[$keys[18]]);
     }
     if (array_key_exists($keys[19], $arr)) {
         $this->setPassword($arr[$keys[19]]);
     }
 }
Пример #2
0
 public function getVApplicantTestsJoinClassGroupRelatedByClassId($criteria = null, $con = null)
 {
     include_once 'lib/model/om/BaseVApplicantTestPeer.php';
     if ($criteria === null) {
         $criteria = new Criteria();
     } elseif ($criteria instanceof Criteria) {
         $criteria = clone $criteria;
     }
     if ($this->collVApplicantTests === null) {
         if ($this->isNew()) {
             $this->collVApplicantTests = array();
         } else {
             $criteria->add(VApplicantTestPeer::TEST_APPLICANT_DETAIL_ID, $this->getId());
             $this->collVApplicantTests = VApplicantTestPeer::doSelectJoinClassGroupRelatedByClassId($criteria, $con);
         }
     } else {
         $criteria->add(VApplicantTestPeer::TEST_APPLICANT_DETAIL_ID, $this->getId());
         if (!isset($this->lastVApplicantTestCriteria) || !$this->lastVApplicantTestCriteria->equals($criteria)) {
             $this->collVApplicantTests = VApplicantTestPeer::doSelectJoinClassGroupRelatedByClassId($criteria, $con);
         }
     }
     $this->lastVApplicantTestCriteria = $criteria;
     return $this->collVApplicantTests;
 }
Пример #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(VApplicantTestPeer::ID, $pks, Criteria::IN);
         $objs = VApplicantTestPeer::doSelect($criteria, $con);
     }
     return $objs;
 }