Esempio n. 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 Energyaction (or compatible) type.
  * @param      boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
  * @throws     PropelException
  */
 public function copyInto($copyObj, $deepCopy = false)
 {
     $copyObj->setName($this->name);
     $copyObj->setDelayup($this->delayup);
     $copyObj->setDelaydown($this->delaydown);
     $copyObj->setIdentifier($this->identifier);
     $copyObj->setProcessidup($this->processidup);
     $copyObj->setProcessiddown($this->processiddown);
     $copyObj->setStart($this->start);
     $copyObj->setStop($this->stop);
     $copyObj->setStatus($this->status);
     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->getRoomHasEnergyactions() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addRoomHasEnergyaction($relObj->copy($deepCopy));
             }
         }
     }
     // if ($deepCopy)
     $copyObj->setNew(true);
     $copyObj->setId(NULL);
     // this is a auto-increment column, so set to default value
 }
Esempio n. 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 Room (or compatible) type.
  * @param      boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
  * @throws     PropelException
  */
 public function copyInto($copyObj, $deepCopy = false)
 {
     $copyObj->setName($this->name);
     $copyObj->setCapacity($this->capacity);
     $copyObj->setAddress($this->address);
     $copyObj->setDescription($this->description);
     $copyObj->setIsActive($this->is_active);
     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->getCloseperiods() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addCloseperiod($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getDayperiods() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addDayperiod($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getRoomprofiles() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addRoomprofile($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getRoomHasActivitys() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addRoomHasActivity($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getRoomHasEnergyactions() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addRoomHasEnergyaction($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getRoomHasFeaturevalues() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addRoomHasFeaturevalue($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getZoneHasRooms() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addZoneHasRoom($relObj->copy($deepCopy));
             }
         }
     }
     // if ($deepCopy)
     $copyObj->setNew(true);
     $copyObj->setId(NULL);
     // this is a auto-increment column, so set to default value
 }