E
- result typepublic class QueryElement<E> extends Object implements Selectable<E>, Selection<E>, DistinctSelection<E>, Insertion<E>, Deletion<E>, Update<E>, JoinWhereGroupByOrderBy<E>, SetGroupByOrderByLimit<E>, SetHavingOrderByLimit<E>, Offset<E>, Aliasable<Return<E>>, Expression<QueryElement>, QueryWrapper<E>, SelectionElement, LimitedElement, OrderByElement, GroupByElement, SetOperationElement, WhereElement
Constructor and Description |
---|
QueryElement(QueryType queryType,
EntityModel model,
QueryOperation<E> operator) |
Modifier and Type | Method and Description |
---|---|
Return<E> |
as(String alias)
Alias the instance with the given valid name.
|
DistinctSelection<E> |
distinct() |
Set<Type<?>> |
entityTypes() |
boolean |
equals(Object obj) |
Selectable<E> |
except() |
<F extends E> |
extend(Function<E,F> transform) |
QueryElement<E> |
from(Class<?>... types) |
QueryElement<E> |
from(Supplier<?>... subqueries) |
Set<Expression<?>> |
fromExpressions() |
E |
get() |
String |
getAlias() |
Class<QueryElement> |
getClassType() |
ExpressionType |
getExpressionType() |
Set<Expression<?>> |
getGroupByExpressions() |
Set<HavingConditionElement<?>> |
getHavingElements() |
QueryElement<E> |
getInnerSetQuery() |
Integer |
getLimit() |
String |
getName() |
Integer |
getOffset() |
SetOperator |
getOperator() |
Set<Expression<?>> |
getOrderByExpressions() |
Set<? extends Expression<?>> |
getSelection() |
Set<WhereConditionElement<?>> |
getWhereElements() |
ExistsElement<?> |
getWhereExistsElement() |
SetHavingOrderByLimit<E> |
groupBy(Expression<?>... expressions) |
<V> SetHavingOrderByLimit<E> |
groupBy(Expression<V> expression) |
int |
hashCode() |
<V> HavingAndOr<E> |
having(Condition<V,?> condition) |
Selectable<E> |
intersect() |
boolean |
isDistinct() |
<J> JoinOn<E> |
join(Class<J> type)
inner join on the type
|
<J> JoinOn<E> |
join(Return<J> query)
inner join on the type
|
Set<JoinOnElement<E>> |
joinElements() |
<J> JoinOn<E> |
leftJoin(Class<J> type)
left inner join on the type
|
<J> JoinOn<E> |
leftJoin(Return<J> query)
left inner join on the type
|
Offset<E> |
limit(int limit)
Defines the maximum amount of elements in the final result.
|
Return<E> |
offset(int offset)
Defines the offset within this query results will start from.
|
Limit<E> |
orderBy(Expression<?>... expressions)
order the query with the given expressions.
|
<V> Limit<E> |
orderBy(Expression<V> expression)
order the query with the given expression.
|
QueryType |
queryType() |
<J> JoinOn<E> |
rightJoin(Class<J> type)
right inner join on the type
|
<J> JoinOn<E> |
rightJoin(Return<J> query)
right inner join on the type
|
QueryElement<E> |
select(Expression<?>... selection)
selects the given expressions in the query.
|
QueryElement<E> |
select(Set<? extends Expression<?>> select)
selects the given expressions in the query.
|
<V> Update<E> |
set(Expression<V> expression,
V value) |
Selectable<E> |
union() |
Selectable<E> |
unionAll() |
QueryElement<E> |
unwrapQuery() |
Map<Expression<?>,Object> |
updateValues() |
<V> Insertion<E> |
value(Expression<V> expression,
V value) |
Exists<SetGroupByOrderByLimit<E>> |
where() |
<V> WhereAndOr<E> |
where(Condition<V,?> condition) |
public QueryElement(QueryType queryType, EntityModel model, QueryOperation<E> operator)
public QueryType queryType()
public Set<? extends Expression<?>> getSelection()
getSelection
in interface SelectionElement
public boolean isDistinct()
isDistinct
in interface SelectionElement
public Map<Expression<?>,Object> updateValues()
public Set<WhereConditionElement<?>> getWhereElements()
getWhereElements
in interface WhereElement
public ExistsElement<?> getWhereExistsElement()
getWhereExistsElement
in interface WhereElement
public Set<JoinOnElement<E>> joinElements()
public SetOperator getOperator()
getOperator
in interface SetOperationElement
public Set<Expression<?>> getOrderByExpressions()
getOrderByExpressions
in interface OrderByElement
public Set<Expression<?>> getGroupByExpressions()
getGroupByExpressions
in interface GroupByElement
public Set<HavingConditionElement<?>> getHavingElements()
getHavingElements
in interface GroupByElement
public QueryElement<E> getInnerSetQuery()
getInnerSetQuery
in interface SetOperationElement
public Integer getLimit()
getLimit
in interface LimitedElement
public Integer getOffset()
getOffset
in interface LimitedElement
public Set<Expression<?>> fromExpressions()
public String getName()
getName
in interface Expression<QueryElement>
public Class<QueryElement> getClassType()
getClassType
in interface Expression<QueryElement>
Class
that results when the expression is evaluatedpublic ExpressionType getExpressionType()
getExpressionType
in interface Expression<QueryElement>
public Return<E> as(String alias)
Aliasable
public String getAlias()
public QueryElement<E> select(Expression<?>... selection)
Selectable
select
in interface Selectable<E>
selection
- expressions to selectpublic QueryElement<E> select(Set<? extends Expression<?>> select)
Selectable
select
in interface Selectable<E>
select
- expressions to selectpublic QueryElement<E> unwrapQuery()
unwrapQuery
in interface QueryWrapper<E>
public DistinctSelection<E> distinct()
distinct
in interface Distinct<DistinctSelection<E>>
public E get()
public <F extends E> QueryElement<F> extend(Function<E,F> transform)
public SetHavingOrderByLimit<E> groupBy(Expression<?>... expressions)
groupBy
in interface GroupBy<SetHavingOrderByLimit<E>>
public <V> SetHavingOrderByLimit<E> groupBy(Expression<V> expression)
groupBy
in interface GroupBy<SetHavingOrderByLimit<E>>
public <J> JoinOn<E> join(Class<J> type)
Join
public <J> JoinOn<E> leftJoin(Class<J> type)
Join
public <J> JoinOn<E> rightJoin(Class<J> type)
Join
public <J> JoinOn<E> join(Return<J> query)
Join
public <J> JoinOn<E> leftJoin(Return<J> query)
Join
public <J> JoinOn<E> rightJoin(Return<J> query)
Join
public <V> Limit<E> orderBy(Expression<V> expression)
OrderBy
public Limit<E> orderBy(Expression<?>... expressions)
OrderBy
public <V> WhereAndOr<E> where(Condition<V,?> condition)
public <V> HavingAndOr<E> having(Condition<V,?> condition)
public Offset<E> limit(int limit)
Limit
public Return<E> offset(int offset)
Offset
public <V> Update<E> set(Expression<V> expression, V value)
public <V> Insertion<E> value(Expression<V> expression, V value)
public Selectable<E> union()
union
in interface SetOperation<Selectable<E>>
public Selectable<E> unionAll()
unionAll
in interface SetOperation<Selectable<E>>
public Selectable<E> intersect()
intersect
in interface SetOperation<Selectable<E>>
public Selectable<E> except()
except
in interface SetOperation<Selectable<E>>