Interface PageByIndexRangeFinder<M extends Serializable,T extends Serializable>
- All Superinterfaces:
Serializable
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
public interface PageByIndexRangeFinder<M extends Serializable,T extends Serializable>
extends Serializable
Strategy for lazy loading a page of records to display from an index range (0 based), typically with list size
found by ListSizeFinder
. This is particularly useful for reading MySQL tables traversing an index using
OFFSET and LIMIT keywords.
-
Method Summary
Modifier and TypeMethodDescriptionReturns items within a range of indices, where indices start at 0.default boolean
Returns true if finder eager loads any optional extensions of each item.
-
Method Details
-
getItems
Returns items within a range of indices, where indices start at 0. If the range covers indices that don't exist, any records that are in range should be returned. No item should ever be null. For convenience of MySQL adapters, OFFSET is startIndex and LIMIT is endIndex - startIndex + 1.- Parameters:
selectedMaster
- Selected record in master list or null for loading master list.startIndex
- Start of index range, where indices start at zero.endIndex
- End of index range (inclusive), where indices start at zero.- Throws:
Exception
-
getLoadsDetails
default boolean getLoadsDetails()Returns true if finder eager loads any optional extensions of each item. This is usually false as loading extensions results in poor performance or there are no optional extensions.
-