Class SelfRenderingFunctionSqlAstExpression<T>
java.lang.Object
org.hibernate.query.sqm.function.SelfRenderingFunctionSqlAstExpression<T>
- All Implemented Interfaces:
JdbcMappingContainer, SqlExpressible, org.hibernate.query.sqm.sql.internal.DomainResultProducer<T>, SqlSelectionProducer, Expression, FunctionExpression, SelfRenderingExpression, SqlAstNode
- Direct Known Subclasses:
SelfRenderingAggregateFunctionSqlAstExpression, SelfRenderingWindowFunctionSqlAstExpression
public class SelfRenderingFunctionSqlAstExpression<T>
extends Object
implements SelfRenderingExpression, SqlExpressible, org.hibernate.query.sqm.sql.internal.DomainResultProducer<T>, FunctionExpression
Representation of a function call in the SQL AST for impls that know how to
render themselves.
-
Constructor Summary
ConstructorsConstructorDescriptionSelfRenderingFunctionSqlAstExpression(String functionName, FunctionRenderer renderer, List<? extends SqlAstNode> sqlAstArguments, @Nullable ReturnableType<T> type, @Nullable JdbcMappingContainer expressible) -
Method Summary
Modifier and TypeMethodDescriptionvoidapplySqlSelections(DomainResultCreationState creationState) createDomainResult(String resultVariable, DomainResultCreationState creationState) createSqlSelection(int jdbcPosition, int valuesArrayPosition, JavaType javaType, boolean virtual, TypeConfiguration typeConfiguration) Create a SqlSelection for the given JDBC ResultSet positionintforEachJdbcType(int offset, org.hibernate.internal.util.IndexedConsumer<JdbcMapping> action) Visit each JdbcMapping starting from the given offsetList<? extends SqlAstNode> The type for this expressionAnything that is expressible at the SQL AST level would be of basic type.voidrenderToSql(SqlAppender sqlAppender, SqlAstTranslator<?> walker, SessionFactoryImplementor sessionFactory) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Expression
createDomainResultSqlSelection, getColumnReferenceMethods inherited from interface JdbcMappingContainer
forEachJdbcType, getJdbcTypeCount, getSingleJdbcMappingMethods inherited from interface SelfRenderingExpression
acceptMethods inherited from interface SqlExpressible
getJdbcMapping
-
Constructor Details
-
SelfRenderingFunctionSqlAstExpression
public SelfRenderingFunctionSqlAstExpression(String functionName, FunctionRenderer renderer, List<? extends SqlAstNode> sqlAstArguments, @Nullable ReturnableType<T> type, @Nullable JdbcMappingContainer expressible)
-
-
Method Details
-
getFunctionName
- Specified by:
getFunctionNamein interfaceFunctionExpression
-
getArguments
- Specified by:
getArgumentsin interfaceFunctionExpression
-
getExpressionType
Description copied from interface:ExpressionThe type for this expression- Specified by:
getExpressionTypein interfaceExpression
-
createSqlSelection
public SqlSelection createSqlSelection(int jdbcPosition, int valuesArrayPosition, JavaType javaType, boolean virtual, TypeConfiguration typeConfiguration) Description copied from interface:SqlSelectionProducerCreate a SqlSelection for the given JDBC ResultSet position- Specified by:
createSqlSelectionin interfaceExpression- Specified by:
createSqlSelectionin interfaceSqlSelectionProducer- Parameters:
jdbcPosition- The index position used to read values from JDBCvaluesArrayPosition- The position in our "current JDBC values array"javaType- The descriptor for the Java type to read the value asvirtual- Whether the select is virtual or real. SeeSqlSelection.isVirtual()typeConfiguration- The associated TypeConfiguration
-
createDomainResult
public DomainResult<T> createDomainResult(String resultVariable, DomainResultCreationState creationState) - Specified by:
createDomainResultin interfaceorg.hibernate.query.sqm.sql.internal.DomainResultProducer<T>
-
renderToSql
public void renderToSql(SqlAppender sqlAppender, SqlAstTranslator<?> walker, SessionFactoryImplementor sessionFactory) - Specified by:
renderToSqlin interfaceSelfRenderingExpression
-
getJdbcMapping
Description copied from interface:SqlExpressibleAnything that is expressible at the SQL AST level would be of basic type.- Specified by:
getJdbcMappingin interfaceSqlExpressible
-
applySqlSelections
- Specified by:
applySqlSelectionsin interfaceorg.hibernate.query.sqm.sql.internal.DomainResultProducer<T>
-
forEachJdbcType
public int forEachJdbcType(int offset, org.hibernate.internal.util.IndexedConsumer<JdbcMapping> action) Description copied from interface:JdbcMappingContainerVisit each JdbcMapping starting from the given offset- Specified by:
forEachJdbcTypein interfaceJdbcMappingContainer
-