T
- expression type@Immutable public class ConstructorExpression<T> extends FactoryExpressionBase<T>
ConstructorExpression
represents a constructor invocation
Example
QEmployee employee = QEmployee.employee;
List<EmployeeInfo> result = query.from(employee)
.where(employee.valid.eq(true))
.select(Projections.constructor(EmployeeInfo.class, employee.firstName, employee.lastName))
.fetch();
Modifier | Constructor and Description |
---|---|
protected |
ConstructorExpression(Class<? extends T> type,
Class<?>[] paramTypes,
Expression<?>... args) |
protected |
ConstructorExpression(Class<? extends T> type,
Class<?>[] paramTypes,
com.google.common.collect.ImmutableList<Expression<?>> args) |
protected |
ConstructorExpression(Class<? extends T> type,
Expression<?>... args) |
Modifier and Type | Method and Description |
---|---|
<R,C> R |
accept(Visitor<R,C> v,
C context)
Accept the visitor with the given context
|
Expression<T> |
as(Path<T> alias)
Create an alias for the expression
|
Expression<T> |
as(String alias)
Create an alias for the expression
|
boolean |
equals(Object obj) |
List<Expression<?>> |
getArgs()
Get the invocation arguments
|
T |
newInstance(Object... args)
Create a projection with the given arguments
|
skipNulls
getType, hashCode, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getType
protected ConstructorExpression(Class<? extends T> type, Expression<?>... args)
protected ConstructorExpression(Class<? extends T> type, Class<?>[] paramTypes, Expression<?>... args)
protected ConstructorExpression(Class<? extends T> type, Class<?>[] paramTypes, com.google.common.collect.ImmutableList<Expression<?>> args)
public Expression<T> as(Path<T> alias)
public Expression<T> as(String alias)
public <R,C> R accept(Visitor<R,C> v, C context)
Expression
R
- return typeC
- context typev
- visitorcontext
- context of visitpublic boolean equals(Object obj)
equals
in class FactoryExpressionBase<T>
public final List<Expression<?>> getArgs()
FactoryExpression
public T newInstance(Object... args)
FactoryExpression
args
- row argumentsCopyright © 2007–2016 Querydsl. All rights reserved.