/**
  * List aggregated partner data
  * 
  * @action list
  * @param KalturaDwhHourlyPartnerFilter $filter
  * @param KalturaFilterPager $pager
  * @return KalturaDwhHourlyPartnerListResponse
  */
 function listAction(KalturaDwhHourlyPartnerFilter $filter, KalturaFilterPager $pager = null)
 {
     $filter->validatePropertyNotNull('aggregatedTimeLessThanOrEqual');
     $filter->validatePropertyNotNull('aggregatedTimeGreaterThanOrEqual');
     if (!$pager) {
         $pager = new KalturaFilterPager();
     }
     $c = new Criteria();
     $dwhHourlyPartnerFilter = $filter->toObject();
     $dwhHourlyPartnerFilter->attachToCriteria($c);
     $count = DwhHourlyPartnerPeer::doCount($c);
     $pager->attachToCriteria($c);
     $list = DwhHourlyPartnerPeer::doSelect($c);
     $response = new KalturaDwhHourlyPartnerListResponse();
     $response->objects = KalturaDwhHourlyPartnerArray::fromDbArray($list, $this->getResponseProfile());
     $response->totalCount = $count;
     return $response;
 }
 public function getFieldNameFromPeer($field_name)
 {
     $res = DwhHourlyPartnerPeer::translateFieldName($field_name, $this->field_name_translation_type, BasePeer::TYPE_COLNAME);
     return $res;
 }
示例#3
0
 /**
  * Exports the object as an array.
  *
  * You can specify the key type of the array by passing one of the class
  * type constants.
  *
  * @param      string $keyType (optional) One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME
  *                        BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. Defaults to BasePeer::TYPE_PHPNAME.
  * @param      boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns.  Defaults to TRUE.
  * @return     an associative array containing the field names (as keys) and field values
  */
 public function toArray($keyType = BasePeer::TYPE_PHPNAME, $includeLazyLoadColumns = true)
 {
     $keys = DwhHourlyPartnerPeer::getFieldNames($keyType);
     $result = array($keys[0] => $this->getPartnerId(), $keys[1] => $this->getDateId(), $keys[2] => $this->getHourId(), $keys[3] => $this->getSumTimeViewed(), $keys[4] => $this->getCountTimeViewed(), $keys[5] => $this->getCountPlays(), $keys[6] => $this->getCountLoads(), $keys[7] => $this->getCountPlays25(), $keys[8] => $this->getCountPlays50(), $keys[9] => $this->getCountPlays75(), $keys[10] => $this->getCountPlays100(), $keys[11] => $this->getCountEdit(), $keys[12] => $this->getCountViral(), $keys[13] => $this->getCountDownload(), $keys[14] => $this->getCountReport(), $keys[15] => $this->getCountMedia(), $keys[16] => $this->getCountVideo(), $keys[17] => $this->getCountImage(), $keys[18] => $this->getCountAudio(), $keys[19] => $this->getCountMix(), $keys[20] => $this->getCountMixNonEmpty(), $keys[21] => $this->getCountPlaylist(), $keys[22] => $this->getCountBandwidth(), $keys[23] => $this->getCountStorage(), $keys[24] => $this->getCountUsers(), $keys[25] => $this->getCountWidgets(), $keys[26] => $this->getFlagActiveSite(), $keys[27] => $this->getFlagActivePublisher(), $keys[28] => $this->getAggrStorage(), $keys[29] => $this->getAggrBandwidth(), $keys[30] => $this->getCountBufStart(), $keys[31] => $this->getCountBufEnd(), $keys[32] => $this->getCountOpenFullScreen(), $keys[33] => $this->getCountCloseFullScreen(), $keys[34] => $this->getCountReplay(), $keys[35] => $this->getCountSeek(), $keys[36] => $this->getCountOpenUpload(), $keys[37] => $this->getCountSavePublish(), $keys[38] => $this->getCountCloseEditor(), $keys[39] => $this->getCountPreBumperPlayed(), $keys[40] => $this->getCountPostBumperPlayed(), $keys[41] => $this->getCountBumperClicked(), $keys[42] => $this->getCountPrerollStarted(), $keys[43] => $this->getCountMidrollStarted(), $keys[44] => $this->getCountPostrollStarted(), $keys[45] => $this->getCountOverlayStarted(), $keys[46] => $this->getCountPrerollClicked(), $keys[47] => $this->getCountMidrollClicked(), $keys[48] => $this->getCountPostrollClicked(), $keys[49] => $this->getCountOverlayClicked(), $keys[50] => $this->getCountPreroll25(), $keys[51] => $this->getCountPreroll50(), $keys[52] => $this->getCountPreroll75(), $keys[53] => $this->getCountMidroll25(), $keys[54] => $this->getCountMidroll50(), $keys[55] => $this->getCountMidroll75(), $keys[56] => $this->getCountPostroll25(), $keys[57] => $this->getCountPostroll50(), $keys[58] => $this->getCountPostroll75(), $keys[59] => $this->getCountStreaming(), $keys[60] => $this->getAggrStreaming());
     return $result;
 }
 /**
  * Retrieve object using using composite pkey values.
  * @param      int $partner_id
  * @param      int $date_id
  * @param      int $hour_id
  * @param      PropelPDO $con
  * @return     DwhHourlyPartner
  */
 public static function retrieveByPK($partner_id, $date_id, $hour_id, PropelPDO $con = null)
 {
     $key = serialize(array((string) $partner_id, (string) $date_id, (string) $hour_id));
     if (null !== ($obj = DwhHourlyPartnerPeer::getInstanceFromPool($key))) {
         return $obj;
     }
     $criteria = new Criteria(DwhHourlyPartnerPeer::DATABASE_NAME);
     $criteria->add(DwhHourlyPartnerPeer::PARTNER_ID, $partner_id);
     $criteria->add(DwhHourlyPartnerPeer::DATE_ID, $date_id);
     $criteria->add(DwhHourlyPartnerPeer::HOUR_ID, $hour_id);
     $v = DwhHourlyPartnerPeer::doSelect($criteria, $con);
     return !empty($v) ? $v[0] : null;
 }