Jump to content

WebObjects/EOF/Using EOF/Fetch Limits

From Wikibooks, open books for an open world

Overview

[edit | edit source]

By default, when you use an EOFetchSpecification, it will fetch all of the EOs that match its EOQualifier. However, often the user interface you will be using is paginated, and there are large performance wins by instead loading your results in pages.

Core WO

[edit | edit source]

EOFetchSpecification provides a setFetchLimit(int) method, but it does not directly support pagination, rather it will simply stop returning results after the number specified. This is useful for a cut-and-run approach to querying, but if you need to provide multiple pages of results, you will likely need to look elsewhere.

Project Wonder

[edit | edit source]

Project Wonder provides several facilities for addressing this problem:

  • ERXEOControlUtilities.objectsInRange(ec, fs, start, end) for Postgres, MySQL, and Frontbase
  • ERXBatchingDisplayGroup
  • ERXRecursiveBatchFetching

WODisplayGroup