try(Connection connection = H4J.getStorage().getConnection()) {
try(PreparedStatement statement = connection.prepareStatement("SELECT id, username, look, credits FROM server_users ORDER BY credits DESC LIMIT 10")) {
try(ResultSet set = statement.executeQuery()) {
while(set.next()) {
HotelViewUser u = new HotelViewUser();
u.setId(set.getInt("id"));
u.setUsername(set.getString("username"));
u.setLook(set.getString("look"));
u.setValue(set.getInt("credits"));
users.add(u);
}
}
}