Refactor methods for setting properties on query objects.

Change-Id: I0ea336580452ac86cd363e83b83fb881216bccec