public interface JPQLStatementResolutionContext extends JPQLResolutionContext
JPQLResolutionContext extension which supports statement alias generation and inspection.| Modifier and Type | Interface and Description |
|---|---|
static class |
JPQLStatementResolutionContext.AliasMode
Alias handling mode
|
JPQLResolutionContext.JPQLStatementPreparationException| Modifier and Type | Method and Description |
|---|---|
static JPQLStatementResolutionContext |
asChild(JPQLResolutionContext parent,
com.holonplatform.core.datastore.relational.RelationalTarget<?> rootTarget,
JPQLStatementResolutionContext.AliasMode aliasMode)
Create a new
JPQLStatementResolutionContext as a child of given JPQLResolutionContext. |
static JPQLStatementResolutionContext |
create(JpaContext context,
com.holonplatform.core.datastore.relational.RelationalTarget<?> rootTarget,
JPQLStatementResolutionContext.AliasMode aliasMode)
Create a new default
JPQLStatementResolutionContext. |
Optional<String> |
getAlias(com.holonplatform.core.Path<?> path,
boolean useParentContext)
Get the given
path alias, if available and alias mode is not JPQLStatementResolutionContext.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
JPQLStatementResolutionContext.AliasMode.UNSUPPORTED. |
com.holonplatform.core.datastore.relational.RelationalTarget<?> |
getRootTarget()
Get the root target.
|
addNamedParameter, childContext, create, getContextSequence, getNamedParametersHandler, getParent, isJPQLResolutionContext, isStatementCompositionContext, resolve, resolveOrFail, setupQueryParametersgetDialect, getEntityManagerFactory, getORMPlatform, getValueDeserializer, getValueSerializer, trace, traceOperationresolvecom.holonplatform.core.datastore.relational.RelationalTarget<?> getRootTarget()
Optional<String> getRootAlias()
JPQLStatementResolutionContext.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 JPQLStatementResolutionContext.AliasMode.AUTO.
Optional<String> getAlias(com.holonplatform.core.Path<?> path, boolean useParentContext)
path alias, if available and alias mode is not JPQLStatementResolutionContext.AliasMode.UNSUPPORTED.
The alias will be the explicit alias name if the path is Aliasable, or an auto generated name if alias
mode is JPQLStatementResolutionContext.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 JPQLStatementResolutionContext create(JpaContext context, com.holonplatform.core.datastore.relational.RelationalTarget<?> rootTarget, JPQLStatementResolutionContext.AliasMode aliasMode)
JPQLStatementResolutionContext.context - JPA context to use (not null)rootTarget - Root target (not null)aliasMode - Alias handling mode (not null)JPQLStatementResolutionContextstatic JPQLStatementResolutionContext asChild(JPQLResolutionContext parent, com.holonplatform.core.datastore.relational.RelationalTarget<?> rootTarget, JPQLStatementResolutionContext.AliasMode aliasMode)
JPQLStatementResolutionContext as a child of given JPQLResolutionContext.parent - Parent context (not null)rootTarget - Root target (not null)aliasMode - Alias handling mode (not null)JPQLStatementResolutionContextCopyright © 2019 The Holon Platform. All rights reserved.