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 NagiosHost (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->setDisplayName($this->display_name);
     $copyObj->setInitialState($this->initial_state);
     $copyObj->setAddress($this->address);
     $copyObj->setCheckCommand($this->check_command);
     $copyObj->setRetryInterval($this->retry_interval);
     $copyObj->setFirstNotificationDelay($this->first_notification_delay);
     $copyObj->setMaximumCheckAttempts($this->maximum_check_attempts);
     $copyObj->setCheckInterval($this->check_interval);
     $copyObj->setPassiveChecksEnabled($this->passive_checks_enabled);
     $copyObj->setCheckPeriod($this->check_period);
     $copyObj->setObsessOverHost($this->obsess_over_host);
     $copyObj->setCheckFreshness($this->check_freshness);
     $copyObj->setFreshnessThreshold($this->freshness_threshold);
     $copyObj->setActiveChecksEnabled($this->active_checks_enabled);
     $copyObj->setChecksEnabled($this->checks_enabled);
     $copyObj->setEventHandler($this->event_handler);
     $copyObj->setEventHandlerEnabled($this->event_handler_enabled);
     $copyObj->setLowFlapThreshold($this->low_flap_threshold);
     $copyObj->setHighFlapThreshold($this->high_flap_threshold);
     $copyObj->setFlapDetectionEnabled($this->flap_detection_enabled);
     $copyObj->setProcessPerfData($this->process_perf_data);
     $copyObj->setRetainStatusInformation($this->retain_status_information);
     $copyObj->setRetainNonstatusInformation($this->retain_nonstatus_information);
     $copyObj->setNotificationInterval($this->notification_interval);
     $copyObj->setNotificationPeriod($this->notification_period);
     $copyObj->setNotificationsEnabled($this->notifications_enabled);
     $copyObj->setNotificationOnDown($this->notification_on_down);
     $copyObj->setNotificationOnUnreachable($this->notification_on_unreachable);
     $copyObj->setNotificationOnRecovery($this->notification_on_recovery);
     $copyObj->setNotificationOnFlapping($this->notification_on_flapping);
     $copyObj->setNotificationOnScheduledDowntime($this->notification_on_scheduled_downtime);
     $copyObj->setStalkingOnUp($this->stalking_on_up);
     $copyObj->setStalkingOnDown($this->stalking_on_down);
     $copyObj->setStalkingOnUnreachable($this->stalking_on_unreachable);
     $copyObj->setFailurePredictionEnabled($this->failure_prediction_enabled);
     $copyObj->setFlapDetectionOnUp($this->flap_detection_on_up);
     $copyObj->setFlapDetectionOnDown($this->flap_detection_on_down);
     $copyObj->setFlapDetectionOnUnreachable($this->flap_detection_on_unreachable);
     $copyObj->setNotes($this->notes);
     $copyObj->setNotesUrl($this->notes_url);
     $copyObj->setActionUrl($this->action_url);
     $copyObj->setIconImage($this->icon_image);
     $copyObj->setIconImageAlt($this->icon_image_alt);
     $copyObj->setVrmlImage($this->vrml_image);
     $copyObj->setStatusmapImage($this->statusmap_image);
     $copyObj->setTwoDCoords($this->two_d_coords);
     $copyObj->setThreeDCoords($this->three_d_coords);
     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->getNagiosServices() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addNagiosService($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->getNagiosDependencys() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addNagiosDependency($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getNagiosDependencyTargets() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addNagiosDependencyTarget($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getNagiosEscalations() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addNagiosEscalation($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getNagiosHostContactgroups() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addNagiosHostContactgroup($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getNagiosHostgroupMemberships() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addNagiosHostgroupMembership($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getNagiosHostCheckCommandParameters() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addNagiosHostCheckCommandParameter($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getNagiosHostParentsRelatedByChildHost() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addNagiosHostParentRelatedByChildHost($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getNagiosHostParentsRelatedByParentHost() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addNagiosHostParentRelatedByParentHost($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getNagiosHostTemplateInheritances() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addNagiosHostTemplateInheritance($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getAutodiscoveryDevices() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addAutodiscoveryDevice($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
 }