Package com.blazebit.persistence
Class DefaultKeysetPage
java.lang.Object
com.blazebit.persistence.DefaultKeysetPage
- All Implemented Interfaces:
KeysetPage
,Serializable
A simple default implementation for the
KeysetPage
interface.- Since:
- 1.4.1
- Author:
- Christian Beikov
- See Also:
-
Constructor Summary
ConstructorDescriptionDefaultKeysetPage
(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 TypeMethodDescriptionint
Returns the position of the first result, numbered from 0.Returns the key set for the highest entry of the correspondingPagedList
.Returns the key set list of the correspondingPagedList
.Returns the key set for the lowest entry of the correspondingPagedList
.int
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:KeysetPage
Returns the position of the first result, numbered from 0. This is the position of the first element of this key set.- Specified by:
getFirstResult
in interfaceKeysetPage
- Returns:
- The position of the first result
-
getMaxResults
public int getMaxResults()Description copied from interface:KeysetPage
Returns the maximum number of results. This is the maximum number of results of this key set.- Specified by:
getMaxResults
in interfaceKeysetPage
- Returns:
- The maximum number of results
-
getLowest
Description copied from interface:KeysetPage
Returns the key set for the lowest entry of the correspondingPagedList
.- Specified by:
getLowest
in interfaceKeysetPage
- Returns:
- The key set for the lowest entry
-
getHighest
Description copied from interface:KeysetPage
Returns the key set for the highest entry of the correspondingPagedList
.- Specified by:
getHighest
in interfaceKeysetPage
- Returns:
- The key set for the highest entry
-
getKeysets
Description copied from interface:KeysetPage
Returns the key set list of the correspondingPagedList
.- Specified by:
getKeysets
in interfaceKeysetPage
- Returns:
- The key set list
-