Results 1 to 3 of 3

Thread: ibatis pagination

  1. #1

    Default ibatis pagination

    Can anyone provide me with an example for pagination using ibatis,

    I saw one example as below:-

    Code:
    PaginatedList list = sqlMap.queryForPaginatedList("getContacts", null, 2);
    while (true) {
        Iterator listIterator = list.iterator();
        while (listIterator.hasNext()) {
            System.out.println(
                ((Contact)listIterator.next()).getContactId());
        }
        if( list.isNextPageAvailable())
            list.nextPage();
        else
            break;
    }
    It is has mentioned that queryForPaginatedList is deprecated,what is to be used for , can anyone give any example.

  2. #2
    Join Date
    May 2007
    Location
    Istanbul
    Posts
    42

    Default

    actually, that's a good question. what method should we use instead?

    Any idea?
    Senior Consultant
    Turkiye Is Bankasi

  3. #3
    Join Date
    May 2007
    Location
    Istanbul
    Posts
    42

    Default

    one of overloaded SqlMapClientTemplate.queryForList method is capable of performing pagination...

    Code:
    public List queryForList(final String statementName, final Object parameterObject, final int skipResults, final int maxResults)
    Senior Consultant
    Turkiye Is Bankasi

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •