Package org.apache.ofbiz.product.product
Class ProductSearch.ProductSearchContext
java.lang.Object
org.apache.ofbiz.product.product.ProductSearch.ProductSearchContext
- Enclosing class:
- ProductSearch
The type Product search context.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addProductSearchConstraints
(List<ProductSearch.ProductSearchConstraint> productSearchConstraintList) Add product search constraints.doSearch()
Do search array list.void
Finish category and feature constraints.void
Finish keyword constraints.Gets delegator.Gets dynamic view entity.Gets entity condition list.Gets now timestamp.Gets order by list.Gets total results.Make product id list array list.void
saveSearchResultInfo
(Long numResults, Double secondsTotal) Save search result info.void
setKeywordTypeIds
(List<String> keywordTypeIds) Sets keyword type ids.void
setMaxResults
(Integer maxResults) Sets max results.void
setResultOffset
(Integer resultOffset) Sets result offset.void
setResultSortOrder
(ProductSearch.ResultSortOrder resultSortOrder) Sets result sort order.void
setStatusId
(String statusId) Sets status id.
-
Constructor Details
-
ProductSearchContext
-
-
Method Details
-
getEntityConditionList
Gets entity condition list.- Returns:
- the entity condition list
-
getDynamicViewEntity
Gets dynamic view entity.- Returns:
- the dynamic view entity
-
getOrderByList
Gets order by list.- Returns:
- the order by list
-
getNowTimestamp
Gets now timestamp.- Returns:
- the now timestamp
-
setKeywordTypeIds
Sets keyword type ids.- Parameters:
keywordTypeIds
- the keyword type ids
-
setStatusId
Sets status id.- Parameters:
statusId
- the status id
-
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
Sets result sort order.- Parameters:
resultSortOrder
- the result sort order
-
setResultOffset
Sets result offset.- Parameters:
resultOffset
- the result offset
-
setMaxResults
Sets max results.- Parameters:
maxResults
- the max results
-
getTotalResults
Gets total results.- Returns:
- the total results
-
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
- 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
Make product id list array list.- Parameters:
eli
- the eli- Returns:
- the array list
-
saveSearchResultInfo
Save search result info.- Parameters:
numResults
- the num resultssecondsTotal
- the seconds total
-