/**
  * @action listByPartner
  * @param KalturaPartnerFilter $filter
  * @param KalturaFilterPager $pager
  * @return KalturaStorageProfileListResponse
  */
 public function listByPartnerAction(KalturaPartnerFilter $filter = null, KalturaFilterPager $pager = null)
 {
     $c = new Criteria();
     if (!is_null($filter)) {
         $partnerFilter = new partnerFilter();
         $filter->toObject($partnerFilter);
         $partnerFilter->set('_gt_id', 0);
         $partnerCriteria = new Criteria();
         $partnerFilter->attachToCriteria($partnerCriteria);
         $partnerCriteria->setLimit(1000);
         $partnerCriteria->clearSelectColumns();
         $partnerCriteria->addSelectColumn(PartnerPeer::ID);
         $stmt = PartnerPeer::doSelectStmt($partnerCriteria);
         if ($stmt->rowCount() < 1000) {
             $partnerIds = $stmt->fetchAll(PDO::FETCH_COLUMN);
             $c->add(StorageProfilePeer::PARTNER_ID, $partnerIds, Criteria::IN);
         }
     }
     if (is_null($pager)) {
         $pager = new KalturaFilterPager();
     }
     $totalCount = StorageProfilePeer::doCount($c);
     $pager->attachToCriteria($c);
     $list = StorageProfilePeer::doSelect($c);
     $newList = KalturaStorageProfileArray::fromStorageProfileArray($list);
     $response = new KalturaStorageProfileListResponse();
     $response->totalCount = $totalCount;
     $response->objects = $newList;
     return $response;
 }
 public function validateForInsert($propertiesToSkip = array())
 {
     $this->validatePropertyMinLength("name", 1);
     if ($this->systemName) {
         $c = KalturaCriteria::create(StorageProfilePeer::OM_CLASS);
         $c->add(StorageProfilePeer::SYSTEM_NAME, $this->systemName);
         if (StorageProfilePeer::doCount($c)) {
             throw new KalturaAPIException(KalturaErrors::SYSTEM_NAME_ALREADY_EXISTS, $this->systemName);
         }
     }
     return parent::validateForInsert($propertiesToSkip);
 }
 /**	
  * @action list
  * @param KalturaStorageProfileFilter $filter
  * @param KalturaFilterPager $pager
  * @return KalturaStorageProfileListResponse
  */
 public function listAction(KalturaStorageProfileFilter $filter = null, KalturaFilterPager $pager = null)
 {
     $c = new Criteria();
     if (!$filter) {
         $filter = new KalturaStorageProfileFilter();
     }
     $storageProfileFilter = new StorageProfileFilter();
     $filter->toObject($storageProfileFilter);
     $storageProfileFilter->attachToCriteria($c);
     $list = StorageProfilePeer::doSelect($c);
     if (!$pager) {
         $pager = new KalturaFilterPager();
     }
     $pager->attachToCriteria($c);
     $response = new KalturaStorageProfileListResponse();
     $response->totalCount = StorageProfilePeer::doCount($c);
     $response->objects = KalturaStorageProfileArray::fromDbArray($list, $this->getResponseProfile());
     return $response;
 }