/** * Filter the query by a related \SpoilerWiki\ContentAreaVersion object * * @param \SpoilerWiki\ContentAreaVersion|ObjectCollection $contentAreaVersion the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentAreaQuery The current query, for fluid interface */ public function filterByContentAreaVersion($contentAreaVersion, $comparison = null) { if ($contentAreaVersion instanceof \SpoilerWiki\ContentAreaVersion) { return $this->addUsingAlias(ContentAreaTableMap::COL_ID, $contentAreaVersion->getId(), $comparison); } elseif ($contentAreaVersion instanceof ObjectCollection) { return $this->useContentAreaVersionQuery()->filterByPrimaryKeys($contentAreaVersion->getPrimaryKeys())->endUse(); } else { throw new PropelException('filterByContentAreaVersion() only accepts arguments of type \\SpoilerWiki\\ContentAreaVersion or Collection'); } }
/** * 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 you may need to explicitly add objects * to the cache in order to ensure that the same objects are always returned by find*() * and findPk*() calls. * * @param \SpoilerWiki\ContentAreaVersion $obj A \SpoilerWiki\ContentAreaVersion object. * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). */ public static function addInstanceToPool($obj, $key = null) { if (Propel::isInstancePoolingEnabled()) { if (null === $key) { $key = serialize(array((string) $obj->getId(), (string) $obj->getVersion())); } // if key === null self::$instances[$key] = $obj; } }
/** * Sets the properties of the current object to the value they had at a specific version * * @param ChildContentAreaVersion $version The version object to use * @param ConnectionInterface $con the connection to use * @param array $loadedObjects objects that been loaded in a chain of populateFromVersion calls on referrer or fk objects. * * @return $this|ChildContentArea The current object (for fluent API support) */ public function populateFromVersion($version, $con = null, &$loadedObjects = array()) { $loadedObjects['ChildContentArea'][$version->getId()][$version->getVersion()] = $this; $this->setContent($version->getContent()); $this->setactiveVersion($version->getactiveVersion()); $this->setId($version->getId()); $this->setVersion($version->getVersion()); $this->setVersionCreatedAt($version->getVersionCreatedAt()); $this->setVersionCreatedBy($version->getVersionCreatedBy()); $this->setVersionComment($version->getVersionComment()); return $this; }
/** * Exclude object from result * * @param ChildContentAreaVersion $contentAreaVersion Object to remove from the list of results * * @return $this|ChildContentAreaVersionQuery The current query, for fluid interface */ public function prune($contentAreaVersion = null) { if ($contentAreaVersion) { $this->addCond('pruneCond0', $this->getAliasedColName(ContentAreaVersionTableMap::COL_ID), $contentAreaVersion->getId(), Criteria::NOT_EQUAL); $this->addCond('pruneCond1', $this->getAliasedColName(ContentAreaVersionTableMap::COL_VERSION), $contentAreaVersion->getVersion(), Criteria::NOT_EQUAL); $this->combine(array('pruneCond0', 'pruneCond1'), Criteria::LOGICAL_OR); } return $this; }