R
- Projection result typepublic interface SQLProjection<R>
extends com.holonplatform.core.TypedExpression<R>
Expression
which represents a SQL query projection, providing the selection labels and an optional
SQLResultConverter
.Modifier and Type | Interface and Description |
---|---|
static interface |
SQLProjection.MutableSQLProjection<R>
A mutable
SQLProjection to configure selection expressions and converter. |
Modifier and Type | Method and Description |
---|---|
static <R> SQLProjection.MutableSQLProjection<R> |
create(Class<? extends R> projectionType)
Create a new
SQLProjection . |
static <R> SQLProjection.MutableSQLProjection<R> |
create(Class<? extends R> projectionType,
int aliasMainSequence)
Create a new
SQLProjection . |
static <R> SQLProjection.MutableSQLProjection<R> |
create(Class<? extends R> projectionType,
SQLCompositionContext context)
Create a new
SQLProjection . |
Optional<SQLResultConverter<R>> |
getConverter()
Get the SQL result converter to be used with this projection, if available.
|
List<String> |
getSelection()
Get the projection selection names.
|
Optional<String> |
getSelectionAlias(String selection)
Get the alias for given projection selection name, if defined.
|
List<String> getSelection()
Optional<String> getSelectionAlias(String selection)
selection
- Selection nameOptional<SQLResultConverter<R>> getConverter()
SQLResultConverter
static <R> SQLProjection.MutableSQLProjection<R> create(Class<? extends R> projectionType)
SQLProjection
.R
- Projection typeprojectionType
- Projection type (not null)SQLProjection.MutableSQLProjection
builder to configure selection and converterstatic <R> SQLProjection.MutableSQLProjection<R> create(Class<? extends R> projectionType, int aliasMainSequence)
SQLProjection
.R
- Projection typeprojectionType
- Projection type (not null)aliasMainSequence
- Generated alias main sequence, which will be appended to any generated selection alias
nameSQLProjection.MutableSQLProjection
builder to configure selection and converterstatic <R> SQLProjection.MutableSQLProjection<R> create(Class<? extends R> projectionType, SQLCompositionContext context)
SQLProjection
.R
- Projection typeprojectionType
- Projection type (not null)context
- SQL context from which to obtain the generated alias main sequence, which will be appended to any
generated selection alias nameSQLProjection.MutableSQLProjection
builder to configure selection and converterCopyright © 2019 The Holon Platform. All rights reserved.