PIM-2368 : move prepareDBALQuery in utility