Ejemplo n.º 1
0
 public function getSubjectTransfers($criteria = null, $con = null)
 {
     include_once 'lib/model/om/BaseSubjectTransferPeer.php';
     if ($criteria === null) {
         $criteria = new Criteria();
     } elseif ($criteria instanceof Criteria) {
         $criteria = clone $criteria;
     }
     if ($this->collSubjectTransfers === null) {
         if ($this->isNew()) {
             $this->collSubjectTransfers = array();
         } else {
             $criteria->add(SubjectTransferPeer::GRADE_CONVERSION_ID, $this->getId());
             SubjectTransferPeer::addSelectColumns($criteria);
             $this->collSubjectTransfers = SubjectTransferPeer::doSelect($criteria, $con);
         }
     } else {
         if (!$this->isNew()) {
             $criteria->add(SubjectTransferPeer::GRADE_CONVERSION_ID, $this->getId());
             SubjectTransferPeer::addSelectColumns($criteria);
             if (!isset($this->lastSubjectTransferCriteria) || !$this->lastSubjectTransferCriteria->equals($criteria)) {
                 $this->collSubjectTransfers = SubjectTransferPeer::doSelect($criteria, $con);
             }
         }
     }
     $this->lastSubjectTransferCriteria = $criteria;
     return $this->collSubjectTransfers;
 }
Ejemplo n.º 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(SubjectTransferPeer::ID, $pks, Criteria::IN);
         $objs = SubjectTransferPeer::doSelect($criteria, $con);
     }
     return $objs;
 }