Package com.querydsl.core.types
Class QMap
- All Implemented Interfaces:
Expression<Map<Expression<?>,,?>> FactoryExpression<Map<Expression<?>,,?>> Serializable
QMap represents a projection of type Map
Usage example
List<Map<Expression<?>,?> result = query.from(employee).select(Projections.map(employee.firstName, employee.lastName)).fetch();
for (Tuple row : result) {
System.out.println("firstName " + row.get(employee.firstName));
System.out.println("lastName " + row.get(employee.lastName));
}
- Author:
- tiwe
- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedQMap(Expression<?>... args) Create a new QMap instanceprotectedQMap(Expression<?>[]... args) Create a new QMap instanceprotectedQMap(List<Expression<?>> args) Create a new QMap instance -
Method Summary
Modifier and TypeMethodDescription<R,C> R Accept the visitor with the given contextboolean@Unmodifiable List<Expression<?>>getArgs()Get the invocation arguments@Nullable Map<Expression<?>,?> newInstance(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
-
QMap
Create a new QMap instance- Parameters:
args-
-
QMap
Create a new QMap instance- Parameters:
args-
-
QMap
Create a new QMap instance- Parameters:
args-
-
-
Method Details
-
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
-
getArgs
Description copied from interface:FactoryExpressionGet the invocation arguments- Returns:
- argument expressions
-
equals
- Overrides:
equalsin classFactoryExpressionBase<Map<Expression<?>,?>>
-
newInstance
Description copied from interface:FactoryExpressionCreate a projection with the given arguments- Parameters:
args- row arguments- Returns:
- constructed value
-