/** * Filter the query by a related \RatingValue object * * @param \RatingValue|ObjectCollection $ratingValue the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildRatingHeaderQuery The current query, for fluid interface */ public function filterByRatingValue($ratingValue, $comparison = null) { if ($ratingValue instanceof \RatingValue) { return $this->addUsingAlias(RatingHeaderTableMap::COL_ID, $ratingValue->getRatingHeaderId(), $comparison); } elseif ($ratingValue instanceof ObjectCollection) { return $this->useRatingValueQuery()->filterByPrimaryKeys($ratingValue->getPrimaryKeys())->endUse(); } else { throw new PropelException('filterByRatingValue() only accepts arguments of type \\RatingValue or Collection'); } }
/** * Exclude object from result * * @param ChildRatingValue $ratingValue Object to remove from the list of results * * @return $this|ChildRatingValueQuery The current query, for fluid interface */ public function prune($ratingValue = null) { if ($ratingValue) { $this->addCond('pruneCond0', $this->getAliasedColName(RatingValueTableMap::COL_RATING_HEADER_ID), $ratingValue->getRatingHeaderId(), Criteria::NOT_EQUAL); $this->addCond('pruneCond1', $this->getAliasedColName(RatingValueTableMap::COL_CATEGORY_OPTION_ID), $ratingValue->getCategoryOptionId(), Criteria::NOT_EQUAL); $this->combine(array('pruneCond0', 'pruneCond1'), Criteria::LOGICAL_OR); } return $this; }
/** * @param ChildRatingValue $ratingValue The ChildRatingValue object to add. */ protected function doAddRatingValue(ChildRatingValue $ratingValue) { $this->collRatingValues[] = $ratingValue; $ratingValue->setRatingHeader($this); }
/** * @param ChildRatingValue $ratingValue The ChildRatingValue object to add. */ protected function doAddRatingValue(ChildRatingValue $ratingValue) { $this->collRatingValues[] = $ratingValue; $ratingValue->setCategoryOption($this); }