public function getVTestApplScheds($criteria = null, $con = null) { include_once 'lib/model/om/BaseVTestApplSchedPeer.php'; if ($criteria === null) { $criteria = new Criteria(); } elseif ($criteria instanceof Criteria) { $criteria = clone $criteria; } if ($this->collVTestApplScheds === null) { if ($this->isNew()) { $this->collVTestApplScheds = array(); } else { $criteria->add(VTestApplSchedPeer::TEST_APPLICANT_ID, $this->getId()); VTestApplSchedPeer::addSelectColumns($criteria); $this->collVTestApplScheds = VTestApplSchedPeer::doSelect($criteria, $con); } } else { if (!$this->isNew()) { $criteria->add(VTestApplSchedPeer::TEST_APPLICANT_ID, $this->getId()); VTestApplSchedPeer::addSelectColumns($criteria); if (!isset($this->lastVTestApplSchedCriteria) || !$this->lastVTestApplSchedCriteria->equals($criteria)) { $this->collVTestApplScheds = VTestApplSchedPeer::doSelect($criteria, $con); } } } $this->lastVTestApplSchedCriteria = $criteria; return $this->collVTestApplScheds; }
public static function retrieveByPK($test_applicant_id, $test_schedule_id, $con = null) { if ($con === null) { $con = Propel::getConnection(self::DATABASE_NAME); } $criteria = new Criteria(); $criteria->add(VTestApplSchedPeer::TEST_APPLICANT_ID, $test_applicant_id); $criteria->add(VTestApplSchedPeer::TEST_SCHEDULE_ID, $test_schedule_id); $v = VTestApplSchedPeer::doSelect($criteria, $con); return !empty($v) ? $v[0] : null; }
public function getVTestApplSchedsRelatedByLocation2($criteria = null, $con = null) { include_once 'lib/model/om/BaseVTestApplSchedPeer.php'; if ($criteria === null) { $criteria = new Criteria(); } elseif ($criteria instanceof Criteria) { $criteria = clone $criteria; } if ($this->collVTestApplSchedsRelatedByLocation2 === null) { if ($this->isNew()) { $this->collVTestApplSchedsRelatedByLocation2 = array(); } else { $criteria->add(VTestApplSchedPeer::LOCATION2, $this->getId()); VTestApplSchedPeer::addSelectColumns($criteria); $this->collVTestApplSchedsRelatedByLocation2 = VTestApplSchedPeer::doSelect($criteria, $con); } } else { if (!$this->isNew()) { $criteria->add(VTestApplSchedPeer::LOCATION2, $this->getId()); VTestApplSchedPeer::addSelectColumns($criteria); if (!isset($this->lastVTestApplSchedRelatedByLocation2Criteria) || !$this->lastVTestApplSchedRelatedByLocation2Criteria->equals($criteria)) { $this->collVTestApplSchedsRelatedByLocation2 = VTestApplSchedPeer::doSelect($criteria, $con); } } } $this->lastVTestApplSchedRelatedByLocation2Criteria = $criteria; return $this->collVTestApplSchedsRelatedByLocation2; }