evt_spec_sel); } public function setEvtSpecSel($evt_spec_sel) { parent::setEvtSpecSel($evt_spec_sel->getValue()); } public function getEvtSpec() { return new EventSpec($this->evt_spec_sel, $this->evt_spec_val); } public function setEvtSpec(EventSpec $evt_spec) { parent::setEvtSpecSel($evt_spec->getSelector()->getValue()); parent::setEvtSpecVal($evt_spec->getValue()); } public function setMinInt($min_int) { // parameter can be GATime or int if ($min_int instanceof GATime) parent::setMinInt($min_int->getValue()); else parent::setMinInt($min_int); } public function getInstAddrSel() { return new InstAddrSel($this->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 setInactive($v) { if ($v) { // reset alarms, when set inactive $almif = new AlarmManagement(); $almif->processAlarm( $this->getInstAddr(), time(), $this->getEvtSpec(), null, new AlarmSevty(AlarmSevty::AS_CLEAR)); $this->setHasAlarm(false); } parent::setInactive($v); } /** * Retrieves a field from the object by name passed in as a string. - override method * * @param string $name name * @param string $type The type of fieldname the $name is of: * one of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. * Defaults to BasePeer::TYPE_PHPNAME * @return mixed Value of field. */ public function getByName($name, $type = BasePeer::TYPE_PHPNAME) { switch ($name) { case 'evt_spec': return $this->getEvtSpec(); break; case 'inst_addr': return $this->getInstAddr(); break; default: } return parent::getByName($name, $type); } public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME) { switch ($name) { case 'evt_spec': return $this->setEvtSpec($value); break; 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); } } // RemoteWatchdog