/** * 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 CcBlockcontents $value A CcBlockcontents object. * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). */ public static function addInstanceToPool(CcBlockcontents $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 CcBlockcontents object * * @param CcBlockcontents $ccBlockcontents 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 filterByCcBlockcontents($ccBlockcontents, $comparison = null) { return $this->addUsingAlias(CcFilesPeer::ID, $ccBlockcontents->getDbFileId(), $comparison); }
/** * Exclude object from result * * @param CcBlockcontents $ccBlockcontents Object to remove from the list of results * * @return CcBlockcontentsQuery The current query, for fluid interface */ public function prune($ccBlockcontents = null) { if ($ccBlockcontents) { $this->addUsingAlias(CcBlockcontentsPeer::ID, $ccBlockcontents->getDbId(), Criteria::NOT_EQUAL); } return $this; }
private function insertBlockElement($info) { $row = new CcBlockcontents(); $row->setDbBlockId($this->id); $row->setDbFileId($info["id"]); $row->setDbPosition($info["pos"]); $row->setDbCliplength($info["cliplength"]); $row->setDbCuein($info["cuein"]); $row->setDbCueout($info["cueout"]); $row->setDbFadein($info["fadein"]); $row->setDbFadeout($info["fadeout"]); $row->save($this->con); // above save result update on cc_block table on length column. // but $this->block 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->block = CcBlockQuery::create()->findPK($this->id); }