/** * 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 NagiosHostgroup (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->setNotes($this->notes); $copyObj->setNotesUrl($this->notes_url); $copyObj->setActionUrl($this->action_url); 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->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->getNagiosHostgroupMemberships() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addNagiosHostgroupMembership($relObj->copy($deepCopy)); } } } // if ($deepCopy) $copyObj->setNew(true); $copyObj->setId(NULL); // this is a auto-increment column, so set to default value }
/** * 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 }
/** * 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 NagiosDependency (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->setHostTemplate($this->host_template); $copyObj->setHost($this->host); $copyObj->setServiceTemplate($this->service_template); $copyObj->setService($this->service); $copyObj->setHostgroup($this->hostgroup); $copyObj->setName($this->name); $copyObj->setExecutionFailureCriteriaUp($this->execution_failure_criteria_up); $copyObj->setExecutionFailureCriteriaDown($this->execution_failure_criteria_down); $copyObj->setExecutionFailureCriteriaUnreachable($this->execution_failure_criteria_unreachable); $copyObj->setExecutionFailureCriteriaPending($this->execution_failure_criteria_pending); $copyObj->setExecutionFailureCriteriaOk($this->execution_failure_criteria_ok); $copyObj->setExecutionFailureCriteriaWarning($this->execution_failure_criteria_warning); $copyObj->setExecutionFailureCriteriaUnknown($this->execution_failure_criteria_unknown); $copyObj->setExecutionFailureCriteriaCritical($this->execution_failure_criteria_critical); $copyObj->setNotificationFailureCriteriaOk($this->notification_failure_criteria_ok); $copyObj->setNotificationFailureCriteriaWarning($this->notification_failure_criteria_warning); $copyObj->setNotificationFailureCriteriaUnknown($this->notification_failure_criteria_unknown); $copyObj->setNotificationFailureCriteriaCritical($this->notification_failure_criteria_critical); $copyObj->setNotificationFailureCriteriaPending($this->notification_failure_criteria_pending); $copyObj->setNotificationFailureCriteriaUp($this->notification_failure_criteria_up); $copyObj->setNotificationFailureCriteriaDown($this->notification_failure_criteria_down); $copyObj->setNotificationFailureCriteriaUnreachable($this->notification_failure_criteria_unreachable); $copyObj->setInheritsParent($this->inherits_parent); $copyObj->setDependencyPeriod($this->dependency_period); 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->getNagiosDependencyTargets() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addNagiosDependencyTarget($relObj->copy($deepCopy)); } } } // if ($deepCopy) $copyObj->setNew(true); $copyObj->setId(NULL); // this is a auto-increment column, so set to default value }