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(Class<? super T> type,
Expression<?>... args)
Create a new MappingProjection instance
|
MappingProjection(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
|
List<Expression<?>> |
getArgs()
Get the invocation arguments
|
protected abstract T |
map(Tuple row)
Creates a result object from the given row.
|
T |
newInstance(Object... values)
Create a projection with the given arguments
|
equals, skipNulls
getType, hashCode, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getType
public MappingProjection(Class<? super T> type, Expression<?>... args)
type
- args
- public MappingProjection(Class<? super T> type, Expression<?>[]... args)
type
- args
- public T newInstance(Object... values)
FactoryExpression
values
- row argumentsprotected abstract T map(Tuple row)
row
- The row to mappublic List<Expression<?>> getArgs()
FactoryExpression
public <R,C> R accept(Visitor<R,C> v, @Nullable C context)
Expression
R
- return typeC
- context typev
- visitorcontext
- context of visitCopyright © 2007–2016 Querydsl. All rights reserved.