Class AbstractSelfRenderingExpression
java.lang.Object
org.hibernate.dialect.sql.ast.spi.AbstractSelfRenderingExpression
- All Implemented Interfaces:
SqlSelectionProducer, Expression, SelfRenderingExpression, SqlAstNode
@SPI({USE,IMPLEMENT})
public abstract class AbstractSelfRenderingExpression
extends Object
implements SelfRenderingExpression
Supported provider base for a SQL AST expression which renders itself.
The base retains the expression type and owns the SQL AST visitor dispatch.
A provider subclass implements only renderToSql(SqlAppender, SqlAstTranslator, SessionFactoryImplementor). Any state retained by a
subclass should be limited to the request-scoped expression being rendered.
- Since:
- 8.0
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractSelfRenderingExpression(JdbcMappingContainer expressionType) Creates an expression with the given possibly-null mapping type. -
Method Summary
Modifier and TypeMethodDescriptionfinal voidaccept(SqlAstWalker walker) Dispatches this expression toSqlAstWalker.visitSelfRenderingExpression(SelfRenderingExpression).final JdbcMappingContainerReturns the same mapping-type reference supplied during construction.abstract voidrenderToSql(SqlAppender sqlAppender, SqlAstTranslator<?> translator, SessionFactoryImplementor sessionFactory) Renders this expression into the current SQL translation.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Expression
createDomainResultSqlSelection, createSqlSelection, getColumnReference
-
Constructor Details
-
AbstractSelfRenderingExpression
@SPI(IMPLEMENT) protected AbstractSelfRenderingExpression(@Nullable JdbcMappingContainer expressionType) Creates an expression with the given possibly-null mapping type.- Since:
- 8.0
-
-
Method Details
-
getExpressionType
Returns the same mapping-type reference supplied during construction.- Specified by:
getExpressionTypein interfaceExpression- Since:
- 8.0
-
accept
Dispatches this expression toSqlAstWalker.visitSelfRenderingExpression(SelfRenderingExpression).- Specified by:
acceptin interfaceSelfRenderingExpression- Specified by:
acceptin interfaceSqlAstNode- Since:
- 8.0
-
renderToSql
@SPI(IMPLEMENT) public abstract void renderToSql(SqlAppender sqlAppender, SqlAstTranslator<?> translator, SessionFactoryImplementor sessionFactory) Renders this expression into the current SQL translation.
Implementations must append only this expression and must not retain the translator, appender, or session factory after this call returns.
- Specified by:
renderToSqlin interfaceSelfRenderingExpression- Since:
- 8.0
-