Performance in org.ofbiz.entity.util.EntityListIterator

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Performance in org.ofbiz.entity.util.EntityListIterator

Rodrigo Lima-2
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;*
*    }*