public function save(Default_Model_Privilege $value) { global $application; $data = array(); if (!isnull($value->getActionID())) { $data['actionid'] = $value->getActionID(); } if (!isnull($value->getObject())) { $data['object'] = $value->getObject(); } if (!isnull($value->getId())) { $data['id'] = $value->getId(); } if (!isnull($value->getActor())) { $data['actor'] = $value->getActor(); } if (!isnull($value->getRevoked())) { $data['revoked'] = $this->pgBool($value->getRevoked()); } $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); } }