Skip to content

Instantly share code, notes, and snippets.

@sudarshan89
Created May 4, 2013 06:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sudarshan89/5516482 to your computer and use it in GitHub Desktop.
Save sudarshan89/5516482 to your computer and use it in GitHub Desktop.
Sample client code to use the Pagination API
@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