/**
  * Declares an association between this object and a CcPlaylist object.
  *
  * @param      CcPlaylist $v
  * @return     CcPlaylistcontents The current object (for fluent API support)
  * @throws     PropelException
  */
 public function setCcPlaylist(CcPlaylist $v = null)
 {
     // aggregate_column_relation behavior
     if (null !== $this->aCcPlaylist && $v !== $this->aCcPlaylist) {
         $this->oldCcPlaylist = $this->aCcPlaylist;
     }
     if ($v === null) {
         $this->setDbPlaylistId(NULL);
     } else {
         $this->setDbPlaylistId($v->getDbId());
     }
     $this->aCcPlaylist = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the CcPlaylist object, it will not be re-added.
     if ($v !== null) {
         $v->addCcPlaylistcontents($this);
     }
     return $this;
 }
 /**
  * Filter the query by a related CcPlaylist object
  *
  * @param     CcPlaylist $ccPlaylist  the related object to use as filter
  * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return    CcPlaylistcontentsQuery The current query, for fluid interface
  */
 public function filterByCcPlaylist($ccPlaylist, $comparison = null)
 {
     return $this->addUsingAlias(CcPlaylistcontentsPeer::PLAYLIST_ID, $ccPlaylist->getDbId(), $comparison);
 }
Example #3
0
 /**
  * Create instance of a Playlist object.
  *
  * @param string $p_fname
  * 		Name of the playlist
  * @return Playlist
  */
 public function create($p_fname = NULL)
 {
     $this->name = !empty($p_fname) ? $p_fname : date("H:i:s");
     $this->mtime = new DateTime("now");
     $pl = new CcPlaylist();
     $pl->setDbName($this->name);
     $pl->setDbState("incomplete");
     $pl->setDbMtime($this->mtime);
     $pl->save();
     $this->id = $pl->getDbId();
     $this->setState('ready');
     return $this;
 }
Example #4
0
 /**
  * Filter the query by a related CcPlaylist object
  *
  * @param     CcPlaylist $ccPlaylist  the related object to use as filter
  * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return    CcSubjsQuery The current query, for fluid interface
  */
 public function filterByCcPlaylist($ccPlaylist, $comparison = null)
 {
     return $this->addUsingAlias(CcSubjsPeer::ID, $ccPlaylist->getDbEditedby(), $comparison);
 }
 /**
  * Exclude object from result
  *
  * @param     CcPlaylist $ccPlaylist Object to remove from the list of results
  *
  * @return    CcPlaylistQuery The current query, for fluid interface
  */
 public function prune($ccPlaylist = null)
 {
     if ($ccPlaylist) {
         $this->addUsingAlias(CcPlaylistPeer::ID, $ccPlaylist->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      CcPlaylist $value A CcPlaylist object.
  * @param      string $key (optional) key to use for instance map (for performance boost if key was already calculated externally).
  */
 public static function addInstanceToPool(CcPlaylist $obj, $key = null)
 {
     if (Propel::isInstancePoolingEnabled()) {
         if ($key === null) {
             $key = (string) $obj->getDbId();
         }
         // if key === null
         self::$instances[$key] = $obj;
     }
 }
 /**
  * Declares an association between this object and a CcPlaylist object.
  *
  * @param      CcPlaylist $v
  * @return     CcPlaylistcriteria The current object (for fluent API support)
  * @throws     PropelException
  */
 public function setCcPlaylist(CcPlaylist $v = null)
 {
     if ($v === null) {
         $this->setDbPlaylistId(NULL);
     } else {
         $this->setDbPlaylistId($v->getDbId());
     }
     $this->aCcPlaylist = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the CcPlaylist object, it will not be re-added.
     if ($v !== null) {
         $v->addCcPlaylistcriteria($this);
     }
     return $this;
 }