public interface PagingQueryProvider
Modifier and Type | Method and Description |
---|---|
String |
generateFirstPageQuery(int pageSize)
Generate the query that will provide the first page, limited by the page size.
|
String |
generateJumpToItemQuery(int itemIndex,
int pageSize)
Generate the query that will provide the jump to item query.
|
String |
generateRemainingPagesQuery(int pageSize)
Generate the query that will provide the first page, limited by the page size.
|
int |
getParameterCount()
The number of parameters that are declared in the query
|
String |
getSortKeyPlaceHolder(String keyName)
Returns either a String to be used as the named placeholder for a sort key value (based on the column name)
or a ? for unnamed parameters.
|
Map<String,Order> |
getSortKeys()
The sort keys.
|
void |
init(DataSource dataSource)
Initialize the query provider using the provided
DataSource if necessary. |
boolean |
isUsingNamedParameters()
Indicate whether the generated queries use named parameter syntax.
|
void init(DataSource dataSource) throws Exception
DataSource
if necessary.dataSource
- DataSource to use for any initializationException
String generateFirstPageQuery(int pageSize)
pageSize
- number of rows to read for each pageString generateRemainingPagesQuery(int pageSize)
pageSize
- number of rows to read for each pageString generateJumpToItemQuery(int itemIndex, int pageSize)
itemIndex
- the index for the next item to be readpageSize
- number of rows to read for each pageint getParameterCount()
boolean isUsingNamedParameters()
Map<String,Order> getSortKeys()
String getSortKeyPlaceHolder(String keyName)
keyName
- The sort key nameCopyright © 2014 Pivotal. All rights reserved.