protected function doGetListResponse(KalturaFilterPager $pager, $type = null) { $c = new Criteria(); if ($type) { $c->add(ServerNodePeer::TYPE, $type); } $serverNodeFilter = $this->toObject(); $serverNodeFilter->attachToCriteria($c); $pager->attachToCriteria($c); $list = ServerNodePeer::doSelect($c); $totalCount = count($list); return array($list, $totalCount); }
public static function retrieveOrderedServerNodesArrayByPKs($pks, PropelPDO $con = null) { if (empty($pks)) { $objs = array(); } else { $criteria = new Criteria(ServerNodePeer::DATABASE_NAME); $criteria->add(ServerNodePeer::ID, $pks, Criteria::IN); $criteria->add(ServerNodePeer::STATUS, ServerNodeStatus::ACTIVE); $orderBy = "FIELD (" . self::ID . "," . implode(",", $pks) . ")"; // first take the pattner_id and then the rest $criteria->addAscendingOrderByColumn($orderBy); $objs = ServerNodePeer::doSelect($criteria, $con); } return $objs; }
/** * 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(ServerNodePeer::DATABASE_NAME); $criteria->add(ServerNodePeer::ID, $pks, Criteria::IN); $objs = ServerNodePeer::doSelect($criteria, $con); } return $objs; }