public interface SQLStatementCompositionContext extends SQLCompositionContext
SQLCompositionContext extension which supports statement alias generation and inspection.| Modifier and Type | Interface and Description |
|---|---|
static class |
SQLStatementCompositionContext.AliasMode
Alias handling mode
|
SQLCompositionContext.SQLStatementPreparationException| Modifier and Type | Method and Description |
|---|---|
static SQLStatementCompositionContext |
asChild(SQLCompositionContext parent,
com.holonplatform.core.datastore.relational.RelationalTarget<?> rootTarget,
SQLStatementCompositionContext.AliasMode aliasMode)
Create a new
SQLStatementCompositionContext as a child of given SQLCompositionContext. |
static SQLStatementCompositionContext |
create(SQLContext context,
com.holonplatform.core.datastore.relational.RelationalTarget<?> rootTarget,
SQLStatementCompositionContext.AliasMode aliasMode)
Create a new default
SQLStatementCompositionContext. |
Optional<String> |
getAlias(com.holonplatform.core.Path<?> path,
boolean useParentContext)
Get the given
path alias, if available and alias mode is not SQLStatementCompositionContext.AliasMode.UNSUPPORTED. |
default Optional<String> |
getAliasOrRoot(com.holonplatform.core.Path<?> path)
Get the given
path alias, falling back to query root alias if not available. |
Optional<String> |
getRootAlias()
Get the query root path (target) alias, if available and alias mode is not
SQLStatementCompositionContext.AliasMode.UNSUPPORTED. |
addNamedParameter, childContext, create, getContextSequence, getNamedParametersHandler, getParent, isSQLCompositionContext, isStatementCompositionContext, prepareStatement, resolve, resolveOrFailgetDialect, getTypeConverter, getValueDeserializer, getValueSerializer, traceresolveOptional<String> getRootAlias()
SQLStatementCompositionContext.AliasMode.UNSUPPORTED.
The alias will be the explicit alias name if the root path is Aliasable, or an auto generated name if
alias mode is SQLStatementCompositionContext.AliasMode.AUTO.
Optional<String> getAlias(com.holonplatform.core.Path<?> path, boolean useParentContext)
path alias, if available and alias mode is not SQLStatementCompositionContext.AliasMode.UNSUPPORTED.
The alias will be the explicit alias name if the path is Aliasable, or an auto generated name if alias
mode is SQLStatementCompositionContext.AliasMode.AUTO.
path - Path for which to get the alias (not null)useParentContext - Whether to check in parent contexts if an alias is available when not available is
current contextdefault Optional<String> getAliasOrRoot(com.holonplatform.core.Path<?> path)
path alias, falling back to query root alias if not available.path - Path for which to get the alias (not null)static SQLStatementCompositionContext create(SQLContext context, com.holonplatform.core.datastore.relational.RelationalTarget<?> rootTarget, SQLStatementCompositionContext.AliasMode aliasMode)
SQLStatementCompositionContext.context - SQL context to use (not null)rootTarget - Root query target (not null)aliasMode - Alias handling mode (not null)SQLStatementCompositionContextstatic SQLStatementCompositionContext asChild(SQLCompositionContext parent, com.holonplatform.core.datastore.relational.RelationalTarget<?> rootTarget, SQLStatementCompositionContext.AliasMode aliasMode)
SQLStatementCompositionContext as a child of given SQLCompositionContext.parent - Parent context (not null)rootTarget - Root query target (not null)aliasMode - Alias handling mode (not null)SQLStatementCompositionContextCopyright © 2019 The Holon Platform. All rights reserved.