inst_addr_sel); } public function setInstAddrSel($inst_addr_sel) { parent::setInstAddrSel($inst_addr_sel->getValue()); } public function getInstAddr() { return new InstAddr($this->inst_addr_sel, $this->inst_addr_val); } public function setInstAddr(InstAddr $inst_addr) { parent::setInstAddrSel($inst_addr->getSelector()->getValue()); parent::setInstAddrVal($inst_addr->getValue()); } public function getCurProbList() { $cac_lst = $this->getCacs(); $cur_prob_list = array (); foreach ($cac_lst as $cac) { $cur_prob = $cac->getAlarmEventDescriptor()->getEvtSpec() . ';' . $cac->getEvtTime() . ';' . $cac->getRecDate() . ';' . $cac->getAlmStat() . ';' . $cac->getServInfl(); $cur_prob_list[] = $cur_prob; } return $cur_prob_list; } public function setCurProbList($value) { throw new Exception("access denied: setCurProbList($value)"); } public function getByName($name, $type = BasePeer::TYPE_PHPNAME) { switch ($name) { case 'cur_prob_list': return $this->getCurProbList(); case 'inst_addr': return $this->getInstAddr(); default: } return parent::getByName($name, $type); } public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME) { switch ($name) { case 'inst_addr': return $this->setInstAddr($value); break; default: } return parent::setByName($name, $value, $type); } /** * Overrides parent method to maintain modification counting */ public function save(PropelPDO $con = null) { if ($this->isNew() || $this->mod >= 999999) { $this->setMod(0); } else { $this->setMod($this->mod + 1); } return parent::save($con); } /** * Overrides and extents parent method to delete pending cacs (delete obstruction) */ public function delete(PropelPDO $con = null) { $cac_lst = $this->getCacs(); foreach ($cac_lst as $cac) { //$cac->delete(); $am = new AlarmManagement(); $am->processAlarm( $this->getInstAddr(), date('y.m.d h:i:s'), $cac->getAlarmEventDescriptor()->getEvtSpec(), new ServInfl(ServInfl::SI_INDEP), new AlarmSevty(AlarmSevty::AS_CLEAR)); } return parent::delete($con); } } // AlarmingManagedObject