1. Add paging function.
2. Refactor java code.