Ejemplo n.º 1
0
 /**
  * Filter the query by a related \RTemplatenamesInchapter object
  *
  * @param \RTemplatenamesInchapter|ObjectCollection $rTemplatenamesInchapter the related object to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildFormatsQuery The current query, for fluid interface
  */
 public function filterByRTemplatenamesInchapter($rTemplatenamesInchapter, $comparison = null)
 {
     if ($rTemplatenamesInchapter instanceof \RTemplatenamesInchapter) {
         return $this->addUsingAlias(FormatsTableMap::COL_ID, $rTemplatenamesInchapter->getChapterid(), $comparison);
     } elseif ($rTemplatenamesInchapter instanceof ObjectCollection) {
         return $this->useRTemplatenamesInchapterQuery()->filterByPrimaryKeys($rTemplatenamesInchapter->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByRTemplatenamesInchapter() only accepts arguments of type \\RTemplatenamesInchapter or Collection');
     }
 }
Ejemplo n.º 2
0
 /**
  * Remove formats of this object
  * through the R_templatenames_inchapter cross reference table.
  *
  * @param ChildFormats $formats
  * @return ChildTemplatenames The current object (for fluent API support)
  */
 public function removeFormats(ChildFormats $formats)
 {
     if ($this->getFormatss()->contains($formats)) {
         $rTemplatenamesInchapter = new ChildRTemplatenamesInchapter();
         $rTemplatenamesInchapter->setFormats($formats);
         if ($formats->isTemplatenamessLoaded()) {
             //remove the back reference if available
             $formats->getTemplatenamess()->removeObject($this);
         }
         $rTemplatenamesInchapter->setTemplatenames($this);
         $this->removeRTemplatenamesInchapter(clone $rTemplatenamesInchapter);
         $rTemplatenamesInchapter->clear();
         $this->collFormatss->remove($this->collFormatss->search($formats));
         if (null === $this->formatssScheduledForDeletion) {
             $this->formatssScheduledForDeletion = clone $this->collFormatss;
             $this->formatssScheduledForDeletion->clear();
         }
         $this->formatssScheduledForDeletion->push($formats);
     }
     return $this;
 }
 /**
  * Exclude object from result
  *
  * @param   ChildRTemplatenamesInchapter $rTemplatenamesInchapter Object to remove from the list of results
  *
  * @return $this|ChildRTemplatenamesInchapterQuery The current query, for fluid interface
  */
 public function prune($rTemplatenamesInchapter = null)
 {
     if ($rTemplatenamesInchapter) {
         $this->addCond('pruneCond0', $this->getAliasedColName(RTemplatenamesInchapterTableMap::COL__TEMPLATEID), $rTemplatenamesInchapter->getTemplateid(), Criteria::NOT_EQUAL);
         $this->addCond('pruneCond1', $this->getAliasedColName(RTemplatenamesInchapterTableMap::COL__CHAPTERID), $rTemplatenamesInchapter->getChapterid(), Criteria::NOT_EQUAL);
         $this->combine(array('pruneCond0', 'pruneCond1'), Criteria::LOGICAL_OR);
     }
     return $this;
 }