Moved protected query builder methods to abstract class