public function save(Default_Model_VOWideImageListImage $value) { global $application; $data = array(); if (!isnull($value->getId())) { $data['id'] = $value->getId(); } if (!isnull($value->getVowideImageListID())) { $data['vowide_image_list_id'] = $value->getVowideImageListID(); } if (!isnull($value->getVappListID())) { $data['vapplistid'] = $value->getVappListID(); } if (!isnull($value->getGuid())) { $data['guid'] = $value->getGuid(); } if (!isnull($value->getState())) { $data['state'] = $value->getState(); } $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); } }