public function save(Default_Model_MailSubscription $value) { global $application; $data = array(); if (!isnull($value->getId())) { $data['id'] = $value->getId(); } if (!isnull($value->getName())) { $data['name'] = $value->getName(); } if (!isnull($value->getSubjectType())) { $data['subjecttype'] = $value->getSubjectType(); } if (!isnull($value->getEvents())) { $data['events'] = $value->getEvents(); } if (!isnull($value->getResearcherID())) { $data['researcherid'] = $value->getResearcherID(); } if (!isnull($value->getDelivery())) { $data['delivery'] = $value->getDelivery(); } if (!isnull($value->getFlt())) { $data['flt'] = $value->getFlt(); } if (!isnull($value->getUnsubscribePassword())) { $data['unsubscribe_pwd'] = $value->getUnsubscribePassword(); } if (!isnull($value->getFlthash())) { $data['flthash'] = $value->getFlthash(); } $q1 = 'id = ?'; $q2 = $value->id; if (null === ($id = $value->id)) { unset($data['id']); $value->id = $this->getDbTable()->insert($data); } else { $s = $this->getDbTable()->getAdapter()->quoteInto($q1, $q2); $this->getDbTable()->update($data, $s); } }