public function save(Default_Model_Researcher $value) { global $application; $data = array(); if (!isnull($value->getId())) { $data['id'] = $value->getId(); } if (!isnull($value->getFirstName())) { $data['firstname'] = $value->getFirstName(); } if (!isnull($value->getLastName())) { $data['lastname'] = $value->getLastName(); } if (!isnull($value->getDateInclusion())) { $data['dateinclusion'] = $value->getDateInclusion(); } if (!isnull($value->getInstitution())) { $data['institution'] = $value->getInstitution(); } if (!isnull($value->getCountryID())) { $data['countryid'] = $value->getCountryID(); } if (!isnull($value->getPositionTypeID())) { $data['positiontypeid'] = $value->getPositionTypeID(); } if (!isnull($value->getGuid())) { $data['guid'] = $value->getGuid(); } if (!isnull($value->getGender())) { $data['gender'] = $value->getGender(); } if (!isnull($value->getLastUpdated())) { $data['lastupdated'] = $value->getLastUpdated(); } if (!isnull($value->getName())) { $data['name'] = $value->getName(); } if (!isnull($value->getMailUnsubscribePwd())) { $data['mail_unsubscribe_pwd'] = $value->getMailUnsubscribePwd(); } if (!isnull($value->getLastLogin())) { $data['lastlogin'] = $value->getLastLogin(); } if (!isnull($value->getNoDissemination())) { $data['nodissemination'] = $this->pgBool($value->getNoDissemination()); } if (!isnull($value->getAccountType())) { $data['accounttype'] = $value->getAccountType(); } if (!isnull($value->getDeleted())) { $data['deleted'] = $this->pgBool($value->getDeleted()); } if (!isnull($value->getHitcount())) { $data['hitcount'] = $value->getHitcount(); } if (!isnull($value->getCname())) { $data['cname'] = $value->getCname(); } if (!isnull($value->getAddedByID())) { $data['addedby'] = $value->getAddedByID(); } $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); } }