Move query page from generated code to AbstractDao