extract a getQueryBuilderForAction method