Add support for rooms in building query.

AFDP-44

Added the following:
- Query definition.
- Repository function using the query.
- Command using the repository function.
- Necessary unit and integration tests.