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 theKeysetPage
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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getFirstResult()
Returns the position of the first result, numbered from 0.Keyset
getHighest()
Returns the key set for the highest entry of the correspondingPagedList
.List<Keyset>
getKeysets()
Returns the key set list of the correspondingPagedList
.Keyset
getLowest()
Returns the key set for the lowest entry of the correspondingPagedList
.int
getMaxResults()
Returns the maximum number of results.
-
-
-
Constructor Detail
-
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
public DefaultKeysetPage(int firstResult, int maxResults, Keyset lowest, Keyset highest)
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 Detail
-
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
public Keyset 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
public Keyset 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
public List<Keyset> getKeysets()
Description copied from interface:KeysetPage
Returns the key set list of the correspondingPagedList
.- Specified by:
getKeysets
in interfaceKeysetPage
- Returns:
- The key set list
-
-