public class Query extends Object
| Modifier and Type | Class and Description | 
|---|---|
| static class  | Query.TypeAll types of the statement. | 
| Constructor and Description | 
|---|
| Query() | 
| Modifier and Type | Method and Description | 
|---|---|
| String | getDisplayString()Returns a String to display this query. | 
| Integer | getFetchSize()Returns the JDBC statement fetch size to use for queries. | 
| String | getForUpdate()Returns the FOR UPDATE clause which should be added to the query. | 
| UniqueList<FromElement> | getFromClause()Retrieve the from buffer in order to specify which tables are
 involved in this query. | 
| UniqueList<String> | getGroupByClause()Retrieve the group by columns buffer in order to specify which
 columns are used to group the results of the query. | 
| String | getHaving()Get the having clause. | 
| String | getLimit()Get the limit number. | 
| String | getOffset()Get the offset number. | 
| UniqueList<String> | getOrderByClause()Retrieve the order by columns buffer in order to specify which
 columns are used to sort the results of the query. | 
| String | getPartOperator()Returns the operator connecting the query parts. | 
| List<Query> | getParts()Returns the parts of this query. | 
| String | getPostLimit()Get the Post limit String. | 
| String | getPreLimit()Get the Pre limit String. | 
| List<Object> | getPreparedStatementReplacements()Returns all preparedStatementReplacements in the query. | 
| String | getRowcount()Get the rowcount number. | 
| UniqueList<String> | getSelectClause()Retrieve the columns buffer in order to specify which columns
 are returned in this query. | 
| UniqueList<String> | getSelectModifiers()Retrieve the modifier buffer in order to add modifiers to this
 query. | 
| Query.Type | getType()Returns the type of this SQL statement. | 
| ColumnValues | getUpdateValues()Retrieve the values to update to in case of an update statement. | 
| UniqueList<String> | getWhereClause()Retrieve the where buffer in order to specify the selection
 criteria E.g. | 
| List<Object> | getWhereClausePreparedStatementReplacements()Retrieves the replacements which are inserted into prepared statement
 placeholders in the where clause. | 
| boolean | hasLimit()True if this query has a limit clause registered. | 
| void | setFetchSize(Integer fetchSize)Sets the JDBC statement fetch size to use for queries. | 
| void | setForUpdate(String forUpdate)Sets the FOR UPDATE clause which should be added to the query. | 
| void | setHaving(String having)Set the having clause. | 
| void | setLimit(String limit)Set the limit number. | 
| void | setOffset(String offset)Set the offset number. | 
| void | setPartOperator(String partOperator)Sets the operator connecting the query parts. | 
| void | setPostLimit(String postLimit)Set the Post limit String. | 
| void | setPreLimit(String preLimit)Get the Pre limit String. | 
| void | setRowcount(String rowcount)Set the rowcount number. | 
| void | setType(Query.Type type)Sets the type of this SQL statement. | 
| String | toString()Outputs the query statement. | 
| StringBuilder | toStringBuilder(StringBuilder stringBuilder)Appends the query to a string builder. | 
public UniqueList<String> getSelectModifiers()
public UniqueList<String> getSelectClause()
public ColumnValues getUpdateValues()
public UniqueList<FromElement> getFromClause()
public UniqueList<String> getWhereClause()
public List<Object> getWhereClausePreparedStatementReplacements()
public List<Object> getPreparedStatementReplacements()
public UniqueList<String> getOrderByClause()
public UniqueList<String> getGroupByClause()
public String getHaving()
public void setHaving(String having)
having - A String.public String getLimit()
public void setLimit(String limit)
limit - A String.public String getPreLimit()
public void setPreLimit(String preLimit)
preLimit - A String with the preLimit.public String getPostLimit()
public void setPostLimit(String postLimit)
postLimit - A String with the postLimit.public String getOffset()
public void setOffset(String offset)
offset - A String.public String getRowcount()
public void setRowcount(String rowcount)
rowcount - A String.public void setForUpdate(String forUpdate)
forUpdate - the FOR UPDATE clause which should be added,
        null if no FOR UPDATE clause should be used.public String getForUpdate()
public boolean hasLimit()
public Query.Type getType()
public void setType(Query.Type type)
type - the new type, not null.NullPointerException - if type is null.public Integer getFetchSize()
public void setFetchSize(Integer fetchSize)
fetchSize - the fetch size, or null for not set.public List<Query> getParts()
public String getPartOperator()
public void setPartOperator(String partOperator)
partOperator - the operator connecting the parts, or null.public String toString()
public StringBuilder toStringBuilder(StringBuilder stringBuilder)
stringBuilder - the stringBuilder to append to, not null.public String getDisplayString() throws TorqueException
TorqueException - Trouble creating the query string.Copyright © 2000–2020 The Apache Software Foundation. All rights reserved.