Added some db accessor methods.

Added getRoom, getRes, getDirtyRooms, get all res for a room