Beispiel #1
0
 public function getComprehensiveReviewers($criteria = null, $con = null)
 {
     include_once 'lib/model/om/BaseComprehensiveReviewerPeer.php';
     if ($criteria === null) {
         $criteria = new Criteria();
     } elseif ($criteria instanceof Criteria) {
         $criteria = clone $criteria;
     }
     if ($this->collComprehensiveReviewers === null) {
         if ($this->isNew()) {
             $this->collComprehensiveReviewers = array();
         } else {
             $criteria->add(ComprehensiveReviewerPeer::EMPLOYEE_ID, $this->getId());
             ComprehensiveReviewerPeer::addSelectColumns($criteria);
             $this->collComprehensiveReviewers = ComprehensiveReviewerPeer::doSelect($criteria, $con);
         }
     } else {
         if (!$this->isNew()) {
             $criteria->add(ComprehensiveReviewerPeer::EMPLOYEE_ID, $this->getId());
             ComprehensiveReviewerPeer::addSelectColumns($criteria);
             if (!isset($this->lastComprehensiveReviewerCriteria) || !$this->lastComprehensiveReviewerCriteria->equals($criteria)) {
                 $this->collComprehensiveReviewers = ComprehensiveReviewerPeer::doSelect($criteria, $con);
             }
         }
     }
     $this->lastComprehensiveReviewerCriteria = $criteria;
     return $this->collComprehensiveReviewers;
 }
 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(ComprehensiveReviewerPeer::ID, $pks, Criteria::IN);
         $objs = ComprehensiveReviewerPeer::doSelect($criteria, $con);
     }
     return $objs;
 }