public function getJobType($con = null) { include_once 'lib/model/om/BaseJobTypePeer.php'; if ($this->aJobType === null && $this->job_type_id !== null) { $this->aJobType = JobTypePeer::retrieveByPK($this->job_type_id, $con); } return $this->aJobType; }
public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) { $keys = JobTypePeer::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->setCreated($arr[$keys[3]]); } }
public static function doSelectJoinAllExceptSubdistrict(Criteria $c, $con = null) { $c = clone $c; if ($c->getDbName() == Propel::getDefaultDB()) { $c->setDbName(self::DATABASE_NAME); } NgTestApplicantParentsPeer::addSelectColumns($c); $startcol2 = NgTestApplicantParentsPeer::NUM_COLUMNS - NgTestApplicantParentsPeer::NUM_LAZY_LOAD_COLUMNS + 1; NgTestApplicantPeer::addSelectColumns($c); $startcol3 = $startcol2 + NgTestApplicantPeer::NUM_COLUMNS; ReligionPeer::addSelectColumns($c); $startcol4 = $startcol3 + ReligionPeer::NUM_COLUMNS; DegreePeer::addSelectColumns($c); $startcol5 = $startcol4 + DegreePeer::NUM_COLUMNS; SalaryPeer::addSelectColumns($c); $startcol6 = $startcol5 + SalaryPeer::NUM_COLUMNS; JobTypePeer::addSelectColumns($c); $startcol7 = $startcol6 + JobTypePeer::NUM_COLUMNS; CountryPeer::addSelectColumns($c); $startcol8 = $startcol7 + CountryPeer::NUM_COLUMNS; RegionPeer::addSelectColumns($c); $startcol9 = $startcol8 + RegionPeer::NUM_COLUMNS; CityPeer::addSelectColumns($c); $startcol10 = $startcol9 + CityPeer::NUM_COLUMNS; DistrictPeer::addSelectColumns($c); $startcol11 = $startcol10 + DistrictPeer::NUM_COLUMNS; $c->addJoin(NgTestApplicantParentsPeer::NG_TEST_APPLICANT_ID, NgTestApplicantPeer::ID); $c->addJoin(NgTestApplicantParentsPeer::RELIGION_ID, ReligionPeer::ID); $c->addJoin(NgTestApplicantParentsPeer::DEGREE_ID, DegreePeer::ID); $c->addJoin(NgTestApplicantParentsPeer::SALARY_ID, SalaryPeer::ID); $c->addJoin(NgTestApplicantParentsPeer::JOB_TYPE_ID, JobTypePeer::ID); $c->addJoin(NgTestApplicantParentsPeer::COUNTRY_ID, CountryPeer::ID); $c->addJoin(NgTestApplicantParentsPeer::REGION_ID, RegionPeer::ID); $c->addJoin(NgTestApplicantParentsPeer::CITY_ID, CityPeer::ID); $c->addJoin(NgTestApplicantParentsPeer::DISTRICT_ID, DistrictPeer::ID); $rs = BasePeer::doSelect($c, $con); $results = array(); while ($rs->next()) { $omClass = NgTestApplicantParentsPeer::getOMClass(); $cls = Propel::import($omClass); $obj1 = new $cls(); $obj1->hydrate($rs); $omClass = NgTestApplicantPeer::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->getNgTestApplicant(); if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) { $newObject = false; $temp_obj2->addNgTestApplicantParents($obj1); break; } } if ($newObject) { $obj2->initNgTestApplicantParentss(); $obj2->addNgTestApplicantParents($obj1); } $omClass = ReligionPeer::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->getReligion(); if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) { $newObject = false; $temp_obj3->addNgTestApplicantParents($obj1); break; } } if ($newObject) { $obj3->initNgTestApplicantParentss(); $obj3->addNgTestApplicantParents($obj1); } $omClass = DegreePeer::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->getDegree(); if ($temp_obj4->getPrimaryKey() === $obj4->getPrimaryKey()) { $newObject = false; $temp_obj4->addNgTestApplicantParents($obj1); break; } } if ($newObject) { $obj4->initNgTestApplicantParentss(); $obj4->addNgTestApplicantParents($obj1); } $omClass = SalaryPeer::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->getSalary(); if ($temp_obj5->getPrimaryKey() === $obj5->getPrimaryKey()) { $newObject = false; $temp_obj5->addNgTestApplicantParents($obj1); break; } } if ($newObject) { $obj5->initNgTestApplicantParentss(); $obj5->addNgTestApplicantParents($obj1); } $omClass = JobTypePeer::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->getJobType(); if ($temp_obj6->getPrimaryKey() === $obj6->getPrimaryKey()) { $newObject = false; $temp_obj6->addNgTestApplicantParents($obj1); break; } } if ($newObject) { $obj6->initNgTestApplicantParentss(); $obj6->addNgTestApplicantParents($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->addNgTestApplicantParents($obj1); break; } } if ($newObject) { $obj7->initNgTestApplicantParentss(); $obj7->addNgTestApplicantParents($obj1); } $omClass = RegionPeer::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->getRegion(); if ($temp_obj8->getPrimaryKey() === $obj8->getPrimaryKey()) { $newObject = false; $temp_obj8->addNgTestApplicantParents($obj1); break; } } if ($newObject) { $obj8->initNgTestApplicantParentss(); $obj8->addNgTestApplicantParents($obj1); } $omClass = CityPeer::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->getCity(); if ($temp_obj9->getPrimaryKey() === $obj9->getPrimaryKey()) { $newObject = false; $temp_obj9->addNgTestApplicantParents($obj1); break; } } if ($newObject) { $obj9->initNgTestApplicantParentss(); $obj9->addNgTestApplicantParents($obj1); } $omClass = DistrictPeer::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->getDistrict(); if ($temp_obj10->getPrimaryKey() === $obj10->getPrimaryKey()) { $newObject = false; $temp_obj10->addNgTestApplicantParents($obj1); break; } } if ($newObject) { $obj10->initNgTestApplicantParentss(); $obj10->addNgTestApplicantParents($obj1); } $results[] = $obj1; } return $results; }
public static function doSelectJoinAllExceptNgApplicantCategory(Criteria $c, $con = null) { $c = clone $c; if ($c->getDbName() == Propel::getDefaultDB()) { $c->setDbName(self::DATABASE_NAME); } NgRegPeriodRulePeer::addSelectColumns($c); $startcol2 = NgRegPeriodRulePeer::NUM_COLUMNS - NgRegPeriodRulePeer::NUM_LAZY_LOAD_COLUMNS + 1; NgRegPeriodPeer::addSelectColumns($c); $startcol3 = $startcol2 + NgRegPeriodPeer::NUM_COLUMNS; AcademicCostComponentPeer::addSelectColumns($c); $startcol4 = $startcol3 + AcademicCostComponentPeer::NUM_COLUMNS; JobTypePeer::addSelectColumns($c); $startcol5 = $startcol4 + JobTypePeer::NUM_COLUMNS; $c->addJoin(NgRegPeriodRulePeer::NG_REG_PERIOD_ID, NgRegPeriodPeer::ID); $c->addJoin(NgRegPeriodRulePeer::ACADEMIC_COST_COMPONENT_ID, AcademicCostComponentPeer::ID); $c->addJoin(NgRegPeriodRulePeer::JOB_TYPE_ID, JobTypePeer::ID); $rs = BasePeer::doSelect($c, $con); $results = array(); while ($rs->next()) { $omClass = NgRegPeriodRulePeer::getOMClass(); $cls = Propel::import($omClass); $obj1 = new $cls(); $obj1->hydrate($rs); $omClass = NgRegPeriodPeer::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->getNgRegPeriod(); if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) { $newObject = false; $temp_obj2->addNgRegPeriodRule($obj1); break; } } if ($newObject) { $obj2->initNgRegPeriodRules(); $obj2->addNgRegPeriodRule($obj1); } $omClass = AcademicCostComponentPeer::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->getAcademicCostComponent(); if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) { $newObject = false; $temp_obj3->addNgRegPeriodRule($obj1); break; } } if ($newObject) { $obj3->initNgRegPeriodRules(); $obj3->addNgRegPeriodRule($obj1); } $omClass = JobTypePeer::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->getJobType(); if ($temp_obj4->getPrimaryKey() === $obj4->getPrimaryKey()) { $newObject = false; $temp_obj4->addNgRegPeriodRule($obj1); break; } } if ($newObject) { $obj4->initNgRegPeriodRules(); $obj4->addNgRegPeriodRule($obj1); } $results[] = $obj1; } return $results; }
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(JobTypePeer::ID, $pks, Criteria::IN); $objs = JobTypePeer::doSelect($criteria, $con); } return $objs; }