com.mysema.query.types
Class MappingProjection<T>
java.lang.Object
com.mysema.query.types.ExpressionBase<T>
com.mysema.query.types.MappingProjection<T>
- Type Parameters:
T
- expression type
- All Implemented Interfaces:
- Expression<T>, FactoryExpression<T>, Serializable
public abstract class MappingProjection<T>
- extends ExpressionBase<T>
- implements FactoryExpression<T>
Projection template that allows implementing arbitrary mapping of rows to result objects.
- See Also:
- Serialized Form
Method Summary |
|
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 |
MappingProjection
public MappingProjection(Class<? super T> type,
Expression<?>... args)
MappingProjection
public MappingProjection(Class<? super T> type,
Expression<?>[]... args)
newInstance
public T newInstance(Object... values)
- Description copied from interface:
FactoryExpression
- Create a projection with the given arguments
- Specified by:
newInstance
in interface FactoryExpression<T>
- Returns:
map
protected abstract T map(Tuple row)
- Creates a result object from the given row.
- Parameters:
row
- The row to map
- Returns:
- The result object
getArgs
public List<Expression<?>> getArgs()
- Description copied from interface:
FactoryExpression
- Get the invocation arguments
- Specified by:
getArgs
in interface FactoryExpression<T>
- Returns:
accept
public <R,C> R accept(Visitor<R,C> v,
@Nullable
C context)
- Description copied from interface:
Expression
- Accept the visitor with the given context
- Specified by:
accept
in interface Expression<T>
- Type Parameters:
R
- return typeC
- context type- Parameters:
v
- visitorcontext
- context of visit
- Returns:
Copyright © 2007-2011 Mysema Ltd. All Rights Reserved.