public List<User> getAll() throws ServerException, SQLException {
    List<User> users = new ArrayList<User>();
    PreparedStatement stmt = null;
    ResultSet rs = null;
    try {
    	String sql = "SELECT * FROM users";
    	stmt = db.getConnection().prepareStatement(sql);
    	
    	rs = stmt.executeQuery();
    	while (rs.next()) {
    		int id = rs.getInt(1);
    		String username = rs.getString(2);
    		String password = rs.getString(3);
    		String firstName = rs.getString(4);
    		String lastName = rs.getString(5);
    		String email = rs.getString(6);
    		int indexedRecords = rs.getInt(7);
    		User user = new User(id, username, password, firstName, lastName, email, indexedRecords);
    		users.add(user);
    	}
    } catch (SQLException e) {
    	
    } finally {
    	if (rs != null) rs.close();
    	if (stmt != null) stmt.close();
    }
    return users;
  }