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