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 NagiosEscalation (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->setDescription($this->description);
     $copyObj->setHostTemplate($this->host_template);
     $copyObj->setHost($this->host);
     $copyObj->setHostgroup($this->hostgroup);
     $copyObj->setServiceTemplate($this->service_template);
     $copyObj->setService($this->service);
     $copyObj->setFirstNotification($this->first_notification);
     $copyObj->setLastNotification($this->last_notification);
     $copyObj->setNotificationInterval($this->notification_interval);
     $copyObj->setEscalationPeriod($this->escalation_period);
     $copyObj->setEscalationOptionsUp($this->escalation_options_up);
     $copyObj->setEscalationOptionsDown($this->escalation_options_down);
     $copyObj->setEscalationOptionsUnreachable($this->escalation_options_unreachable);
     $copyObj->setEscalationOptionsOk($this->escalation_options_ok);
     $copyObj->setEscalationOptionsWarning($this->escalation_options_warning);
     $copyObj->setEscalationOptionsUnknown($this->escalation_options_unknown);
     $copyObj->setEscalationOptionsCritical($this->escalation_options_critical);
     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->getNagiosEscalationContacts() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addNagiosEscalationContact($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getNagiosEscalationContactgroups() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addNagiosEscalationContactgroup($relObj->copy($deepCopy));
             }
         }
     }
     // if ($deepCopy)
     $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 NagiosContact (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->setAlias($this->alias);
     $copyObj->setEmail($this->email);
     $copyObj->setPager($this->pager);
     $copyObj->setHostNotificationsEnabled($this->host_notifications_enabled);
     $copyObj->setServiceNotificationsEnabled($this->service_notifications_enabled);
     $copyObj->setHostNotificationPeriod($this->host_notification_period);
     $copyObj->setServiceNotificationPeriod($this->service_notification_period);
     $copyObj->setHostNotificationOnDown($this->host_notification_on_down);
     $copyObj->setHostNotificationOnUnreachable($this->host_notification_on_unreachable);
     $copyObj->setHostNotificationOnRecovery($this->host_notification_on_recovery);
     $copyObj->setHostNotificationOnFlapping($this->host_notification_on_flapping);
     $copyObj->setHostNotificationOnScheduledDowntime($this->host_notification_on_scheduled_downtime);
     $copyObj->setServiceNotificationOnWarning($this->service_notification_on_warning);
     $copyObj->setServiceNotificationOnUnknown($this->service_notification_on_unknown);
     $copyObj->setServiceNotificationOnCritical($this->service_notification_on_critical);
     $copyObj->setServiceNotificationOnRecovery($this->service_notification_on_recovery);
     $copyObj->setServiceNotificationOnFlapping($this->service_notification_on_flapping);
     $copyObj->setCanSubmitCommands($this->can_submit_commands);
     $copyObj->setRetainStatusInformation($this->retain_status_information);
     $copyObj->setRetainNonstatusInformation($this->retain_nonstatus_information);
     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->getNagiosContactAddresss() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addNagiosContactAddress($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getNagiosContactGroupMembers() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addNagiosContactGroupMember($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getNagiosContactNotificationCommands() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addNagiosContactNotificationCommand($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getNagiosHostContactMembers() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addNagiosHostContactMember($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getNagiosServiceContactMembers() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addNagiosServiceContactMember($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getNagiosEscalationContacts() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addNagiosEscalationContact($relObj->copy($deepCopy));
             }
         }
     }
     // if ($deepCopy)
     $copyObj->setNew(true);
     $copyObj->setId(NULL);
     // this is a auto-increment column, so set to default value
 }