Пример #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 LeasingUnit (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());
     $copyObj->setPostId($this->getPostId());
     $copyObj->setSlug($this->getSlug());
     $copyObj->setContent($this->getContent());
     $copyObj->setAvailability($this->getAvailability());
     $copyObj->setPriceRange($this->getPriceRange());
     $copyObj->setStatus($this->getStatus());
     $copyObj->setUnitTypeId($this->getUnitTypeId());
     $copyObj->setLocationId($this->getLocationId());
     $copyObj->setLeaseTypeId($this->getLeaseTypeId());
     $copyObj->setProjectId($this->getProjectId());
     $copyObj->setBrId($this->getBrId());
     $copyObj->setDressUpId($this->getDressUpId());
     if ($deepCopy && !$this->startCopy) {
         // important: temporarily setNew(false) because this affects the behavior of
         // the getter/setter methods for fkey referrer objects.
         $copyObj->setNew(false);
         // store object hash to prevent cycle
         $this->startCopy = true;
         foreach ($this->getLeasingAppointmentss() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addLeasingAppointments($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getLeasingBookingss() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addLeasingBookings($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getLeasingPriceRanges() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addLeasingPriceRange($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getLeasingTenantss() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addLeasingTenants($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getLeasingUnitCalendars() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addLeasingUnitCalendar($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getLeasingUnitFeaturess() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addLeasingUnitFeatures($relObj->copy($deepCopy));
             }
         }
         //unflag object copy
         $this->startCopy = false;
     }
     // if ($deepCopy)
     if ($makeNew) {
         $copyObj->setNew(true);
         $copyObj->setId(NULL);
         // this is a auto-increment column, so set to default value
     }
 }
Пример #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 LeasingFeatures (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 && !$this->startCopy) {
         // important: temporarily setNew(false) because this affects the behavior of
         // the getter/setter methods for fkey referrer objects.
         $copyObj->setNew(false);
         // store object hash to prevent cycle
         $this->startCopy = true;
         foreach ($this->getLeasingUnitFeaturess() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addLeasingUnitFeatures($relObj->copy($deepCopy));
             }
         }
         //unflag object copy
         $this->startCopy = false;
     }
     // if ($deepCopy)
     if ($makeNew) {
         $copyObj->setNew(true);
         $copyObj->setId(NULL);
         // this is a auto-increment column, so set to default value
     }
 }