當前位置: 首頁>>代碼示例>>Java>>正文


Java ResultSortOrder類代碼示例

本文整理匯總了Java中org.ofbiz.product.product.ProductSearch.ResultSortOrder的典型用法代碼示例。如果您正苦於以下問題:Java ResultSortOrder類的具體用法?Java ResultSortOrder怎麽用?Java ResultSortOrder使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


ResultSortOrder類屬於org.ofbiz.product.product.ProductSearch包,在下文中一共展示了ResultSortOrder類的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: searchDo

import org.ofbiz.product.product.ProductSearch.ResultSortOrder; //導入依賴的package包/類
public static ArrayList<String> searchDo(HttpSession session, Delegator delegator, String prodCatalogId) {
    String visitId = VisitHandler.getVisitId(session);
    ProductSearchOptions productSearchOptions = getProductSearchOptions(session);
    List<ProductSearchConstraint> productSearchConstraintList = productSearchOptions.getConstraintList();
    if (UtilValidate.isEmpty(productSearchConstraintList)) {
        // no constraints, don't do a search...
        return new ArrayList<String>();
    }

    ResultSortOrder resultSortOrder = productSearchOptions.getResultSortOrder();

    // if the search options have changed since the last search, put at the beginning of the options history list
    checkSaveSearchOptionsHistory(session);

    return ProductSearch.searchProducts(productSearchConstraintList, resultSortOrder, delegator, visitId);
}
 
開發者ID:ilscipio,項目名稱:scipio-erp,代碼行數:17,代碼來源:ProductSearchSession.java

示例2: getProductSearchResults

import org.ofbiz.product.product.ProductSearch.ResultSortOrder; //導入依賴的package包/類
public static EntityListIterator getProductSearchResults(HttpServletRequest request) {
    HttpSession session = request.getSession();
    Delegator delegator = (Delegator) request.getAttribute("delegator");
    String visitId = VisitHandler.getVisitId(session);

    List<ProductSearch.ProductSearchConstraint> productSearchConstraintList = ProductSearchSession.ProductSearchOptions.getConstraintList(session);
    // if no constraints, don't do a search...
    if (UtilValidate.isNotEmpty(productSearchConstraintList)) {
        ResultSortOrder resultSortOrder = ProductSearchSession.ProductSearchOptions.getResultSortOrder(request);
        ProductSearchSession.checkSaveSearchOptionsHistory(session);
        ProductSearchContext productSearchContext = new ProductSearchContext(delegator, visitId);

        productSearchContext.addProductSearchConstraints(productSearchConstraintList);
        productSearchContext.setResultSortOrder(resultSortOrder);

        return productSearchContext.doQuery(delegator);
    } else {
        return null;
    }
}
 
開發者ID:ilscipio,項目名稱:scipio-erp,代碼行數:21,代碼來源:ProductSearchEvents.java

示例3: getResultSortOrder

import org.ofbiz.product.product.ProductSearch.ResultSortOrder; //導入依賴的package包/類
public ResultSortOrder getResultSortOrder() {
    if (this.resultSortOrder == null) {
        this.resultSortOrder = new SortKeywordRelevancy();
        this.changed = true;
    }
    return this.resultSortOrder;
}
 
開發者ID:ilscipio,項目名稱:scipio-erp,代碼行數:8,代碼來源:ProductSearchSession.java

示例4: setResultSortOrder

import org.ofbiz.product.product.ProductSearch.ResultSortOrder; //導入依賴的package包/類
public static void setResultSortOrder(ResultSortOrder resultSortOrder, HttpSession session) {
    ProductSearchOptions productSearchOptions = getProductSearchOptions(session);
    productSearchOptions.resultSortOrder = resultSortOrder;
    productSearchOptions.changed = true;
}
 
開發者ID:ilscipio,項目名稱:scipio-erp,代碼行數:6,代碼來源:ProductSearchSession.java

示例5: searchGetSortOrderString

import org.ofbiz.product.product.ProductSearch.ResultSortOrder; //導入依賴的package包/類
public static String searchGetSortOrderString(boolean detailed, HttpServletRequest request) {
    Locale locale = UtilHttp.getLocale(request);
    ResultSortOrder resultSortOrder = ProductSearchOptions.getResultSortOrder(request);
    if (resultSortOrder == null) return "";
    return resultSortOrder.prettyPrintSortOrder(detailed, locale);
}
 
開發者ID:ilscipio,項目名稱:scipio-erp,代碼行數:7,代碼來源:ProductSearchSession.java

示例6: searchSetSortOrder

import org.ofbiz.product.product.ProductSearch.ResultSortOrder; //導入依賴的package包/類
public static void searchSetSortOrder(ResultSortOrder resultSortOrder, HttpSession session) {
    ProductSearchOptions.setResultSortOrder(resultSortOrder, session);
}
 
開發者ID:ilscipio,項目名稱:scipio-erp,代碼行數:4,代碼來源:ProductSearchSession.java


注:本文中的org.ofbiz.product.product.ProductSearch.ResultSortOrder類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。