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 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:
      close in interface AutoCloseable
    • 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

      List<org.ofbiz.core.entity.GenericValue> getPartialList(int i, int i1)
    • add

      void add(org.ofbiz.core.entity.GenericValue o)
    • remove

      void remove()
    • set

      void set(org.ofbiz.core.entity.GenericValue o)
    • isCaseSensitive

      boolean isCaseSensitive(String fieldName)
      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.
      Specified by:
      iterator in interface Iterable<org.ofbiz.core.entity.GenericValue>
      Returns:
      an Iterator