|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opencms.db.CmsPagingQuery
public class CmsPagingQuery
Wrapper for 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.
Constructor Summary | |
---|---|
CmsPagingQuery(CmsSelectQuery select)
Creates a new instance. |
Method Summary | |
---|---|
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 . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CmsPagingQuery(CmsSelectQuery select)
select
- the wrapped queryMethod Detail |
---|
public 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_CmsQueryFragment
visit
in interface I_CmsQueryFragment
builder
- the statement builderI_CmsQueryFragment.visit(org.opencms.db.CmsStatementBuilder)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |