add hbm mapping for Query;
add Query dao impl & unit-test cases.