You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Rodrigo Souza <ac...@gmail.com> on 2007/06/27 02:49:06 UTC

Performance in org.ofbiz.entity.util.EntityListIterator

Hi community!

This is a my implementation to best performance in pagination using
org.ofbiz.entity.util.EntityListIterator class.

Add this method to get size of resultset without create GenericValue.

* public int getSize()throws GenericEntityException {*
*        int result = 0;*
*        try{*
*               if( resultSet.last() )*
*                   result = resultSet.getRow();*

*        }  catch (SQLException e) {*
*              Debug.logWarning("Warning: No calculate EntityListIterator
size because of exception: " + e.toString(), module);*
*        }*

*        return result;*
*    }*