All pastes #946643 Raw Edit

Anonymous

public java v1 · immutable
·published 2008-03-17 20:55 UTC
rendered paste body
 public List<String> getClassLeaderBoard(int classId)    {        //if (_period != 1) return;         List<String> names = new FastList<String>();         Connection con = null;         try         {             con = L2DatabaseFactory.getInstance().getConnection();             PreparedStatement statement;             ResultSet rset;             statement = con.prepareStatement(GET_EACH_CLASS_LEADER);             statement.setInt(1, classId);             rset = statement.executeQuery();             while (rset.next())             {                 names.add(rset.getString(CHAR_NAME));             }             statement.close();             rset.close();             return names;         }         catch(SQLException e){_log.warning("Olympiad System: Couldnt heros from db");}         finally         {             try{con.close();}catch(Exception e){e.printStackTrace();}         }         return names;    }