public function deletar(Estado $obj) { $where = "WHERE " . self::ID . " = '" . $obj->getId() . "'"; if ($obj->getCidades()->getTotal() > 0) { throw new Exception("Há Cidades cadastradas com este Estado"); } else { $this->con->deletar(Sistema::$BDPrefixo . $this->tabela, $where); } }