예제 #1
0
 public function getEmployeeDetails($criteria = null, $con = null)
 {
     include_once 'lib/model/om/BaseEmployeeDetailPeer.php';
     if ($criteria === null) {
         $criteria = new Criteria();
     } elseif ($criteria instanceof Criteria) {
         $criteria = clone $criteria;
     }
     if ($this->collEmployeeDetails === null) {
         if ($this->isNew()) {
             $this->collEmployeeDetails = array();
         } else {
             $criteria->add(EmployeeDetailPeer::EMPLOYEE_ID, $this->getId());
             EmployeeDetailPeer::addSelectColumns($criteria);
             $this->collEmployeeDetails = EmployeeDetailPeer::doSelect($criteria, $con);
         }
     } else {
         if (!$this->isNew()) {
             $criteria->add(EmployeeDetailPeer::EMPLOYEE_ID, $this->getId());
             EmployeeDetailPeer::addSelectColumns($criteria);
             if (!isset($this->lastEmployeeDetailCriteria) || !$this->lastEmployeeDetailCriteria->equals($criteria)) {
                 $this->collEmployeeDetails = EmployeeDetailPeer::doSelect($criteria, $con);
             }
         }
     }
     $this->lastEmployeeDetailCriteria = $criteria;
     return $this->collEmployeeDetails;
 }
예제 #2
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(EmployeeDetailPeer::ID, $pks, Criteria::IN);
         $objs = EmployeeDetailPeer::doSelect($criteria, $con);
     }
     return $objs;
 }
예제 #3
0
 public function getEmployeeDetailsRelatedBySpouseReligionId($criteria = null, $con = null)
 {
     include_once 'lib/model/om/BaseEmployeeDetailPeer.php';
     if ($criteria === null) {
         $criteria = new Criteria();
     } elseif ($criteria instanceof Criteria) {
         $criteria = clone $criteria;
     }
     if ($this->collEmployeeDetailsRelatedBySpouseReligionId === null) {
         if ($this->isNew()) {
             $this->collEmployeeDetailsRelatedBySpouseReligionId = array();
         } else {
             $criteria->add(EmployeeDetailPeer::SPOUSE_RELIGION_ID, $this->getId());
             EmployeeDetailPeer::addSelectColumns($criteria);
             $this->collEmployeeDetailsRelatedBySpouseReligionId = EmployeeDetailPeer::doSelect($criteria, $con);
         }
     } else {
         if (!$this->isNew()) {
             $criteria->add(EmployeeDetailPeer::SPOUSE_RELIGION_ID, $this->getId());
             EmployeeDetailPeer::addSelectColumns($criteria);
             if (!isset($this->lastEmployeeDetailRelatedBySpouseReligionIdCriteria) || !$this->lastEmployeeDetailRelatedBySpouseReligionIdCriteria->equals($criteria)) {
                 $this->collEmployeeDetailsRelatedBySpouseReligionId = EmployeeDetailPeer::doSelect($criteria, $con);
             }
         }
     }
     $this->lastEmployeeDetailRelatedBySpouseReligionIdCriteria = $criteria;
     return $this->collEmployeeDetailsRelatedBySpouseReligionId;
 }