Example #1
0
 /**
  * Sets contents of passed object to values from current object.
  *
  * If desired, this method can also make copies of all associated (fkey referrers)
  * objects.
  *
  * @param      object $copyObj An object of Genre (or compatible) type.
  * @param      boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
  * @param      boolean $makeNew Whether to reset autoincrement PKs and make the object new.
  * @throws     PropelException
  */
 public function copyInto($copyObj, $deepCopy = false, $makeNew = true)
 {
     $copyObj->setName($this->getName());
     if ($deepCopy) {
         // important: temporarily setNew(false) because this affects the behavior of
         // the getter/setter methods for fkey referrer objects.
         $copyObj->setNew(false);
         foreach ($this->getMoviesgenress() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addMoviesgenres($relObj->copy($deepCopy));
             }
         }
     }
     if ($makeNew) {
         $copyObj->setNew(true);
         $copyObj->setId(NULL);
         // this is a auto-increment column, so set to default value
     }
 }
Example #2
0
 /**
  * Sets contents of passed object to values from current object.
  *
  * If desired, this method can also make copies of all associated (fkey referrers)
  * objects.
  *
  * @param      object $copyObj An object of Movie (or compatible) type.
  * @param      boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
  * @param      boolean $makeNew Whether to reset autoincrement PKs and make the object new.
  * @throws     PropelException
  */
 public function copyInto($copyObj, $deepCopy = false, $makeNew = true)
 {
     $copyObj->setParentId($this->getParentId());
     $copyObj->setOriginalTitle($this->getOriginalTitle());
     $copyObj->setOriginalSubtitle($this->getOriginalSubtitle());
     $copyObj->setTitle($this->getTitle());
     $copyObj->setSubtitle($this->getSubtitle());
     $copyObj->setStartDate($this->getStartDate());
     $copyObj->setFsk($this->getFsk());
     $copyObj->setDirectors($this->getDirectors());
     $copyObj->setActors($this->getActors());
     $copyObj->setCamera($this->getCamera());
     $copyObj->setBook($this->getBook());
     $copyObj->setRental($this->getRental());
     $copyObj->setProducers($this->getProducers());
     $copyObj->setLengthInMinutes($this->getLengthInMinutes());
     $copyObj->setCreateDate($this->getCreateDate());
     $copyObj->setPicture($this->getPicture());
     $copyObj->setDescription($this->getDescription());
     $copyObj->setLanguages($this->getLanguages());
     $copyObj->setCountries($this->getCountries());
     $copyObj->setUrl($this->getUrl());
     $copyObj->setTrailer($this->getTrailer());
     $copyObj->setLastEditTime($this->getLastEditTime());
     if ($deepCopy) {
         // important: temporarily setNew(false) because this affects the behavior of
         // the getter/setter methods for fkey referrer objects.
         $copyObj->setNew(false);
         foreach ($this->getMoviesgenress() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addMoviesgenres($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getMoviespersonss() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addMoviespersons($relObj->copy($deepCopy));
             }
         }
     }
     if ($makeNew) {
         $copyObj->setNew(true);
         $copyObj->setId(NULL);
         // this is a auto-increment column, so set to default value
     }
 }