Examples of ResultSortOrder


Examples of org.ofbiz.product.product.ProductSearch.ResultSortOrder

            }
            int maxResultsInt = viewSize - addOnTopListSize;
            Integer resultOffset = new Integer(resultOffsetInt);
            Integer maxResults = new Integer(maxResultsInt);

            ResultSortOrder resultSortOrder = ProductSearchOptions.getResultSortOrder(request);

            ProductSearchContext productSearchContext = new ProductSearchContext(delegator, visitId);
            productSearchContext.addProductSearchConstraints(productSearchConstraintList);
            productSearchContext.setResultSortOrder(resultSortOrder);
            productSearchContext.setResultOffset(resultOffset);
View Full Code Here

Examples of org.ofbiz.product.product.ProductSearch.ResultSortOrder

        if (topProductCategoryId != null) {
            searchParamString.append("&S_TPC");
            searchParamString.append("=");
            searchParamString.append(topProductCategoryId);
        }
        ResultSortOrder resultSortOrder = productSearchOptions.getResultSortOrder();
        if (resultSortOrder != null) {
            if (resultSortOrder instanceof ProductSearch.SortKeywordRelevancy) {
                //ProductSearch.SortKeywordRelevancy skr = (ProductSearch.SortKeywordRelevancy) resultSortOrder;
                searchParamString.append("&S_O=SKR");
            } else if (resultSortOrder instanceof ProductSearch.SortProductField) {
                ProductSearch.SortProductField spf = (ProductSearch.SortProductField) resultSortOrder;
                searchParamString.append("&S_O=SPF:");
                searchParamString.append(spf.fieldName);
            } else if (resultSortOrder instanceof ProductSearch.SortProductPrice) {
                ProductSearch.SortProductPrice spp = (ProductSearch.SortProductPrice) resultSortOrder;
                searchParamString.append("&S_O=SPP:");
                searchParamString.append(spp.productPriceTypeId);
            }
            searchParamString.append("&S_A=");
            searchParamString.append(resultSortOrder.isAscending() ? "Y" : "N");
        }

        return searchParamString.toString();
    }
View Full Code Here

Examples of org.ofbiz.workeffort.workeffort.WorkEffortSearch.ResultSortOrder

        WorkEffortSearchOptions workEffortSearchOptions = getWorkEffortSearchOptions(session);
        return workEffortSearchOptions.searchGetConstraintStrings(detailed, delegator, locale);
    }
    public static String searchGetSortOrderString(boolean detailed, HttpServletRequest request) {
        Locale locale = UtilHttp.getLocale(request);
        ResultSortOrder resultSortOrder = WorkEffortSearchOptions.getResultSortOrder(request);
        if (resultSortOrder == null) return "";
        return resultSortOrder.prettyPrintSortOrder(detailed, locale);
    }
View Full Code Here

Examples of org.ofbiz.workeffort.workeffort.WorkEffortSearch.ResultSortOrder

        WorkEffortSearchOptions workEffortSearchOptions = getWorkEffortSearchOptions(session);
        return workEffortSearchOptions.searchGetConstraintStrings(detailed, delegator, locale);
    }
    public static String searchGetSortOrderString(boolean detailed, HttpServletRequest request) {
        Locale locale = UtilHttp.getLocale(request);
        ResultSortOrder resultSortOrder = WorkEffortSearchOptions.getResultSortOrder(request);
        if (resultSortOrder == null) return "";
        return resultSortOrder.prettyPrintSortOrder(detailed, locale);
    }
View Full Code Here

Examples of org.ofbiz.workeffort.workeffort.WorkEffortSearch.ResultSortOrder

        WorkEffortSearchOptions workEffortSearchOptions = getWorkEffortSearchOptions(session);
        return workEffortSearchOptions.searchGetConstraintStrings(detailed, delegator, locale);
    }
    public static String searchGetSortOrderString(boolean detailed, HttpServletRequest request) {
        Locale locale = UtilHttp.getLocale(request);
        ResultSortOrder resultSortOrder = WorkEffortSearchOptions.getResultSortOrder(request);
        if (resultSortOrder == null) return "";
        return resultSortOrder.prettyPrintSortOrder(detailed, locale);
    }
View Full Code Here

Examples of org.ofbiz.workeffort.workeffort.WorkEffortSearch.ResultSortOrder

        // if no constraints, don't do a search...
        if (UtilValidate.isNotEmpty(workEffortSearchConstraintList)) {
            // if the search options have changed since the last search, put at the beginning of the options history list
            WorkEffortSearchSession.checkSaveSearchOptionsHistory(session);

            ResultSortOrder resultSortOrder = WorkEffortSearchOptions.getResultSortOrder(request);

            WorkEffortSearchContext workEffortSearchContext = new WorkEffortSearchContext(delegator, visitId);
            workEffortSearchContext.addWorkEffortSearchConstraints(workEffortSearchConstraintList);

            workEffortSearchContext.setResultSortOrder(resultSortOrder);
View Full Code Here

Examples of org.ofbiz.workeffort.workeffort.WorkEffortSearch.ResultSortOrder

        WorkEffortSearchOptions workEffortSearchOptions = getWorkEffortSearchOptions(session);
        return workEffortSearchOptions.searchGetConstraintStrings(detailed, delegator, locale);
    }
    public static String searchGetSortOrderString(boolean detailed, HttpServletRequest request) {
        Locale locale = UtilHttp.getLocale(request);
        ResultSortOrder resultSortOrder = WorkEffortSearchOptions.getResultSortOrder(request);
        if (resultSortOrder == null) return "";
        return resultSortOrder.prettyPrintSortOrder(detailed, locale);
    }
View Full Code Here

Examples of org.ofbiz.workeffort.workeffort.WorkEffortSearch.ResultSortOrder

        // if no constraints, don't do a search...
        if (UtilValidate.isNotEmpty(workEffortSearchConstraintList)) {
            // if the search options have changed since the last search, put at the beginning of the options history list
            WorkEffortSearchSession.checkSaveSearchOptionsHistory(session);

            ResultSortOrder resultSortOrder = WorkEffortSearchOptions.getResultSortOrder(request);

            WorkEffortSearchContext workEffortSearchContext = new WorkEffortSearchContext(delegator, visitId);
            workEffortSearchContext.addWorkEffortSearchConstraints(workEffortSearchConstraintList);

            workEffortSearchContext.setResultSortOrder(resultSortOrder);
View Full Code Here

Examples of org.ofbiz.workeffort.workeffort.WorkEffortSearch.ResultSortOrder

        WorkEffortSearchOptions workEffortSearchOptions = getWorkEffortSearchOptions(session);
        return workEffortSearchOptions.searchGetConstraintStrings(detailed, delegator, locale);
    }
    public static String searchGetSortOrderString(boolean detailed, HttpServletRequest request) {
        Locale locale = UtilHttp.getLocale(request);
        ResultSortOrder resultSortOrder = WorkEffortSearchOptions.getResultSortOrder(request);
        if (resultSortOrder == null) return "";
        return resultSortOrder.prettyPrintSortOrder(detailed, locale);
    }
View Full Code Here

Examples of org.ofbiz.workeffort.workeffort.WorkEffortSearch.ResultSortOrder

        // if no constraints, don't do a search...
        if (workEffortSearchConstraintList != null && workEffortSearchConstraintList.size() > 0) {
            // if the search options have changed since the last search, put at the beginning of the options history list
            WorkEffortSearchSession.checkSaveSearchOptionsHistory(session);

            ResultSortOrder resultSortOrder = WorkEffortSearchOptions.getResultSortOrder(request);

            WorkEffortSearchContext workEffortSearchContext = new WorkEffortSearchContext(delegator, visitId);
            workEffortSearchContext.addWorkEffortSearchConstraints(workEffortSearchConstraintList);
           
            workEffortSearchContext.setResultSortOrder(resultSortOrder);
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.