/** * @param int $objectType * @param string $objectId * @param PropelPDO $con * @return array<FileAsset> */ public static function retrieveByObject($objectType, $objectId, PropelPDO $con = null) { $criteria = new Criteria(); $criteria->add(FileAssetPeer::OBJECT_TYPE, $objectType); $criteria->add(FileAssetPeer::OBJECT_ID, $objectId); return FileAssetPeer::doSelect($criteria, $con); }
public function getListResponse(KalturaFilterPager $pager, KalturaDetachedResponseProfile $responseProfile = null) { $fileAssetFilter = $this->toObject(); $c = new Criteria(); $fileAssetFilter->attachToCriteria($c); $totalCount = FileAssetPeer::doCount($c); $pager->attachToCriteria($c); $dbList = FileAssetPeer::doSelect($c); $response = new KalturaFileAssetListResponse(); $response->objects = KalturaFileAssetArray::fromDbArray($dbList, $responseProfile); $response->totalCount = $totalCount; 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(FileAssetPeer::DATABASE_NAME); $criteria->add(FileAssetPeer::ID, $pks, Criteria::IN); $objs = FileAssetPeer::doSelect($criteria, $con); } return $objs; }