Class ProductSearch.ProductSearchContext

java.lang.Object
org.apache.ofbiz.product.product.ProductSearch.ProductSearchContext
Enclosing class:
ProductSearch

public static class ProductSearch.ProductSearchContext extends Object
The type Product search context.
  • Constructor Details

    • ProductSearchContext

      public ProductSearchContext(Delegator delegator, String visitId)
  • Method Details

    • getEntityConditionList

      public List<EntityCondition> getEntityConditionList()
      Gets entity condition list.
      Returns:
      the entity condition list
    • getDynamicViewEntity

      public DynamicViewEntity getDynamicViewEntity()
      Gets dynamic view entity.
      Returns:
      the dynamic view entity
    • getOrderByList

      public List<String> getOrderByList()
      Gets order by list.
      Returns:
      the order by list
    • getNowTimestamp

      public Timestamp getNowTimestamp()
      Gets now timestamp.
      Returns:
      the now timestamp
    • setKeywordTypeIds

      public void setKeywordTypeIds(List<String> keywordTypeIds)
      Sets keyword type ids.
      Parameters:
      keywordTypeIds - the keyword type ids
    • setStatusId

      public void setStatusId(String statusId)
      Sets status id.
      Parameters:
      statusId - the status id
    • getDelegator

      public Delegator getDelegator()
      Gets delegator.
      Returns:
      the delegator
    • addProductSearchConstraints

      public void addProductSearchConstraints(List<ProductSearch.ProductSearchConstraint> productSearchConstraintList)
      Add product search constraints.
      Parameters:
      productSearchConstraintList - the product search constraint list
    • setResultSortOrder

      public void setResultSortOrder(ProductSearch.ResultSortOrder resultSortOrder)
      Sets result sort order.
      Parameters:
      resultSortOrder - the result sort order
    • setResultOffset

      public void setResultOffset(Integer resultOffset)
      Sets result offset.
      Parameters:
      resultOffset - the result offset
    • setMaxResults

      public void setMaxResults(Integer maxResults)
      Sets max results.
      Parameters:
      maxResults - the max results
    • getTotalResults

      public Integer getTotalResults()
      Gets total results.
      Returns:
      the total results
    • doSearch

      public ArrayList<String> doSearch()
      Do search array list.
      Returns:
      the array list
    • finishKeywordConstraints

      public void finishKeywordConstraints()
      Finish keyword constraints.
    • finishCategoryAndFeatureConstraints

      public void finishCategoryAndFeatureConstraints()
      Finish category and feature constraints.
    • doQuery

      public EntityListIterator doQuery(Delegator delegator)
      Parameters:
      delegator - the delegator
      Returns:
      EntityListIterator representing the result of the query: NOTE THAT THIS MUST BE CLOSED WHEN YOU ARE DONE WITH IT (preferably in a finally block), AND DON'T LEAVE IT OPEN TOO LONG BECAUSE IT WILL MAINTAIN A DATABASE CONNECTION.
    • makeProductIdList

      public ArrayList<String> makeProductIdList(EntityListIterator eli)
      Make product id list array list.
      Parameters:
      eli - the eli
      Returns:
      the array list
    • saveSearchResultInfo

      public void saveSearchResultInfo(Long numResults, Double secondsTotal)
      Save search result info.
      Parameters:
      numResults - the num results
      secondsTotal - the seconds total