public Boolean cadastarNovo(Emprestimo emprestimo) {
        Boolean sucesso = false;
        Connection connection = conexao.getConnection();
        try {
            String valorDoComandoUm = comandos.get("cadastarNovo" + 1);
            String valorDoComandoDois = comandos.get("cadastarNovo" + 2);
            StringBuilder query = new StringBuilder(valorDoComandoUm);
            for (int i = 0; i < emprestimo.getEmprestimosEstoques().size(); i++) {
                query.append("\n").append(valorDoComandoDois);
            }
            connection.setAutoCommit(false);
            PreparedStatement preparedStatement = connection.prepareStatement(query.toString());
            query.delete(0, query.length());
            int indice = 1;

            preparedStatement.setInt(indice++, emprestimo.getCidadao().getCodigo());
            preparedStatement.setTimestamp(indice++, new java.sql.Timestamp(emprestimo.getDataHoraDevolucaoPrevista().getTimeInMillis()));
            for (EmprestimoEstoque emprestimoEstoque : emprestimo.getEmprestimosEstoques()) {
                preparedStatement.setInt(indice++, emprestimoEstoque.getEstoque().getMaterial().getCodigo());
            }

            preparedStatement.execute();
            connection.commit();
            connection.setAutoCommit(true);
            sucesso = true;
        } catch (SQLException ex) {
            try {
                connection.rollback();
            } catch (SQLException ex1) {
            }
            throw new RuntimeException(ex.getMessage());
        } catch (NullPointerException ex) {
            throw new RuntimeException(ex.getMessage());
        } catch (Exception ex) {
            throw new RuntimeException(ex.getMessage());
        } finally {
            conexao.fecharConnection();
        }
        return sucesso;
    }