/** * Exclude object from result * * @param ChildRights $rights Object to remove from the list of results * * @return $this|ChildRightsQuery The current query, for fluid interface */ public function prune($rights = null) { if ($rights) { $this->addUsingAlias(RightsTableMap::COL_ID, $rights->getId(), Criteria::NOT_EQUAL); } return $this; }
/** * Declares an association between this object and a ChildRights object. * * @param ChildRights $v * @return $this|\RRightsFortemplate The current object (for fluent API support) * @throws PropelException */ public function setRights(ChildRights $v = null) { if ($v === null) { $this->setRightid(NULL); } else { $this->setRightid($v->getId()); } $this->aRights = $v; // Add binding for other direction of this n:n relationship. // If this object has already been added to the ChildRights object, it will not be re-added. if ($v !== null) { $v->addRRightsFortemplate($this); } return $this; }
/** * Filter the query by a related \Rights object * * @param \Rights|ObjectCollection $rights The related object(s) to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @throws \Propel\Runtime\Exception\PropelException * * @return ChildRRightsForformatQuery The current query, for fluid interface */ public function filterByRights($rights, $comparison = null) { if ($rights instanceof \Rights) { return $this->addUsingAlias(RRightsForformatTableMap::COL__RIGHTID, $rights->getId(), $comparison); } elseif ($rights instanceof ObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(RRightsForformatTableMap::COL__RIGHTID, $rights->toKeyValue('PrimaryKey', 'Id'), $comparison); } else { throw new PropelException('filterByRights() only accepts arguments of type \\Rights or Collection'); } }