/** * Exclude object from result * * @param CcPlaylistcontents $ccPlaylistcontents Object to remove from the list of results * * @return CcPlaylistcontentsQuery The current query, for fluid interface */ public function prune($ccPlaylistcontents = null) { if ($ccPlaylistcontents) { $this->addUsingAlias(CcPlaylistcontentsPeer::ID, $ccPlaylistcontents->getDbId(), Criteria::NOT_EQUAL); } return $this; }
/** * 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 CcPlaylistcontents $value A CcPlaylistcontents object. * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). */ public static function addInstanceToPool(CcPlaylistcontents $obj, $key = null) { if (Propel::isInstancePoolingEnabled()) { if ($key === null) { $key = (string) $obj->getDbId(); } // if key === null self::$instances[$key] = $obj; } }
/** * Filter the query by a related CcPlaylistcontents object * * @param CcPlaylistcontents $ccPlaylistcontents the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return CcFilesQuery The current query, for fluid interface */ public function filterByCcPlaylistcontents($ccPlaylistcontents, $comparison = null) { return $this->addUsingAlias(CcFilesPeer::ID, $ccPlaylistcontents->getDbFileId(), $comparison); }
/** * Insert a new playlist element. * * @param int $plId * id of Playlist * @param int $fileId * id of File * @param string $offset * relative offset in extent format * @param string $clipstart * audioClip clipstart in extent format * @param string $clipEnd * audioClip clipEnd in extent format * @param string $clipLength * audioClip playlength in extent format (?) * @param string $acGunid * audioClip gunid * @param string $acLen * audioClip length in extent format * @param string $acTit * audioClip title * @param string $fadeIn * fadeIn value in ss.ssssss or extent format * @param string $fadeOut * fadeOut value in ss.ssssss or extent format * @return array with fields: * <ul> * <li>plElId int - record id of playlistElement</li> * <li>plElGunid string - gl.unique id of playlistElement</li> * <li>fadeInId int - record id</li> * <li>fadeOutId int - record id</li> * </ul> */ private function insertPlaylistElement($plId, $fileId, $pos, $clipLength, $cuein, $cueout, $fadeIn = NULL, $fadeOut = NULL) { $defaultFade = Application_Model_Preference::GetDefaultFade(); if (is_null($fadeIn)) { if ($defaultFade != "") { $fadeIn = $defaultFade; } else { $fadeIn = '00:00:00.000'; } } if (is_null($fadeOut)) { if ($defaultFade != "") { $fadeOut = $defaultFade; } else { $fadeOut = '00:00:00.000'; } } $row = new CcPlaylistcontents(); $row->setDbPlaylistId($plId); $row->setDbFileId($fileId); $row->setDbPosition($pos); $row->save(); $row->setDbCliplength($clipLength); $row->setDbCuein($cuein); $row->setDbCueout($cueout); $row->setDbFadein($fadeIn); $row->setDbFadeout($fadeOut); return TRUE; }
private function insertPlaylistElement($info) { $row = new CcPlaylistcontents(); $row->setDbPlaylistId($this->id); $row->setDbPosition($info["pos"]); $row->setDbCliplength($info["cliplength"]); $row->setDbCuein($info["cuein"]); $row->setDbCueout($info["cueout"]); $row->setDbFadein(Application_Common_DateHelper::secondsToPlaylistTime($info["fadein"])); $row->setDbFadeout(Application_Common_DateHelper::secondsToPlaylistTime($info["fadeout"])); if ($info["ftype"] == "audioclip") { $row->setDbFileId($info["id"]); $row->setDbTrackOffset($info["crossfadeDuration"]); $type = 0; } elseif ($info["ftype"] == "stream") { $row->setDbStreamId($info["id"]); $type = 1; } elseif ($info["ftype"] == "block") { $row->setDbBlockId($info["id"]); $type = 2; } $row->setDbType($type); $row->save($this->con); // above save result update on cc_playlist table on length column. // but $this->pl doesn't get updated automatically // so we need to manually grab it again from DB so it has updated values // It is something to do FORMAT_ON_DEMAND( Lazy Loading ) $this->pl = CcPlaylistQuery::create()->findPK($this->id); }