I found the answer here https://community.oracle.com/thread/3516102 I have to override the executeQueryForCollection(), and, before super call, I can print out the result of getQuery() method.
The detailed solution is explained here: Get SQL Query and Parameters from af:search