public class Projections extends Object
Modifier and Type | Method and Description |
---|---|
static ProjectionExpression |
alias(String field)
Builds a ProjectionExpression which represents a field (with the same alias name).
|
static ProjectionExpression |
alias(String name,
Expression expression)
Builds a ProjectionExpression which assigns an alias to an expression.
|
static Projection |
compose(ProjectionExpression... expressions)
Builds a projection which is composed of a list of projection expressions.
|
static Projection |
exclude(String... fields)
Returns a Projection which represents all the tuples except the given ones.
|
static Projection |
include(String... fields)
Returns a Projection which represents a list of tuple fields.
|
public static Projection include(String... fields)
fields
- List of field names to include in the projection.public static Projection exclude(String... fields)
fields
- List of field names to be excludedpublic static Projection compose(ProjectionExpression... expressions)
expressions
- List of ProjectionExpression to be included in the projectionIllegalArgumentException
- In case of the some alias name is repeated.public static ProjectionExpression alias(String field)
field
- Field namepublic static ProjectionExpression alias(String name, Expression expression)
name
- Name for the aliasexpression
- Expression to be included in the result tuple.Copyright © 2020. All rights reserved.