示例#1
0
 /**
  * Declares an association between this object and a assetParams object.
  *
  * @param      assetParams $v
  * @return     asset The current object (for fluent API support)
  * @throws     PropelException
  */
 public function setassetParams(assetParams $v = null)
 {
     if ($v === null) {
         $this->setFlavorParamsId(NULL);
     } else {
         $this->setFlavorParamsId($v->getId());
     }
     $this->aassetParams = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the assetParams object, it will not be re-added.
     if ($v !== null) {
         $v->addasset($this);
     }
     return $this;
 }
示例#2
0
 /**
  * Adds an object to the instance pool.
  *
  * Propel keeps cached copies of objects in an instance pool when they are retrieved
  * from the database.  In some cases -- especially when you override doSelect*()
  * methods in your stub classes -- you may need to explicitly add objects
  * to the cache in order to ensure that the same objects are always returned by doSelect*()
  * and retrieveByPK*() calls.
  *
  * @param      assetParams $value A assetParams object.
  * @param      string $key (optional) key to use for instance map (for performance boost if key was already calculated externally).
  */
 public static function addInstanceToPool(assetParams $obj, $key = null)
 {
     if (Propel::isInstancePoolingEnabled()) {
         if ($key === null) {
             $key = (string) $obj->getId();
         }
         // if key === null
         self::$instances[$key] = $obj;
     }
 }
示例#3
0
 /**
  * Adds an object to the instance pool.
  *
  * Propel keeps cached copies of objects in an instance pool when they are retrieved
  * from the database.  In some cases -- especially when you override doSelect*()
  * methods in your stub classes -- you may need to explicitly add objects
  * to the cache in order to ensure that the same objects are always returned by doSelect*()
  * and retrieveByPK*() calls.
  *
  * @param      assetParams $value A assetParams object.
  * @param      string $key (optional) key to use for instance map (for performance boost if key was already calculated externally).
  */
 public static function addInstanceToPool(assetParams $obj, $key = null)
 {
     if (Propel::isInstancePoolingEnabled()) {
         if ($key === null) {
             $key = (string) $obj->getId();
         }
         if (isset(self::$instances[$key]) || count(self::$instances) < kConf::get('max_num_instances_in_pool')) {
             self::$instances[$key] = $obj;
             kMemoryManager::registerPeer('assetParamsPeer');
         }
     }
 }
示例#4
0
 /**
  * @param assetParams $assetParam
  */
 protected function assetParamDeleted(assetParams $assetParam)
 {
     //In Case Flavor Deleted Belongs To Partner 0 Exit Without Deleteing
     if ($assetParam->getPartnerId() == 0) {
         KalturaLog::log("Deleting Flavor Param Of Partner 0 Is Restricted");
         return;
     }
     $c = new Criteria();
     $c->setLimit(100);
     $c->add(flavorParamsConversionProfilePeer::FLAVOR_PARAMS_ID, $assetParam->getId());
     for (;;) {
         $flavorParamsConversionProfiles = flavorParamsConversionProfilePeer::doSelect($c);
         foreach ($flavorParamsConversionProfiles as $flavorParamsConversionProfile) {
             /* @var $flavorParamsConversionProfile flavorParamsConversionProfile */
             $flavorParamsConversionProfile->delete();
         }
         if (count($flavorParamsConversionProfiles) < 100) {
             break;
         }
         flavorParamsConversionProfilePeer::clearInstancePool();
     }
     KalturaLog::info("Flavor Params Conversion Profile Relations were deleted for flavor param id [" . $assetParam->getId() . "]");
 }