The code I posted accidentally omitted a critical step - add a 'return result;' as the last statement in the doQuery method.
J
K
N
P
U
/