public static List<Participant> getParticipants(int gameid) throws SQLException {
        String sql = null;
        Connection connection = null;
        PreparedStatement query = null;
        ResultSet results = null;
        try {
            sql = "SELECT gameid, participant.playerid, playername, points, notes from participant, player where gameid = ? and participant.playerid = player.playerid order by points, playername";
            connection = Database.getConnection();
            query = connection.prepareStatement(sql);
            query.setInt(1, gameid);
            results = query.executeQuery();

            Player player = null;
            List<Participant> participants = new ArrayList<Participant>();
            while (results.next()) {
                try {
                    player = Player.getPlayer(Integer.parseInt(results.getString("playerid")));
                    Participant participant = new Participant();
                    participant.setGameid(Integer.parseInt(results.getString("gameid")));
                    participant.setPlayerid(Integer.parseInt(results.getString("playerid")));
                    if (results.getString("points") != null) {
                        participant.setPoints(Integer.parseInt(results.getString("points")));
                    }
                    participant.setNotes(results.getString("notes"));
                    participant.setName(player.getName());
                   // participant.setMeta(player.getMeta());

                    participants.add(participant);
                } catch (SQLException ex) {
                    Logger.getLogger(User.class.getName()).log(Level.SEVERE, null, ex);
                }
            }
            return participants;
        } finally {
            try {
                results.close();
            } catch (Exception e) {
            }
            try {
                query.close();
            } catch (Exception e) {
            }
            try {
                connection.close();
            } catch (Exception e) {
            }
        }
    }