@Override
    public Manutencao listById(int id_manutencao) {
        Connection conn = null;
        PreparedStatement pstm = null;
        ResultSet rs = null;
        Manutencao m = new Manutencao();
        try{
            conn = ConnectionFactory.getConnection();
            pstm = conn.prepareStatement(LISTBYID);
            pstm.setInt(1, id_manutencao);
            rs = pstm.executeQuery();
            while (rs.next()){
                m.setId_manutencao(rs.getInt("id_manutencao"));
                m.setMotivo(rs.getString("nome_fn"));
                m.setTipo(rs.getString("telefone_fn"));
                m.setData(rs.getDate("endereco_fn"));
            }
        }catch(Exception e){
            JOptionPane.showMessageDialog(null,"Erro ao listar manutencoes " + e);
        }finally{
            try{
                ConnectionFactory.closeConnection(conn, pstm, rs);
            }catch(Exception e){
                JOptionPane.showMessageDialog(null,"Erro ao desconectar com o banco " + e);
            }
        }
        return m;
    }