public class CmsPagingQuery extends java.lang.Object implements I_CmsQueryFragment
CmsSelectQuery objects which adds SQL code for results paging.The wrapper can either use the window function approach to paging or append a LIMIT/OFFSET clause.
| 构造器和说明 |
|---|
CmsPagingQuery(CmsSelectQuery select)
Creates a new instance.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
setNameSubquery(boolean nameSubquery)
Enables or disables the naming of subqueries.
|
void |
setPaging(int pageSize,
int page)
Sets both the page size and current page to use for the query.
|
void |
setUseWindowFunctions(boolean useWindowFunctions)
Enables the use of window functions.
|
void |
visit(CmsStatementBuilder builder)
Generates the SQL and parameters and sends them to the statement builder .
|
public CmsPagingQuery(CmsSelectQuery select)
select - the wrapped querypublic void setNameSubquery(boolean nameSubquery)
nameSubquery - if true, enables naming of subqueriespublic void setPaging(int pageSize,
int page)
pageSize - the page sizepage - the current page (counting starts at 1)public void setUseWindowFunctions(boolean useWindowFunctions)
useWindowFunctions - if true, enables window functionspublic void visit(CmsStatementBuilder builder)
I_CmsQueryFragmentvisit 在接口中 I_CmsQueryFragmentbuilder - the statement builderI_CmsQueryFragment.visit(org.opencms.db.CmsStatementBuilder)