|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.torque.util.Query
public class Query
Used to assemble an SQL SELECT query. Attributes exist for the sections of a SELECT: modifiers, columns, from clause, where clause, and order by clause. The various parts of the query are appended to buffers which only accept unique entries. This class is used primarily by BasePeer.
Nested Class Summary | |
---|---|
static class |
Query.FromElement
This class describes an Element in the From-part of a SQL clause. |
Constructor Summary | |
---|---|
Query()
|
Method Summary | |
---|---|
UniqueList |
getFromClause()
Retrieve the from buffer in order to specify which tables are involved in this query. |
UniqueList |
getGroupByClause()
Retrieve the group by columns buffer in order to specify which columns are used to group the results of the query. |
java.lang.String |
getHaving()
Get the having clause. |
java.lang.String |
getLimit()
Get the limit number. |
java.lang.String |
getOffset()
Get the offset number. |
UniqueList |
getOrderByClause()
Retrieve the order by columns buffer in order to specify which columns are used to sort the results of the query. |
java.lang.String |
getPostLimit()
Get the Post limit String. |
java.lang.String |
getPreLimit()
Get the Pre limit String. |
java.lang.String |
getRowcount()
Get the rowcount number. |
UniqueList |
getSelectClause()
Retrieve the columns buffer in order to specify which columns are returned in this query. |
UniqueList |
getSelectModifiers()
Retrieve the modifier buffer in order to add modifiers to this query. |
UniqueList |
getWhereClause()
Retrieve the where buffer in order to specify the selection criteria E.g. |
boolean |
hasLimit()
True if this query has a limit clause registered. |
void |
setFromClause(UniqueList tables)
Set the from clause. |
void |
setHaving(java.lang.String having)
Set the having clause. |
void |
setLimit(java.lang.String limit)
Set the limit number. |
void |
setOffset(java.lang.String offset)
Set the offset number. |
void |
setPostLimit(java.lang.String postLimit)
Set the Post limit String. |
void |
setPreLimit(java.lang.String preLimit)
Get the Pre limit String. |
void |
setRowcount(java.lang.String rowcount)
Set the rowcount number. |
void |
setSelectClause(UniqueList columns)
Set the columns. |
void |
setSelectModifiers(UniqueList modifiers)
Set the modifiers. |
void |
setWhereClause(UniqueList where)
Set the where clause. |
java.lang.String |
toString()
Outputs the query statement. |
java.lang.StringBuffer |
toStringBuffer(java.lang.StringBuffer stmt)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Query()
Method Detail |
---|
public UniqueList getSelectModifiers()
public void setSelectModifiers(UniqueList modifiers)
modifiers
- the modifierspublic UniqueList getSelectClause()
public void setSelectClause(UniqueList columns)
columns
- columns listpublic UniqueList getFromClause()
public void setFromClause(UniqueList tables)
tables
- the tablespublic UniqueList getWhereClause()
public void setWhereClause(UniqueList where)
where
- where clausepublic UniqueList getOrderByClause()
public UniqueList getGroupByClause()
public void setHaving(java.lang.String having)
having
- A String.public void setLimit(java.lang.String limit)
limit
- A String.public void setPreLimit(java.lang.String preLimit)
preLimit
- A String with the preLimit.public void setPostLimit(java.lang.String postLimit)
postLimit
- A String with the postLimit.public void setOffset(java.lang.String offset)
offset
- A String.public void setRowcount(java.lang.String rowcount)
rowcount
- A String.public java.lang.String getHaving()
public java.lang.String getLimit()
public java.lang.String getPostLimit()
public java.lang.String getPreLimit()
public java.lang.String getOffset()
public boolean hasLimit()
public java.lang.String getRowcount()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.StringBuffer toStringBuffer(java.lang.StringBuffer stmt)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |