Package org.ofbiz.entity.util

Examples of org.ofbiz.entity.util.EntityListIterator.last()


            try {
                // do the lookup
                eli = delegator.findListIteratorByCondition(dve, cond, null, fieldsToSelect, orderBy, findOpts);

                // attempt to get the full size
                eli.last();
                orderCount = eli.currentIndex();

                // get the partial list for this page
                eli.beforeFirst();
                if (orderCount > viewSize.intValue()) {
View Full Code Here


                    for (int i = 0; i < addOnTopProductCategoryMembers.size(); i++) {
                        GenericValue alwaysAddProductCategoryMember = (GenericValue)addOnTopProductCategoryMembers.get(i);
                        productIds.add(alwaysAddProductCategoryMember.getString("productId"));
                    }
                    // attempt to get the full size
                    pli.last();
                    addOnTopTotalListSize = pli.currentIndex();
                    listSize = listSize + addOnTopTotalListSize;
                } catch (GenericEntityException e) {
                    Debug.logError(e, module);
                } finally {
View Full Code Here

                            }
                        } else {
                            productCategoryMembers = pli.getPartialList(lowIndex, viewSize);

                            // attempt to get the full size
                            pli.last();
                            listSize = pli.currentIndex();
                        }
                    } else {
                        productCategoryMembers = pli.getCompleteList();
                        if (viewProductCategoryId != null && productCategoryMembers.size() > 0) {
View Full Code Here

        List list = null;
        Integer listSize = null;
        try{
            EntityListIterator it = (EntityListIterator) result.get("listIt");
            list = it.getPartialList(start+1, viewSize.intValue()); // list starts at '1'
            it.last();
            listSize = new Integer(it.currentIndex());
            it.close();
        } catch (Exception e) {
            Debug.logInfo("Problem getting partial list" + e,module);
        }
View Full Code Here

                    // get the partial list for this page
                    partyList = pli.getPartialList(lowIndex, viewSize);

                    // attempt to get the full size
                    pli.last();
                    partyListSize = pli.currentIndex();
                    if (highIndex > partyListSize) {
                        highIndex = partyListSize;
                    }
                   
View Full Code Here

        if (listSize > 0) {
            setOverridenListSize(true);
        } else if (entryList instanceof EntityListIterator) {
            EntityListIterator iter = (EntityListIterator) entryList;  
            try {
                iter.last();
                listSize = iter.currentIndex();
                iter.beforeFirst();
            } catch (GenericEntityException e) {
                Debug.logError(e, "Error getting list size", module);
                listSize = 0;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.