public function deletar(Pais $obj) { $where = "WHERE " . self::ID . " = '" . $obj->getId() . "'"; if ($obj->getEstados()->getTotal() > 0) { throw new Exception("Há Estados cadastrados com este País"); } else { $this->con->deletar(Sistema::$BDPrefixo . $this->tabela, $where); } }