public interface PagingQueryProvider
Modifier and Type | Method and Description |
---|---|
java.lang.String |
generateFirstPageQuery(int pageSize)
Generate the query that will provide the first page, limited by the page size.
|
java.lang.String |
generateJumpToItemQuery(int itemIndex,
int pageSize)
Generate the query that will provide the jump to item query.
|
java.lang.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
|
java.lang.String |
getSortKeyPlaceHolder(java.lang.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.
|
java.util.Map<java.lang.String,Order> |
getSortKeys()
The sort keys.
|
java.util.Map<java.lang.String,Order> |
getSortKeysWithoutAliases()
The sort key (unique single column name) without alias.
|
void |
init(javax.sql.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(javax.sql.DataSource dataSource) throws java.lang.Exception
DataSource
if necessary.dataSource
- DataSource to use for any initializationjava.lang.Exception
java.lang.String generateFirstPageQuery(int pageSize)
pageSize
- number of rows to read for each pagejava.lang.String generateRemainingPagesQuery(int pageSize)
pageSize
- number of rows to read for each pagejava.lang.String 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()
java.util.Map<java.lang.String,Order> getSortKeys()
java.lang.String getSortKeyPlaceHolder(java.lang.String keyName)
keyName
- The sort key namejava.util.Map<java.lang.String,Order> getSortKeysWithoutAliases()