Package org.hibernate.query.sqm.function
Class AbstractSqmSelfRenderingFunctionDescriptor
java.lang.Object
org.hibernate.query.sqm.function.AbstractSqmFunctionDescriptor
org.hibernate.query.sqm.function.AbstractSqmSelfRenderingFunctionDescriptor
- All Implemented Interfaces:
FunctionRenderer
,SqmFunctionDescriptor
- Direct Known Subclasses:
AbstractArrayContainsFunction
,AbstractArrayFillFunction
,AbstractArrayIncludesFunction
,AbstractArrayIntersectsFunction
,AbstractArrayPositionFunction
,AbstractArrayPositionsFunction
,AbstractArrayRemoveFunction
,AbstractArrayTrimFunction
,AbstractJsonArrayAppendFunction
,AbstractJsonArrayInsertFunction
,AbstractJsonInsertFunction
,AbstractJsonMergepatchFunction
,AbstractJsonRemoveFunction
,AbstractJsonReplaceFunction
,AbstractJsonSetFunction
,ArrayAggFunction
,ArrayConcatElementFunction
,ArrayConcatFunction
,ArrayConstructorFunction
,ArrayGetUnnestFunction
,ArrayRemoveIndexUnnestFunction
,ArrayReplaceUnnestFunction
,ArraySetUnnestFunction
,ArraySliceUnnestFunction
,ArrayToStringFunction
,AvgFunction
,CaseLeastGreatestEmulation
,CastFunction
,CastingConcatFunction
,ChrLiteralEmulation
,ConcatPipeFunction
,CountFunction
,CurrentFunction
,DB2PositionFunction
,DB2SubstringFunction
,EveryAnyEmulation
,HypotheticalSetFunction
,InverseDistributionFunction
,JsonArrayAggFunction
,JsonArrayFunction
,JsonExistsFunction
,JsonObjectAggFunction
,JsonObjectFunction
,JsonQueryFunction
,JsonValueFunction
,LengthFunction
,ListaggFunction
,ListaggGroupConcatEmulation
,ListaggStringAggEmulation
,MinMaxCaseEveryAnyEmulation
,NamedSqmFunctionDescriptor
,OracleArrayAggEmulation
,OracleArrayLengthFunction
,OrdinalFunction
,PatternBasedSqmFunctionDescriptor
,PostgreSQLMinMaxFunction
,QuantifiedLeastGreatestEmulation
,SqlColumn
,SqlFunction
,SQLServerEveryAnyEmulation
,TimestampaddFunction
,TimestampdiffFunction
,TrimFunction
,XmlAggFunction
,XmlConcatFunction
,XmlElementFunction
,XmlExistsFunction
,XmlForestFunction
,XmlPiFunction
,XmlQueryFunction
public abstract class AbstractSqmSelfRenderingFunctionDescriptor
extends AbstractSqmFunctionDescriptor
implements FunctionRenderer
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractSqmSelfRenderingFunctionDescriptor
(String name, @Nullable ArgumentsValidator argumentsValidator, @Nullable FunctionReturnTypeResolver returnTypeResolver, @Nullable FunctionArgumentTypeResolver argumentTypeResolver) AbstractSqmSelfRenderingFunctionDescriptor
(String name, FunctionKind functionKind, @Nullable ArgumentsValidator argumentsValidator, @Nullable FunctionReturnTypeResolver returnTypeResolver, @Nullable FunctionArgumentTypeResolver argumentTypeResolver) -
Method Summary
Modifier and TypeMethodDescriptiongenerateSqmAggregateFunctionExpression
(List<? extends SqmTypedNode<?>> arguments, SqmPredicate filter, ReturnableType<T> impliedResultType, QueryEngine queryEngine) Return an SQM node or subtree representing an invocation of this aggregate function with the given arguments.protected <T> SelfRenderingSqmFunction<T>
generateSqmFunctionExpression
(List<? extends SqmTypedNode<?>> arguments, ReturnableType<T> impliedResultType, QueryEngine queryEngine) Return an SQM node or subtree representing an invocation of this function with the given arguments.generateSqmOrderedSetAggregateFunctionExpression
(List<? extends SqmTypedNode<?>> arguments, SqmPredicate filter, SqmOrderByClause withinGroupClause, ReturnableType<T> impliedResultType, QueryEngine queryEngine) Return an SQM node or subtree representing an invocation of this ordered set-aggregate function with the given arguments.protected <T> SelfRenderingSqmWindowFunction<T>
generateSqmWindowFunctionExpression
(List<? extends SqmTypedNode<?>> arguments, SqmPredicate filter, Boolean respectNulls, Boolean fromFirst, ReturnableType<T> impliedResultType, QueryEngine queryEngine) Return an SQM node or subtree representing an invocation of this window function with the given arguments.What sort of function is this?void
render
(SqlAppender sqlAppender, List<? extends SqlAstNode> sqlAstArguments, ReturnableType<?> returnType, SqlAstTranslator<?> walker) Methods inherited from class org.hibernate.query.sqm.function.AbstractSqmFunctionDescriptor
generateAggregateSqmExpression, generateOrderedSetAggregateSqmExpression, generateSqmExpression, generateWindowSqmExpression, getArgumentListSignature, getArgumentsValidator, getArgumentTypeResolver, getName, getReturnSignature, getReturnTypeResolver, getSignature
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.hibernate.query.sqm.function.FunctionRenderer
render, render, render, render
Methods inherited from interface org.hibernate.query.sqm.function.SqmFunctionDescriptor
alwaysIncludesParentheses, generateSqmExpression, generateSqmExpression, isPredicate
-
Constructor Details
-
AbstractSqmSelfRenderingFunctionDescriptor
public AbstractSqmSelfRenderingFunctionDescriptor(String name, @Nullable ArgumentsValidator argumentsValidator, @Nullable FunctionReturnTypeResolver returnTypeResolver, @Nullable FunctionArgumentTypeResolver argumentTypeResolver) -
AbstractSqmSelfRenderingFunctionDescriptor
public AbstractSqmSelfRenderingFunctionDescriptor(String name, FunctionKind functionKind, @Nullable ArgumentsValidator argumentsValidator, @Nullable FunctionReturnTypeResolver returnTypeResolver, @Nullable FunctionArgumentTypeResolver argumentTypeResolver)
-
-
Method Details
-
render
public void render(SqlAppender sqlAppender, List<? extends SqlAstNode> sqlAstArguments, ReturnableType<?> returnType, SqlAstTranslator<?> walker) - Specified by:
render
in interfaceFunctionRenderer
-
getFunctionKind
Description copied from interface:SqmFunctionDescriptor
What sort of function is this?- Specified by:
getFunctionKind
in interfaceSqmFunctionDescriptor
- Returns:
FunctionKind.NORMAL
by default
-
generateSqmFunctionExpression
protected <T> SelfRenderingSqmFunction<T> generateSqmFunctionExpression(List<? extends SqmTypedNode<?>> arguments, ReturnableType<T> impliedResultType, QueryEngine queryEngine) Description copied from class:AbstractSqmFunctionDescriptor
Return an SQM node or subtree representing an invocation of this function with the given arguments. This method may be overridden in the case of function descriptors that wish to customize creation of the node.- Specified by:
generateSqmFunctionExpression
in classAbstractSqmFunctionDescriptor
- Parameters:
arguments
- the arguments of the function invocationimpliedResultType
- the function return type as inferred from its usage
-
generateSqmAggregateFunctionExpression
public <T> SelfRenderingSqmAggregateFunction<T> generateSqmAggregateFunctionExpression(List<? extends SqmTypedNode<?>> arguments, SqmPredicate filter, ReturnableType<T> impliedResultType, QueryEngine queryEngine) Description copied from class:AbstractSqmFunctionDescriptor
Return an SQM node or subtree representing an invocation of this aggregate function with the given arguments. This method may be overridden in the case of function descriptors that wish to customize creation of the node.- Overrides:
generateSqmAggregateFunctionExpression
in classAbstractSqmFunctionDescriptor
- Parameters:
arguments
- the arguments of the function invocationimpliedResultType
- the function return type as inferred from its usage
-
generateSqmOrderedSetAggregateFunctionExpression
public <T> SelfRenderingSqmOrderedSetAggregateFunction<T> generateSqmOrderedSetAggregateFunctionExpression(List<? extends SqmTypedNode<?>> arguments, SqmPredicate filter, SqmOrderByClause withinGroupClause, ReturnableType<T> impliedResultType, QueryEngine queryEngine) Description copied from class:AbstractSqmFunctionDescriptor
Return an SQM node or subtree representing an invocation of this ordered set-aggregate function with the given arguments. This method may be overridden in the case of function descriptors that wish to customize creation of the node.- Overrides:
generateSqmOrderedSetAggregateFunctionExpression
in classAbstractSqmFunctionDescriptor
- Parameters:
arguments
- the arguments of the function invocationimpliedResultType
- the function return type as inferred from its usage
-
generateSqmWindowFunctionExpression
protected <T> SelfRenderingSqmWindowFunction<T> generateSqmWindowFunctionExpression(List<? extends SqmTypedNode<?>> arguments, SqmPredicate filter, Boolean respectNulls, Boolean fromFirst, ReturnableType<T> impliedResultType, QueryEngine queryEngine) Description copied from class:AbstractSqmFunctionDescriptor
Return an SQM node or subtree representing an invocation of this window function with the given arguments. This method may be overridden in the case of function descriptors that wish to customize creation of the node.- Overrides:
generateSqmWindowFunctionExpression
in classAbstractSqmFunctionDescriptor
- Parameters:
arguments
- the arguments of the function invocationimpliedResultType
- the function return type as inferred from its usage
-