/** * @param OcorrenciaDTO $dto * @return bool * @throws Exception */ public function gravar(OcorrenciaDTO $dto) { if ($dto->getCdOcorrencia() == '') { if (!($obj = $this->insert($dto))) { throw new Exception('Impossível Inserir Ocorrencia'); } } else { if (!($obj = $this->update($dto))) { throw new Exception('Impossível Atualizar Ocorrencia'); } } return $obj; }
public function getPessoasEnvolvidas(OcorrenciaPessoaFisicaEnvolvidaModel $pessoas) { return $pessoas->getPessoasPorOcorrencia(new PessoaFisicaModel(), $this->dto->getCdOcorrencia()); }