Refactor all 'getAll...'-like queries not to use ORM.
Summary: This differential refactors all getAll.... -like queries not to use ORM.
Test Plan: Execute tests implemented in https://phab.comm.dev/D10711. getAll.. queries are covered there.
Reviewers: michal, kamil
Reviewed By: kamil
Subscribers: varun, ashoat, tomek
Differential Revision: https://phab.comm.dev/D10704