|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.opencms.db.CmsSelectQuery
public class CmsSelectQuery
A class for generating SQL SELECT statements.
| Nested Class Summary | |
|---|---|
class |
CmsSelectQuery.TableAlias
Helper class which wraps a table alias. |
| Constructor Summary | |
|---|---|
CmsSelectQuery()
Creates a new instance. |
|
| Method Summary | |
|---|---|
void |
addClause(I_CmsQueryFragment clause)
Adds another clause to the query. |
void |
addColumn(I_CmsQueryFragment node)
Adds an expression which should be added as a column in the result set. |
void |
addColumn(String column)
Adds an expression which should be added as a column in the result set. |
void |
addCondition(I_CmsQueryFragment node)
Adds a new condition to the query. |
void |
addCondition(String fragment,
Object... params)
Adds a new condition to the query. |
void |
addTable(String table)
Adds a table to the query's FROM clause. |
CmsSelectQuery.TableAlias |
addTable(String table,
String aliasPrefix)
Adds a table the query's FROM clause. |
I_CmsQueryFragment |
getOrdering()
Returns the fragment for the ORDER BY clause. |
void |
setOrdering(String ordering)
Sets the SQL used for the ORDER BY clause. |
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 CmsSelectQuery()
| Method Detail |
|---|
public void addClause(I_CmsQueryFragment clause)
clause - the clause to addpublic void addColumn(I_CmsQueryFragment node)
node - the expression which should be added as a columnpublic void addColumn(String column)
column - the expression which should be added as a columnpublic void addCondition(I_CmsQueryFragment node)
node - the condition to add to the query
public void addCondition(String fragment,
Object... params)
fragment - the condition SQLparams - the condition parameterspublic void addTable(String table)
table - the table to add
public CmsSelectQuery.TableAlias addTable(String table,
String aliasPrefix)
table - the table to addaliasPrefix - the prefix used to generate the alias
public I_CmsQueryFragment getOrdering()
public void setOrdering(String ordering)
ordering - the SQL used for the ORDER BY clausepublic void visit(CmsStatementBuilder builder)
I_CmsQueryFragment
visit in interface I_CmsQueryFragmentbuilder - 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 | |||||||