dw.util
Class SeekableIterator
A special Iterator, which is returned by the system to iterate through large
sets of data. The iterator supports seeking forward to a random position.
This is a typical action when paging forward in a result set. The Iterator is
primarily returned from search operations.
Starting with API version 10.6, these iterators can only be iterated once to avoid possible memory problems for really large result sets. Putting them into the pipeline dictionary and trying to loop them multiple times is no longer possible because this would require buffering the iterated elements internally.
Prior to 10.6, and for all customers still running API version 10.4 (compatibility mode), SeekableIterator instances stored in the pipeline dictionary could be iterated multiple times (for example, by several loop nodes).
Starting with API version 10.6, these iterators can only be iterated once to avoid possible memory problems for really large result sets. Putting them into the pipeline dictionary and trying to loop them multiple times is no longer possible because this would require buffering the iterated elements internally.
Prior to 10.6, and for all customers still running API version 10.4 (compatibility mode), SeekableIterator instances stored in the pipeline dictionary could be iterated multiple times (for example, by several loop nodes).
Properties
count
:
Number
(Read Only)
The total element count for this iterator. The
method returns -1, if the total count is not known.
Constructor Summary
This class does not have a constructor, so you cannot create it directly.
Method Summary
asList(start
:
Number, size
:
Number)
:
List
Returns a list representing a subsequence within the iterator.
close()
:
void
Closes all system resources associated with this iterator.
forward(n
:
Number, size
:
Number)
:
void
Seeks forward by the given number of elements and limits the iteration to the given number of elements.
hasNext()
:
boolean
Indicates if there are more elements.
Salesforce Commerce Cloud Courses
Salesforce B2C Commerce Developer - Certification Tests
Why risk failing the SFCC exam? Get 180 real questions, killer content, and everything you need to crush the Salesforce B2C Commerce Developer certification.
Becoming a Salesforce B2C Commerce Developer is your ticket to higher salaries, better job opportunities, and the credibility to stand out from the competition. But let's be honestβpassing the certification exam isn't easy. That's where we come in.
Becoming a Salesforce B2C Commerce Developer is your ticket to higher salaries, better job opportunities, and the credibility to stand out from the competition. But let's be honestβpassing the certification exam isn't easy. That's where we come in.
Salesforce Javascript Developer I - Certification Tests
Not just another prep courseβthis is your shortcut to passing. Master JavaScript for Salesforce and go from 'hoping to pass' to knowing you will. Ready to start?
This isn't just another prep courseβit's your shortcut to mastering the skills and confidence you need to pass. With multiple practice tests covering every section and a final exam simulation designed to mirror the real thing, you'll feel like you've already aced it before test day.
This isn't just another prep courseβit's your shortcut to mastering the skills and confidence you need to pass. With multiple practice tests covering every section and a final exam simulation designed to mirror the real thing, you'll feel like you've already aced it before test day.
Salesforce B2C Commerce Architect - Certification Tests
Think the Developer exam was hard? Welcome to the next level.
The Salesforce B2C Commerce Architect certification is a whole different gameβcomplex solutions, elevated difficulty, and skills that set you apart in the eCommerce industry. That's why we're including 11 downloadable PDF guides, packed with best practices and strategies to help you prepare for the exam and build confidence in every topic.
The Salesforce B2C Commerce Architect certification is a whole different gameβcomplex solutions, elevated difficulty, and skills that set you apart in the eCommerce industry. That's why we're including 11 downloadable PDF guides, packed with best practices and strategies to help you prepare for the exam and build confidence in every topic.
Methods inherited from class
Object
assign, create, create, defineProperties, defineProperty, entries, freeze, fromEntries, getOwnPropertyDescriptor, getOwnPropertyNames, getOwnPropertySymbols, getPrototypeOf, hasOwnProperty, is, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, preventExtensions, propertyIsEnumerable, seal, setPrototypeOf, toLocaleString, toString, valueOf, values
Method Detail
asList
Returns a list representing a subsequence within the iterator. The underlying
system resources of the iterator will be closed at the end. The start
position must be 0 or a positive number.
Parameters:
start
-
the position from which to start the subsequence.
size
-
the number of items to collect.
Returns:
the list containing the subsequence.
close
close()
:
void
Closes all system resources associated with this iterator.
Calling this method is strongly recommended if not all elements of this iterator are
retrieved. This will allow the system to release system resources immediately.
The SeekableIterator
is closed automatically if all elements are retrieved.
Then calling method close()
is optional.
first
first()
:
Object
Returns the first element of this iterator and closes it.
If the iterator does not contain another element null
is returned.
If any of the methods next(), forward(int) or forward(int,int) have been called before
null
is returned.
This method is useful if only the first element of an iterator is needed.
OrderMgr.queryOrders("queryString", "sortString", args).first()
Returns:
the first element of an iterator and closes the iterator or returns
null
if the iterator doesn't have another element or the methods next(), forward(int) or forward(int,int) have already been called.
forward
forward(n
:
Number)
:
void
Seeks forward by the given number of elements. The number of
seek steps must be 0 or a positive number.
Parameters:
n
-
the number of elements to seek forward.
forward
Seeks forward by the given number of elements and limits the
iteration to the given number of elements. The method is typically
used to position and trim an iterator for paging. The getCount()
method will still return the total count of the underlying data
collection.
Parameters:
n
-
the number of elements to seek forward.
size
-
the maximum number of elements return from the iterator
getCount
getCount()
:
Number
Returns the total element count for this iterator. The
method returns -1, if the total count is not known.
Returns:
the total element count for this iterator or -1.
hasNext
hasNext()
:
boolean
Indicates if there are more elements.
Returns:
true if there are more elements, false otherwise.
next
next()
:
Object
Returns the next element from the Iterator.
Returns:
the next element from the Iterator.