Package org.hibernate.query.sqm.function
Class MultipatternSqmFunctionDescriptor
- java.lang.Object
-
- org.hibernate.query.sqm.function.AbstractSqmFunctionDescriptor
-
- org.hibernate.query.sqm.function.MultipatternSqmFunctionDescriptor
-
- All Implemented Interfaces:
SqmFunctionDescriptor
public class MultipatternSqmFunctionDescriptor extends AbstractSqmFunctionDescriptor
Support for overloaded functions defined in terms of a list of patterns, one for each possible function arity.- See Also:
PatternBasedSqmFunctionDescriptor
-
-
Constructor Summary
Constructors Constructor Description MultipatternSqmFunctionDescriptor(String name, SqmFunctionDescriptor[] functions, BasicType<?> type, TypeConfiguration typeConfiguration, FunctionParameterType... parameterTypes)
Construct an instance with the given function templates where the position of each function template in the given array corresponds to the arity of the function template.MultipatternSqmFunctionDescriptor(String name, SqmFunctionDescriptor[] functions, TypeConfiguration typeConfiguration, FunctionParameterType... parameterTypes)
Construct an instance with the given function templates where the position of each function template in the given array corresponds to the arity of the function template.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.String
getArgumentListSignature()
SqmFunctionDescriptor
getFunction(int argumentCount)
void
setArgumentListSignature(String argumentListSignature)
-
Methods inherited from class org.hibernate.query.sqm.function.AbstractSqmFunctionDescriptor
generateAggregateSqmExpression, generateOrderedSetAggregateSqmExpression, generateSqmAggregateFunctionExpression, generateSqmExpression, generateSqmOrderedSetAggregateFunctionExpression, generateSqmWindowFunctionExpression, generateWindowSqmExpression, 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.SqmFunctionDescriptor
alwaysIncludesParentheses, generateSqmExpression, generateSqmExpression, getFunctionKind
-
-
-
-
Constructor Detail
-
MultipatternSqmFunctionDescriptor
public MultipatternSqmFunctionDescriptor(String name, SqmFunctionDescriptor[] functions, BasicType<?> type, TypeConfiguration typeConfiguration, FunctionParameterType... parameterTypes)
Construct an instance with the given function templates where the position of each function template in the given array corresponds to the arity of the function template. The array must be padded with leading nulls where there is no overloaded form corresponding to lower arities.- Parameters:
name
-functions
- the function templates to delegate to,type
-
-
MultipatternSqmFunctionDescriptor
public MultipatternSqmFunctionDescriptor(String name, SqmFunctionDescriptor[] functions, TypeConfiguration typeConfiguration, FunctionParameterType... parameterTypes)
Construct an instance with the given function templates where the position of each function template in the given array corresponds to the arity of the function template. The array must be padded with leading nulls where there is no overloaded form corresponding to lower arities.- Parameters:
name
-functions
- the function templates to delegate to,
-
-
Method Detail
-
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
-
getArgumentListSignature
public String getArgumentListSignature()
- Overrides:
getArgumentListSignature
in classAbstractSqmFunctionDescriptor
-
setArgumentListSignature
public void setArgumentListSignature(String argumentListSignature)
-
getFunction
public SqmFunctionDescriptor getFunction(int argumentCount)
-
-