Top Description Constructors Methods
org.hibernate.dialect

public Class OracleSqlAstTranslator<T extends org.hibernate.sql.exec.spi.JdbcOperation>

extends SqlAstTranslatorWithUpsert<T extends JdbcOperation>
Class Inheritance
Imports
java.util.ArrayList, .List, org.hibernate.engine.spi.SessionFactoryImplementor, org.hibernate.metamodel.mapping.EmbeddableValuedModelPart, .EntityIdentifierMapping, .EntityMappingType, .JdbcMappingContainer, org.hibernate.query.IllegalQueryOperationException, org.hibernate.query.sqm.ComparisonOperator, .FetchClauseType, .FrameExclusion, .FrameKind, org.hibernate.sql.ast.Clause, org.hibernate.sql.ast.spi.SqlSelection, org.hibernate.sql.ast.tree.Statement, org.hibernate.sql.ast.tree.cte.CteMaterialization, org.hibernate.sql.ast.tree.expression.ColumnReference, .Expression, .FunctionExpression, .Literal, .Over, .SqlTuple, .SqlTupleContainer, .Summarization, org.hibernate.sql.ast.tree.from.FromClause, .FunctionTableReference, .QueryPartTableReference, .TableGroup, .UnionTableGroup, .ValuesTableReference, org.hibernate.sql.ast.tree.insert.InsertSelectStatement, .Values, org.hibernate.sql.ast.tree.predicate.InSubQueryPredicate, org.hibernate.sql.ast.tree.select.QueryGroup, .QueryPart, .QuerySpec, .SelectClause, .SortSpecification, org.hibernate.sql.ast.tree.update.Assignment, org.hibernate.sql.exec.spi.JdbcOperation, org.hibernate.sql.model.ast.ColumnValueBinding, org.hibernate.sql.model.internal.OptionalTableUpdate, org.hibernate.sql.results.internal.SqlSelectionImpl, org.hibernate.type.SqlTypes, org.hibernate.type.descriptor.jdbc.ArrayJdbcType, .JdbcType

A SQL AST translator for Oracle.
Author
Christian Beikov

Constructor Summary

AccessConstructor and Description
public
OracleSqlAstTranslator(SessionFactoryImplementor sessionFactory, Statement statement)

Deprecated as a consequence of SessionFactoryImplementor being deprecated.

Method Summary

Modifier and TypeMethod and Description
private boolean
private QuerySpec
createLockingWrapper(QuerySpec querySpec, Expression offsetExpression, Expression fetchExpression, FetchClauseType fetchClauseType, EntityIdentifierMapping identifierMappingForLockingWrapper)

protected AbstractSqlAstTranslator.LockStrategy
protected String
getFromDual()

Overrides org.hibernate.sql.ast.spi.AbstractSqlAstTranslator.getFromDual.

Some databases require a bit of syntactic noise when there are no tables in the from clause.
protected String
private boolean
private EntityIdentifierMapping
private boolean
private boolean
protected boolean
needsRecursiveKeywordInWithClause()

Overrides org.hibernate.sql.ast.spi.AbstractSqlAstTranslator.needsRecursiveKeywordInWithClause.

Whether the SQL with clause requires the "recursive" keyword for recursive CTEs.
private static QueryPart
protected void
protected void
protected void
protected void
protected void
protected void
protected void
protected boolean
protected boolean
protected boolean
protected boolean
private boolean
protected boolean
supportsRecursiveCycleClause()

Overrides org.hibernate.sql.ast.spi.AbstractSqlAstTranslator.supportsRecursiveCycleClause.

Whether the SQL cycle clause is supported, which can be used for recursive CTEs.
protected boolean
supportsRecursiveSearchClause()

Overrides org.hibernate.sql.ast.spi.AbstractSqlAstTranslator.supportsRecursiveSearchClause.

Whether the SQL search clause is supported, which can be used for recursive CTEs.
protected boolean
supportsRowValueConstructorSyntax()

Overrides org.hibernate.sql.ast.spi.AbstractSqlAstTranslator.supportsRowValueConstructorSyntax.

Is this dialect known to support what ANSI-SQL terms "row value constructor" syntax; sometimes called tuple syntax.
protected boolean
protected boolean
protected boolean
supportsRowValueConstructorSyntaxInQuantifiedPredicates()

Overrides org.hibernate.sql.ast.spi.AbstractSqlAstTranslator.supportsRowValueConstructorSyntaxInQuantifiedPredicates.

Is this dialect known to support what ANSI-SQL terms "row value constructor" syntax; sometimes called tuple syntax with quantified predicates.
protected boolean
protected boolean
supportsWithClauseInSubquery()

Overrides org.hibernate.sql.ast.spi.AbstractSqlAstTranslator.supportsWithClauseInSubquery.

Whether the SQL with clause is supported within a subquery.
public void
public void
public void
public void
public void
public void
protected void
public void
protected void
public void
Inherited from org.hibernate.dialect.SqlAstTranslatorWithUpsert:
createMergeOperationrenderMergeInsertrenderMergeIntorenderMergeOnrenderMergeUpdaterenderMergeUsingwrapMergeSourceExpression

Constructor Detail

OracleSqlAstTranslatorback to summary
public OracleSqlAstTranslator(SessionFactoryImplementor sessionFactory, Statement statement)

Deprecated

as a consequence of SessionFactoryImplementor being deprecated. See corresponding docs for further information.

Method Detail

canApplyLockingWrapperback to summary
private boolean canApplyLockingWrapper(QuerySpec querySpec)
createLockingWrapperback to summary
private QuerySpec createLockingWrapper(QuerySpec querySpec, Expression offsetExpression, Expression fetchExpression, FetchClauseType fetchClauseType, EntityIdentifierMapping identifierMappingForLockingWrapper)
determineLockingStrategyback to summary
protected AbstractSqlAstTranslator.LockStrategy determineLockingStrategy(QuerySpec querySpec, AbstractSqlAstTranslator.ForUpdateClause forUpdateClause, Boolean followOnLocking)

Overrides org.hibernate.sql.ast.spi.AbstractSqlAstTranslator.determineLockingStrategy.

Annotations
@Override
getFromDualback to summary
protected String getFromDual()

Overrides org.hibernate.sql.ast.spi.AbstractSqlAstTranslator.getFromDual.

Doc from org.hibernate.sql.ast.spi.AbstractSqlAstTranslator.getFromDual.

Some databases require a bit of syntactic noise when there are no tables in the from clause.

Returns:String

the SQL equivalent to Oracle's from dual.

Annotations
@Override
getFromDualForSelectOnlyback to summary
protected String getFromDualForSelectOnly()

Overrides org.hibernate.sql.ast.spi.AbstractSqlAstTranslator.getFromDualForSelectOnly.

Annotations
@Override
hasSetOperationsback to summary
private boolean hasSetOperations(QuerySpec querySpec)
identifierMappingForLockingWrapperback to summary
private EntityIdentifierMapping identifierMappingForLockingWrapper(QuerySpec querySpec)
isPartOfQueryGroupback to summary
private boolean isPartOfQueryGroup()
needsLockingWrapperback to summary
private boolean needsLockingWrapper(QuerySpec querySpec)
needsRecursiveKeywordInWithClauseback to summary
protected boolean needsRecursiveKeywordInWithClause()

Overrides org.hibernate.sql.ast.spi.AbstractSqlAstTranslator.needsRecursiveKeywordInWithClause.

Doc from org.hibernate.sql.ast.spi.AbstractSqlAstTranslator.needsRecursiveKeywordInWithClause.

Whether the SQL with clause requires the "recursive" keyword for recursive CTEs.

Annotations
@Override
partIsQueryGroupback to summary
private static QueryPart partIsQueryGroup(final QueryPart part)
renderComparisonback to summary
protected void renderComparison(Expression lhs, ComparisonOperator operator, Expression rhs)

Overrides org.hibernate.sql.ast.spi.AbstractSqlAstTranslator.renderComparison.

Annotations
@Override
renderMergeSourceback to summary
protected void renderMergeSource(OptionalTableUpdate optionalTableUpdate)

Overrides org.hibernate.dialect.SqlAstTranslatorWithUpsert.renderMergeSource.

Annotations
@Override
renderMergeSourceAliasback to summary
protected void renderMergeSourceAlias()

Overrides org.hibernate.dialect.SqlAstTranslatorWithUpsert.renderMergeSourceAlias.

Annotations
@Override
renderMergeTargetAliasback to summary
protected void renderMergeTargetAlias()

Overrides org.hibernate.dialect.SqlAstTranslatorWithUpsert.renderMergeTargetAlias.

Annotations
@Override
renderPartitionItemback to summary
protected void renderPartitionItem(Expression expression)

Overrides org.hibernate.sql.ast.spi.AbstractSqlAstTranslator.renderPartitionItem.

Annotations
@Override
renderRowNumberback to summary
protected void renderRowNumber(SelectClause selectClause, QueryPart queryPart)

Overrides org.hibernate.sql.ast.spi.AbstractSqlAstTranslator.renderRowNumber.

Annotations
@Override
renderSelectTupleComparisonback to summary
protected void renderSelectTupleComparison(List<SqlSelection> lhsExpressions, SqlTuple tuple, ComparisonOperator operator)

Overrides org.hibernate.sql.ast.spi.AbstractSqlAstTranslator.renderSelectTupleComparison.

Annotations
@Override
shouldEmulateFetchClauseback to summary
protected boolean shouldEmulateFetchClause(QueryPart queryPart)
shouldEmulateLateralWithIntersectback to summary
protected boolean shouldEmulateLateralWithIntersect(QueryPart queryPart)

Overrides org.hibernate.sql.ast.spi.AbstractSqlAstTranslator.shouldEmulateLateralWithIntersect.

Annotations
@Override
supportsDuplicateSelectItemsInQueryGroupback to summary
protected boolean supportsDuplicateSelectItemsInQueryGroup()

Overrides org.hibernate.sql.ast.spi.AbstractSqlAstTranslator.supportsDuplicateSelectItemsInQueryGroup.

Annotations
@Override
supportsNestedSubqueryCorrelationback to summary
protected boolean supportsNestedSubqueryCorrelation()

Overrides org.hibernate.sql.ast.spi.AbstractSqlAstTranslator.supportsNestedSubqueryCorrelation.

Annotations
@Override
supportsOffsetFetchClauseback to summary
private boolean supportsOffsetFetchClause()
supportsRecursiveCycleClauseback to summary
protected boolean supportsRecursiveCycleClause()

Overrides org.hibernate.sql.ast.spi.AbstractSqlAstTranslator.supportsRecursiveCycleClause.

Doc from org.hibernate.sql.ast.spi.AbstractSqlAstTranslator.supportsRecursiveCycleClause.

Whether the SQL cycle clause is supported, which can be used for recursive CTEs.

Annotations
@Override
supportsRecursiveSearchClauseback to summary
protected boolean supportsRecursiveSearchClause()

Overrides org.hibernate.sql.ast.spi.AbstractSqlAstTranslator.supportsRecursiveSearchClause.

Doc from org.hibernate.sql.ast.spi.AbstractSqlAstTranslator.supportsRecursiveSearchClause.

Whether the SQL search clause is supported, which can be used for recursive CTEs.

Annotations
@Override
supportsRowValueConstructorSyntaxback to summary
protected boolean supportsRowValueConstructorSyntax()

Overrides org.hibernate.sql.ast.spi.AbstractSqlAstTranslator.supportsRowValueConstructorSyntax.

Doc from org.hibernate.sql.ast.spi.AbstractSqlAstTranslator.supportsRowValueConstructorSyntax.

Is this dialect known to support what ANSI-SQL terms "row value constructor" syntax; sometimes called tuple syntax.

Basically, does it support syntax like ... where (FIRST_NAME, LAST_NAME) = ('Steve', 'Ebersole') ...

Returns:boolean

True if this SQL dialect is known to support "row value constructor" syntax; false otherwise.

Annotations
@Override
supportsRowValueConstructorSyntaxInInListback to summary
protected boolean supportsRowValueConstructorSyntaxInInList()

Overrides org.hibernate.sql.ast.spi.AbstractSqlAstTranslator.supportsRowValueConstructorSyntaxInInList.

Doc from org.hibernate.sql.ast.spi.AbstractSqlAstTranslator.supportsRowValueConstructorSyntaxInInList.

If the dialect supports row values, does it offer such support in IN lists as well?

For example, ... where (FIRST_NAME, LAST_NAME) IN ( (?, ?), (?, ?) ) ...

Returns:boolean

True if this SQL dialect is known to support "row value constructor" syntax in the IN list; false otherwise.

Annotations
@Override
supportsRowValueConstructorSyntaxInInSubQueryback to summary
protected boolean supportsRowValueConstructorSyntaxInInSubQuery()

Overrides org.hibernate.sql.ast.spi.AbstractSqlAstTranslator.supportsRowValueConstructorSyntaxInInSubQuery.

Doc from org.hibernate.sql.ast.spi.AbstractSqlAstTranslator.supportsRowValueConstructorSyntaxInInSubQuery.

If the dialect supports row values, does it offer such support in IN subqueries as well?

For example, ... where (FIRST_NAME, LAST_NAME) IN ( select ... ) ...

Returns:boolean

True if this SQL dialect is known to support "row value constructor" syntax in the IN subqueries; false otherwise.

Annotations
@Override
supportsRowValueConstructorSyntaxInQuantifiedPredicatesback to summary
protected boolean supportsRowValueConstructorSyntaxInQuantifiedPredicates()

Overrides org.hibernate.sql.ast.spi.AbstractSqlAstTranslator.supportsRowValueConstructorSyntaxInQuantifiedPredicates.

Doc from org.hibernate.sql.ast.spi.AbstractSqlAstTranslator.supportsRowValueConstructorSyntaxInQuantifiedPredicates.

Is this dialect known to support what ANSI-SQL terms "row value constructor" syntax; sometimes called tuple syntax with quantified predicates.

Basically, does it support syntax like ... where (FIRST_NAME, LAST_NAME) = ALL (select ...) ...

Returns:boolean

True if this SQL dialect is known to support "row value constructor" syntax with quantified predicates; false otherwise.

Annotations
@Override
supportsSimpleQueryGroupingback to summary
protected boolean supportsSimpleQueryGrouping()

Overrides org.hibernate.sql.ast.spi.AbstractSqlAstTranslator.supportsSimpleQueryGrouping.

Annotations
@Override
supportsWithClauseInSubqueryback to summary
protected boolean supportsWithClauseInSubquery()

Overrides org.hibernate.sql.ast.spi.AbstractSqlAstTranslator.supportsWithClauseInSubquery.

Doc from org.hibernate.sql.ast.spi.AbstractSqlAstTranslator.supportsWithClauseInSubquery.

Whether the SQL with clause is supported within a subquery.

Annotations
@Override
visitFunctionTableReferenceback to summary
public void visitFunctionTableReference(FunctionTableReference tableReference)

Overrides org.hibernate.sql.ast.spi.AbstractSqlAstTranslator.visitFunctionTableReference.

Implements org.hibernate.sql.ast.SqlAstWalker.visitFunctionTableReference.

Annotations
@Override
visitOffsetFetchClauseback to summary
public void visitOffsetFetchClause(QueryPart queryPart)

Overrides org.hibernate.sql.ast.spi.AbstractSqlAstTranslator.visitOffsetFetchClause.

Implements org.hibernate.sql.ast.SqlAstWalker.visitOffsetFetchClause.

Annotations
@Override
visitOverback to summary
public void visitOver(Over<?> over)

Overrides org.hibernate.sql.ast.spi.AbstractSqlAstTranslator.visitOver.

Implements org.hibernate.sql.ast.SqlAstWalker.visitOver.

Annotations
@Override
visitQueryGroupback to summary
public void visitQueryGroup(QueryGroup queryGroup)

Overrides org.hibernate.sql.ast.spi.AbstractSqlAstTranslator.visitQueryGroup.

Implements org.hibernate.sql.ast.SqlAstWalker.visitQueryGroup.

Annotations
@Override
visitQueryPartTableReferenceback to summary
public void visitQueryPartTableReference(QueryPartTableReference tableReference)

Overrides org.hibernate.sql.ast.spi.AbstractSqlAstTranslator.visitQueryPartTableReference.

Implements org.hibernate.sql.ast.SqlAstWalker.visitQueryPartTableReference.

Annotations
@Override
visitQuerySpecback to summary
public void visitQuerySpec(QuerySpec querySpec)

Overrides org.hibernate.sql.ast.spi.AbstractSqlAstTranslator.visitQuerySpec.

Implements org.hibernate.sql.ast.SqlAstWalker.visitQuerySpec.

Annotations
@Override
visitSetAssignmentback to summary
protected void visitSetAssignment(Assignment assignment)

Overrides org.hibernate.sql.ast.spi.AbstractSqlAstTranslator.visitSetAssignment.

Annotations
@Override
visitSqlSelectionback to summary
public void visitSqlSelection(SqlSelection sqlSelection)

Overrides org.hibernate.sql.ast.spi.AbstractSqlAstTranslator.visitSqlSelection.

Implements org.hibernate.sql.ast.SqlAstWalker.visitSqlSelection.

Annotations
@Override
visitValuesListback to summary
protected void visitValuesList(List<Values> valuesList)

Overrides org.hibernate.sql.ast.spi.AbstractSqlAstTranslator.visitValuesList.

Annotations
@Override
visitValuesTableReferenceback to summary
public void visitValuesTableReference(ValuesTableReference tableReference)

Overrides org.hibernate.sql.ast.spi.AbstractSqlAstTranslator.visitValuesTableReference.

Implements org.hibernate.sql.ast.SqlAstWalker.visitValuesTableReference.

Annotations
@Override