Created
May 4, 2013 06:32
-
-
Save sudarshan89/5516482 to your computer and use it in GitHub Desktop.
Sample client code to use the Pagination API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Autowired | |
private IPageFinder pageFinder; | |
/*** | |
pageFinder is injected | |
ILibraryFinder.FIND_ALL_BOOKS is the queryId as specified in the MyBatis SQL Mapping File | |
new RowBounds(3,3) -- RowBounds is a MyBatis specific class which sets the offset and limits for a particular page | |
***/ | |
IPage pagedResult = pageFinder.findAll(ILibraryFinder.FIND_ALL_BOOKS, new RowBounds(3,3)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment