public function save(Default_Model_DatasetLocation $value)
 {
     global $application;
     $data = array();
     if (!isnull($value->getId())) {
         $data['id'] = $value->getId();
     }
     if (!isnull($value->getAddedByID())) {
         $data['addedby'] = $value->getAddedByID();
     }
     if (!isnull($value->getAddedon())) {
         $data['addedon'] = $value->getAddedon();
     }
     if (!isnull($value->getUri())) {
         $data['uri'] = $value->getUri();
     }
     if (!isnull($value->getIsMaster())) {
         $data['is_master'] = $this->pgBool($value->getIsMaster());
     }
     if (!isnull($value->getExchangeFormatID())) {
         $data['exchange_fmt'] = $value->getExchangeFormatID();
     }
     if (!isnull($value->getConnectionTypeID())) {
         $data['connection_type'] = $value->getConnectionTypeID();
     }
     if (!isnull($value->getIsPublic())) {
         $data['is_public'] = $this->pgBool($value->getIsPublic());
     }
     if (!isnull($value->getOrganizationID())) {
         $data['organizationid'] = $value->getOrganizationID();
     }
     if (!isnull($value->getSiteID())) {
         $data['siteid'] = $value->getSiteID();
     }
     if (!isnull($value->getNotes())) {
         $data['notes'] = $value->getNotes();
     }
     if (!isnull($value->getDatasetVersionId())) {
         $data['dataset_version_id'] = $value->getDatasetVersionId();
     }
     $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);
     }
 }