Interface QuotePersistedHelper
- All Superinterfaces:
LineItemHelper,QuoteHelper,Reviewable
Extends
QuoteHelper with operations that are only available when the persisted quote
calculation processor is enabled on the QuoteType, i.e. when the line items live in the database
rather than in the serialized quote.
The helper returned by quoteProcessor.getHelper() implements this interface only in that
mode, so prefer the methods declared on QuoteHelper unless you specifically need the
database to do the filtering.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface LineItemHelper
LineItemHelper.LineItem, LineItemHelper.ReviewSubStep -
Method Summary
Modifier and TypeMethodDescriptiongetLineItemsIterator(Filter filter) Streaming iterator over the line items matching the given filter, evaluated by the database.Methods inherited from interface LineItemHelper
findAllWithLabel, findByLineId, getRoot, lineItemFromMapMethods inherited from interface QuoteHelper
findAllWithSKU, getItemsForReviewIterator, getLineItemsIteratorMethods inherited from interface Reviewable
getItemsForReview, getReviewSubStep, isInReview
-
Method Details
-
getLineItemsIterator
Streaming iterator over the line items matching the given filter, evaluated by the database.This is the persisted-mode replacement for
QuoteHelper.findAllWithSKU(String)andLineItemHelper.findAllWithLabel(String), both of which would have to load every line item into memory.Example:
import com.googlecode.genericdao.search.Filter quoteProcessor.getHelper().getLineItemsIterator(Filter.equal("sku", "P123")).withCloseable { items -> items.each { item -> api.logInfo("Item", item.lineId) } }- Parameters:
filter- the filter to apply, ornullfor all line items of the quote- Returns:
- an iterator over the matching line items; must be closed after use
(try-with-resources or
withCloseable)
-