Package com.atlassian.jira.ofbiz
Interface OfBizListIterator
- All Superinterfaces:
AutoCloseable,Iterable<org.ofbiz.core.entity.GenericValue>
- All Known Implementing Classes:
DefaultOfBizListIterator,MockOfBizListIterator
@PublicApi
public interface OfBizListIterator
extends Iterable<org.ofbiz.core.entity.GenericValue>, AutoCloseable
A wrapper around
EntityListIterator that does not throw
GenericEntityException.
IMPORTANT: Note that you should not rely on this for streaming large datasets, as the backing ResultSet will pull the entire dataset into memory anyway. For more information, see PSA: OfBizListIterator is not good enough.
IMPORTANT: This iterator must be closed in a finally block, or connection leaks will ensue.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanabsolute(int i) voidadd(org.ofbiz.core.entity.GenericValue o) voidvoidvoidclose()Closes the iterator.org.ofbiz.core.entity.GenericValueintbooleanfirst()List<org.ofbiz.core.entity.GenericValue>List<org.ofbiz.core.entity.GenericValue>getPartialList(int i, int i1) booleanisCaseSensitive(String fieldName) Returns true if the specified field name in the database is case-sensitive.Iterator<org.ofbiz.core.entity.GenericValue>iterator()Returns a read-only iterator over the result sets.booleanlast()org.ofbiz.core.entity.GenericValuenext()intorg.ofbiz.core.entity.GenericValueprevious()intvoidremove()voidset(org.ofbiz.core.entity.GenericValue o) voidsetDelegator(org.ofbiz.core.entity.GenericDelegator genericDelegator) voidsetFetchSize(int i) Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
setDelegator
void setDelegator(org.ofbiz.core.entity.GenericDelegator genericDelegator) -
afterLast
void afterLast() -
beforeFirst
void beforeFirst() -
last
boolean last() -
first
boolean first() -
close
void close()Closes the iterator. Logs exceptions and does not propagate them.- Specified by:
closein interfaceAutoCloseable
-
currentGenericValue
org.ofbiz.core.entity.GenericValue currentGenericValue() -
currentIndex
int currentIndex() -
absolute
boolean absolute(int i) -
next
org.ofbiz.core.entity.GenericValue next() -
nextIndex
int nextIndex() -
previous
org.ofbiz.core.entity.GenericValue previous() -
previousIndex
int previousIndex() -
setFetchSize
void setFetchSize(int i) -
getCompleteList
List<org.ofbiz.core.entity.GenericValue> getCompleteList() -
getPartialList
-
add
void add(org.ofbiz.core.entity.GenericValue o) -
remove
void remove() -
set
void set(org.ofbiz.core.entity.GenericValue o) -
isCaseSensitive
Returns true if the specified field name in the database is case-sensitive.- Parameters:
fieldName- the name of the entity field- Returns:
- true if the field is case-sensitive in the database
- Throws:
DataAccessException- if an underlying problem occurs.
-
iterator
Iterator<org.ofbiz.core.entity.GenericValue> iterator()Returns a read-only iterator over the result sets.
-