}
public SearchResult getRoomsWithCurrentUsers(long user_level, int start, int max, String orderby, boolean asc){
try {
if (AuthLevelmanagement.getInstance().checkAdminLevel(user_level)){
SearchResult sResult = new SearchResult();
sResult.setRecords(this.selectMaxFromRooms(""));
sResult.setObjectName(Rooms.class.getName());
List<Rooms> rooms = this.getRoomsInternatl(start, max, orderby, asc);
for (Rooms room : rooms) {
HashMap<String,RoomClient> map = ClientListManager.getInstance().getClientListByRoom(room.getRooms_id());
room.setCurrentusers(new LinkedList<RoomClient>());
for (Iterator<String> iter = map.keySet().iterator(); iter.hasNext(); ) {
room.getCurrentusers().add(map.get(iter.next()));
}
}
sResult.setResult(rooms);
return sResult;
}
} catch (Exception ex2) {
log.error("[getRooms] ", ex2);
}