/** * Retrieve all objects by kuser id * * @param int $kuserId the kuser id. * @param PropelPDO $con the connection to use * @return array<ShortLink> */ public static function retrieveByKuserId($kuserId, $partnerId = null, PropelPDO $con = null) { $criteria = new Criteria(); $criteria->add(ShortLinkPeer::KUSER_ID, $kuserId); if ($partnerId) { $criteria->add(ShortLinkPeer::PARTNER_ID, $partnerId); } return ShortLinkPeer::doSelect($criteria, $con); }
/** * List short link objects by filter and pager * * @action list * @param KalturaShortLinkFilter $filter * @param KalturaFilterPager $pager * @return KalturaShortLinkListResponse */ function listAction(KalturaShortLinkFilter $filter = null, KalturaFilterPager $pager = null) { if (!$filter) { $filter = new KalturaShortLinkFilter(); } $shortLinkFilter = $filter->toFilter($this->getPartnerId()); $c = new Criteria(); $shortLinkFilter->attachToCriteria($c); $count = ShortLinkPeer::doCount($c); if ($pager) { $pager->attachToCriteria($c); } $list = ShortLinkPeer::doSelect($c); $response = new KalturaShortLinkListResponse(); $response->objects = KalturaShortLinkArray::fromDbArray($list); $response->totalCount = $count; return $response; }
/** * Retrieve multiple objects by pkey. * * @param array $pks List of primary keys * @param PropelPDO $con the connection to use * @throws PropelException Any exceptions caught during processing will be * rethrown wrapped into a PropelException. */ public static function retrieveByPKs($pks, PropelPDO $con = null) { $objs = null; if (empty($pks)) { $objs = array(); } else { $criteria = new Criteria(ShortLinkPeer::DATABASE_NAME); $criteria->add(ShortLinkPeer::ID, $pks, Criteria::IN); $objs = ShortLinkPeer::doSelect($criteria, $con); } return $objs; }