public class Query extends Expression
alias, enclosed, joins, ordering, properties, quotes, translator, withNoLock
Constructor and Description |
---|
Query()
Creates a new instance of
Query . |
Modifier and Type | Method and Description |
---|---|
Query |
andWhere(Expression where)
The WHERE clause.
|
Query |
distinct()
Sets the SELECT expression as DISTINCT.
|
Query |
from(Collection<? extends Expression> fromColumns)
Adds the FROM columns.
|
Query |
from(Expression... fromColumns)
Adds the FROM columns.
|
List<Expression> |
getFromColumns()
Gets the FROM columns.
|
List<Expression> |
getGroupbyColumns()
Gets the GROUP BY expressions.
|
Expression |
getHaving()
Gets the HAVING expression.
|
Integer |
getLimit()
Gets the limit.
|
Integer |
getOffset()
Gets the offset.
|
List<Expression> |
getOrderbyColumns()
Gets the ORDER BY expressions.
|
List<Expression> |
getSelectColumns()
Gets the SELECT columns.
|
Expression |
getWhere()
Gets the WHERE expression.
|
Query |
groupby(Collection<? extends Expression> groupbyColumns)
Adds the GROUP BY columns.
|
Query |
groupby(Expression... groupbyColumns)
Adds the GROUP BY columns.
|
Query |
having(Expression having)
Adds the HAVING expression.
|
boolean |
isDistinct()
Checks if the SELECT expression is distinct.
|
Query |
limit(Integer limit)
Sets the limit.
|
Query |
offset(Integer offset)
Sets the offset.
|
Query |
orderby(Collection<? extends Expression> orderbyColumns)
Adds the ORDER BY columns.
|
Query |
orderby(Expression... orderbyColumns)
Adds the ORDER BY columns.
|
Query |
select(Collection<? extends Expression> selectColumns)
Adds the SELECT columns.
|
Query |
select(Expression... selectColumns)
Adds the SELECT columns.
|
String |
translate()
Translates the expression.
|
Query |
where(Expression where)
The where clause.
|
alias, asc, desc, enclose, fullOuterJoin, getAlias, getJoins, getOrdering, innerJoin, isAliased, isEnclosed, isQuote, isQuotes, isWithNoLock, leftOuterJoin, rightOuterJoin, unquote, withNoLock
public Query()
Query
.public String translate()
Expression
translate
in class Expression
public List<Expression> getSelectColumns()
public List<Expression> getFromColumns()
public Expression getWhere()
public List<Expression> getGroupbyColumns()
public Expression getHaving()
public List<Expression> getOrderbyColumns()
public Integer getLimit()
null
is returned when not applicable.public Integer getOffset()
null
is returned when not applicable.public boolean isDistinct()
true
is the SELECT expression is distinct, false
otherwise.public Query distinct()
public Query select(Expression... selectColumns)
selectColumns
- The columns.public Query select(Collection<? extends Expression> selectColumns)
selectColumns
- The columns.public Query from(Expression... fromColumns)
fromColumns
- The columns.public Query from(Collection<? extends Expression> fromColumns)
fromColumns
- The columns.public Query andWhere(Expression where)
and
expression between old and new clauses.
Example:
query.where(eq(column("col1"),k(1)).andWhere(eq(column("col2"),k(2)) will be translated to ("col1" = 1) AND ("col2" = 2)
where
- The WHERE expression.public Query where(Expression where)
where
clauses previously defined.where
- The object.public Query groupby(Expression... groupbyColumns)
groupbyColumns
- The columns.public Query groupby(Collection<? extends Expression> groupbyColumns)
groupbyColumns
- The columns.public Query having(Expression having)
having
- The having expression.public Query orderby(Expression... orderbyColumns)
orderbyColumns
- The columns.public Query orderby(Collection<? extends Expression> orderbyColumns)
orderbyColumns
- The columns.public Query limit(Integer limit)
limit
- The number of rows that the query returns.Copyright © 2014 Feedzai. All Rights Reserved.