public function changeDuplicateFlag(EdkMessage $item) { $this->transaction->requestTransaction(); try { if ($item->getDuplicate()) { $item->setDuplicate(false); } else { $item->setDuplicate(true); } $item->changeState($this->conn); } catch (Exception $ex) { $this->transaction->requestRollback(); throw $ex; } }