Package com.querydsl.core.types
Class ConstructorExpression<T>
java.lang.Object
com.querydsl.core.types.ExpressionBase<T>
com.querydsl.core.types.FactoryExpressionBase<T>
com.querydsl.core.types.ConstructorExpression<T>
- Type Parameters:
T- expression type
- All Implemented Interfaces:
Expression<T>,FactoryExpression<T>,Serializable
- Direct Known Subclasses:
QPair
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();
- Author:
- tiwe
- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructorExpression(Class<? extends T> type, Expression<?>... args) protectedConstructorExpression(Class<? extends T> type, Class<?>[] paramTypes, Expression<?>... args) protectedConstructorExpression(Class<? extends T> type, Class<?>[] paramTypes, List<Expression<?>> args) -
Method Summary
Modifier and TypeMethodDescription<R,C> R Accept the visitor with the given contextCreate an alias for the expressionCreate an alias for the expressionbooleanfinal @Unmodifiable List<Expression<?>>getArgs()Get the invocation argumentsnewInstance(Object... args) Create a projection with the given argumentsMethods inherited from class com.querydsl.core.types.FactoryExpressionBase
skipNullsMethods inherited from class com.querydsl.core.types.ExpressionBase
getType, hashCode, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.querydsl.core.types.Expression
getType
-
Constructor Details
-
ConstructorExpression
-
ConstructorExpression
protected ConstructorExpression(Class<? extends T> type, Class<?>[] paramTypes, Expression<?>... args) -
ConstructorExpression
protected ConstructorExpression(Class<? extends T> type, Class<?>[] paramTypes, List<Expression<?>> args)
-
-
Method Details
-
as
Create an alias for the expression- Returns:
- alias expression
-
as
Create an alias for the expression- Returns:
- alias expression
-
accept
Description copied from interface:ExpressionAccept the visitor with the given context- Type Parameters:
R- return typeC- context type- Parameters:
v- visitorcontext- context of visit- Returns:
- result of visit
-
equals
- Overrides:
equalsin classFactoryExpressionBase<T>
-
getArgs
Description copied from interface:FactoryExpressionGet the invocation arguments- Returns:
- argument expressions
-
newInstance
Description copied from interface:FactoryExpressionCreate a projection with the given arguments- Parameters:
args- row arguments- Returns:
- constructed value
-