@Override
    public Collection<Competicao> values() {
        try {
            Collection<Competicao> col = new HashSet<Competicao>();
            Statement stm = conn.createStatement();
            ResultSet rs = stm.executeQuery("SELECT * FROM Competicao,Torneio where  torneio.cod_torneio=competicao.cod_competicao");

            for (; rs.next();) {
                if (rs.getString(7).equals("0")) {
                    col.add(new Eliminatorias(rs.getString(1), rs.getString(2), rs.getString(3), rs.getString(4)));
                }else if(rs.getString(7).equals("1")){
                    col.add(new EliminatoriaDupla(rs.getString(1), rs.getString(2), rs.getString(3), rs.getString(4)));
                }
            }
            rs = stm.executeQuery("SELECT * FROM Competicao,Campeonato where  Campeonato.cod_campeonato=competicao.cod_competicao");
            for (; rs.next();) {

                col.add(new Campeonato(rs.getString(1), rs.getString(2), rs.getString(3), rs.getString(4)));
            }
            rs.close();
            return col;
        } catch (SQLException | NumberFormatException e) {
            JOptionPane.showMessageDialog(null, e.getMessage(), "ERROR", JOptionPane.ERROR_MESSAGE);
            return null;
        }

    }