T - expression type@Immutable public abstract class MappingProjection<T> extends FactoryExpressionBase<T>
Example
MappingProjection<Pair<String, String>> mapping = new MappingProjection<Pair<String, String>>(Pair.class, str1, str2) {
@Override
protected Pair<String, String> map(Tuple row) {
return Pair.of(row.get(str1), row.get(str2));
}
};
| Constructor and Description |
|---|
MappingProjection(java.lang.Class<? super T> type,
Expression<?>... args)
Create a new MappingProjection instance
|
MappingProjection(java.lang.Class<? super T> type,
Expression<?>[]... args)
Create a new MappingProjection instance
|
| Modifier and Type | Method and Description |
|---|---|
<R,C> R |
accept(Visitor<R,C> v,
C context)
Accept the visitor with the given context
|
java.util.List<Expression<?>> |
getArgs()
Get the invocation arguments
|
protected abstract T |
map(Tuple row)
Creates a result object from the given row.
|
T |
newInstance(java.lang.Object... values)
Create a projection with the given arguments
|
equals, skipNullsgetType, hashCode, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetTypepublic MappingProjection(java.lang.Class<? super T> type, Expression<?>... args)
type - args - public MappingProjection(java.lang.Class<? super T> type, Expression<?>[]... args)
type - args - public T newInstance(java.lang.Object... values)
FactoryExpressionvalues - row argumentsprotected abstract T map(Tuple row)
row - The row to mappublic java.util.List<Expression<?>> getArgs()
FactoryExpressionpublic <R,C> R accept(Visitor<R,C> v, @Nullable C context)
ExpressionR - return typeC - context typev - visitorcontext - context of visitCopyright © 2007–2021 Querydsl. All rights reserved.