Package com.blazebit.persistence
Class DefaultKeysetPage
java.lang.Object
com.blazebit.persistence.DefaultKeysetPage
- All Implemented Interfaces:
KeysetPage,Serializable
public class DefaultKeysetPage extends Object implements KeysetPage
A simple default implementation for the
KeysetPage interface.- Since:
- 1.4.1
- Author:
- Christian Beikov
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description DefaultKeysetPage(int firstResult, int maxResults, Keyset lowest, Keyset highest)Creates a newKeysetPage.DefaultKeysetPage(int firstResult, int maxResults, Keyset lowest, Keyset highest, List<Keyset> keysets)Creates a newKeysetPage.DefaultKeysetPage(int firstResult, int maxResults, Serializable[] lowest, Serializable[] highest, Serializable[][] keysets)Creates a newKeysetPage. -
Method Summary
Modifier and Type Method Description intgetFirstResult()Returns the position of the first result, numbered from 0.KeysetgetHighest()Returns the key set for the highest entry of the correspondingPagedList.List<Keyset>getKeysets()Returns the key set list of the correspondingPagedList.KeysetgetLowest()Returns the key set for the lowest entry of the correspondingPagedList.intgetMaxResults()Returns the maximum number of results.
-
Constructor Details
-
DefaultKeysetPage
public DefaultKeysetPage(int firstResult, int maxResults, Serializable[] lowest, Serializable[] highest, Serializable[][] keysets)Creates a newKeysetPage.- Parameters:
firstResult- The first resultmaxResults- The max resultslowest- The lowest keysethighest- The highest keysetkeysets- All extracted keysets
-
DefaultKeysetPage
Creates a newKeysetPage.- Parameters:
firstResult- The first resultmaxResults- The max resultslowest- The lowest keysethighest- The highest keyset
-
DefaultKeysetPage
public DefaultKeysetPage(int firstResult, int maxResults, Keyset lowest, Keyset highest, List<Keyset> keysets)Creates a newKeysetPage.- Parameters:
firstResult- The first resultmaxResults- The max resultslowest- The lowest keysethighest- The highest keysetkeysets- All extracted keysets
-
-
Method Details
-
getFirstResult
public int getFirstResult()Description copied from interface:KeysetPageReturns the position of the first result, numbered from 0. This is the position of the first element of this key set.- Specified by:
getFirstResultin interfaceKeysetPage- Returns:
- The position of the first result
-
getMaxResults
public int getMaxResults()Description copied from interface:KeysetPageReturns the maximum number of results. This is the maximum number of results of this key set.- Specified by:
getMaxResultsin interfaceKeysetPage- Returns:
- The maximum number of results
-
getLowest
Description copied from interface:KeysetPageReturns the key set for the lowest entry of the correspondingPagedList.- Specified by:
getLowestin interfaceKeysetPage- Returns:
- The key set for the lowest entry
-
getHighest
Description copied from interface:KeysetPageReturns the key set for the highest entry of the correspondingPagedList.- Specified by:
getHighestin interfaceKeysetPage- Returns:
- The key set for the highest entry
-
getKeysets
Description copied from interface:KeysetPageReturns the key set list of the correspondingPagedList.- Specified by:
getKeysetsin interfaceKeysetPage- Returns:
- The key set list
-