예제 #1
0
 /**
  * Clears the current object, sets all attributes to their default values and removes
  * outgoing references as well as back-references (from other objects to this one. Results probably in a database
  * change of those foreign objects when you call `save` there).
  */
 public function clear()
 {
     if (null !== $this->aBible) {
         $this->aBible->removePassage($this);
     }
     if (null !== $this->aVerse) {
         $this->aVerse->removePassage($this);
     }
     $this->bible_id = null;
     $this->text = null;
     $this->verse_id = null;
     $this->id = null;
     $this->alreadyInSave = false;
     $this->clearAllReferences();
     $this->resetModified();
     $this->setNew(true);
     $this->setDeleted(false);
 }
예제 #2
0
 /**
  * Filter the query by a related \Verse object
  *
  * @param \Verse|ObjectCollection $verse 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 ChildPassageQuery The current query, for fluid interface
  */
 public function filterByVerse($verse, $comparison = null)
 {
     if ($verse instanceof \Verse) {
         return $this->addUsingAlias(PassageTableMap::COL_VERSE_ID, $verse->getId(), $comparison);
     } elseif ($verse instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(PassageTableMap::COL_VERSE_ID, $verse->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByVerse() only accepts arguments of type \\Verse or Collection');
     }
 }
예제 #3
0
 /**
  * Exclude object from result
  *
  * @param   ChildVerse $verse Object to remove from the list of results
  *
  * @return $this|ChildVerseQuery The current query, for fluid interface
  */
 public function prune($verse = null)
 {
     if ($verse) {
         $this->addUsingAlias(VerseTableMap::COL_ID, $verse->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }
예제 #4
0
파일: Tag.php 프로젝트: arneau/godsworks
 /**
  * Clears the current object, sets all attributes to their default values and removes
  * outgoing references as well as back-references (from other objects to this one. Results probably in a database
  * change of those foreign objects when you call `save` there).
  */
 public function clear()
 {
     if (null !== $this->aKeyword) {
         $this->aKeyword->removeTag($this);
     }
     if (null !== $this->aTagType) {
         $this->aTagType->removeTag($this);
     }
     if (null !== $this->aVerse) {
         $this->aVerse->removeTag($this);
     }
     $this->keyword_id = null;
     $this->type_id = null;
     $this->verse_id = null;
     $this->id = null;
     $this->alreadyInSave = false;
     $this->clearAllReferences();
     $this->resetModified();
     $this->setNew(true);
     $this->setDeleted(false);
 }
예제 #5
0
파일: Book.php 프로젝트: arneau/godsworks
 /**
  * @param ChildVerse $verse The ChildVerse object to add.
  */
 protected function doAddVerse(ChildVerse $verse)
 {
     $this->collVerses[] = $verse;
     $verse->setBook($this);
 }
예제 #6
0
 /**
  * Filter the query by a related \Verse object
  *
  * @param \Verse|ObjectCollection $verse the related object to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildBookQuery The current query, for fluid interface
  */
 public function filterByVerse($verse, $comparison = null)
 {
     if ($verse instanceof \Verse) {
         return $this->addUsingAlias(BookTableMap::COL_ID, $verse->getBookId(), $comparison);
     } elseif ($verse instanceof ObjectCollection) {
         return $this->useVerseQuery()->filterByPrimaryKeys($verse->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByVerse() only accepts arguments of type \\Verse or Collection');
     }
 }