add pagination support, QueryResult entity