示例#1
0
 /**
  * Filter the query by a related \RRightsForformat object
  *
  * @param \RRightsForformat|ObjectCollection $rRightsForformat the related object to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildRightsQuery The current query, for fluid interface
  */
 public function filterByRRightsForformat($rRightsForformat, $comparison = null)
 {
     if ($rRightsForformat instanceof \RRightsForformat) {
         return $this->addUsingAlias(RightsTableMap::COL_ID, $rRightsForformat->getRightid(), $comparison);
     } elseif ($rRightsForformat instanceof ObjectCollection) {
         return $this->useRRightsForformatQuery()->filterByPrimaryKeys($rRightsForformat->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByRRightsForformat() only accepts arguments of type \\RRightsForformat or Collection');
     }
 }
示例#2
0
 /**
  * Remove rights of this object
  * through the R_rights_forformat cross reference table.
  *
  * @param ChildRights $rights
  * @return ChildFormats The current object (for fluent API support)
  */
 public function removeRights(ChildRights $rights)
 {
     if ($this->getRightss()->contains($rights)) {
         $rRightsForformat = new ChildRRightsForformat();
         $rRightsForformat->setRights($rights);
         if ($rights->isFormatssLoaded()) {
             //remove the back reference if available
             $rights->getFormatss()->removeObject($this);
         }
         $rRightsForformat->setFormats($this);
         $this->removeRRightsForformat(clone $rRightsForformat);
         $rRightsForformat->clear();
         $this->collRightss->remove($this->collRightss->search($rights));
         if (null === $this->rightssScheduledForDeletion) {
             $this->rightssScheduledForDeletion = clone $this->collRightss;
             $this->rightssScheduledForDeletion->clear();
         }
         $this->rightssScheduledForDeletion->push($rights);
     }
     return $this;
 }
 /**
  * Exclude object from result
  *
  * @param   ChildRRightsForformat $rRightsForformat Object to remove from the list of results
  *
  * @return $this|ChildRRightsForformatQuery The current query, for fluid interface
  */
 public function prune($rRightsForformat = null)
 {
     if ($rRightsForformat) {
         $this->addCond('pruneCond0', $this->getAliasedColName(RRightsForformatTableMap::COL__RIGHTID), $rRightsForformat->getRightid(), Criteria::NOT_EQUAL);
         $this->addCond('pruneCond1', $this->getAliasedColName(RRightsForformatTableMap::COL__FORMATID), $rRightsForformat->getFormatid(), Criteria::NOT_EQUAL);
         $this->combine(array('pruneCond0', 'pruneCond1'), Criteria::LOGICAL_OR);
     }
     return $this;
 }