Package org.hibernate.query.sqm.function
Class AbstractSqmSetReturningFunctionDescriptor
java.lang.Object
org.hibernate.query.sqm.function.AbstractSqmSetReturningFunctionDescriptor
- All Implemented Interfaces:
SqmSetReturningFunctionDescriptor
- Direct Known Subclasses:
AbstractSqmSelfRenderingSetReturningFunctionDescriptor
@Incubating
public abstract class AbstractSqmSetReturningFunctionDescriptor
extends Object
implements SqmSetReturningFunctionDescriptor
- Since:
- 7.0
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractSqmSetReturningFunctionDescriptor
(String name, @Nullable ArgumentsValidator argumentsValidator, SetReturningFunctionTypeResolver typeResolver) AbstractSqmSetReturningFunctionDescriptor
(String name, @Nullable ArgumentsValidator argumentsValidator, SetReturningFunctionTypeResolver typeResolver, @Nullable FunctionArgumentTypeResolver argumentTypeResolver) AbstractSqmSetReturningFunctionDescriptor
(String name, SetReturningFunctionTypeResolver typeResolver) -
Method Summary
Modifier and TypeMethodDescriptionfinal <T> SelfRenderingSqmSetReturningFunction<T>
generateSqmExpression
(List<? extends SqmTypedNode<?>> arguments, QueryEngine queryEngine) Instantiate this template with the given arguments and.protected abstract <T> SelfRenderingSqmSetReturningFunction<T>
generateSqmSetReturningFunctionExpression
(List<? extends SqmTypedNode<?>> arguments, QueryEngine queryEngine) Return an SQM node or subtree representing an invocation of this function with the given arguments.The object responsible for validating arguments of the function.getName()
getSignature
(String name) Used only for pretty-printing the function signature in the log.
-
Constructor Details
-
AbstractSqmSetReturningFunctionDescriptor
public AbstractSqmSetReturningFunctionDescriptor(String name, SetReturningFunctionTypeResolver typeResolver) -
AbstractSqmSetReturningFunctionDescriptor
public AbstractSqmSetReturningFunctionDescriptor(String name, @Nullable ArgumentsValidator argumentsValidator, SetReturningFunctionTypeResolver typeResolver) -
AbstractSqmSetReturningFunctionDescriptor
public AbstractSqmSetReturningFunctionDescriptor(String name, @Nullable ArgumentsValidator argumentsValidator, SetReturningFunctionTypeResolver typeResolver, @Nullable FunctionArgumentTypeResolver argumentTypeResolver)
-
-
Method Details
-
getName
-
getSignature
Description copied from interface:SqmSetReturningFunctionDescriptor
Used only for pretty-printing the function signature in the log.- Specified by:
getSignature
in interfaceSqmSetReturningFunctionDescriptor
- Parameters:
name
- the function name- Returns:
- the signature of the function
-
getArgumentsValidator
Description copied from interface:SqmSetReturningFunctionDescriptor
The object responsible for validating arguments of the function.- Specified by:
getArgumentsValidator
in interfaceSqmSetReturningFunctionDescriptor
- Returns:
- an instance of
ArgumentsValidator
-
getSetReturningTypeResolver
-
getArgumentTypeResolver
-
getArgumentListSignature
-
generateSqmExpression
public final <T> SelfRenderingSqmSetReturningFunction<T> generateSqmExpression(List<? extends SqmTypedNode<?>> arguments, QueryEngine queryEngine) Description copied from interface:SqmSetReturningFunctionDescriptor
Instantiate this template with the given arguments and. This produces a tree of SQM nodes representing a tree of function invocations. This allows a single HQL function to be defined in terms of other predefined (database independent) HQL functions, simplifying the task of writing HQL functions which are portable between databases.- Specified by:
generateSqmExpression
in interfaceSqmSetReturningFunctionDescriptor
-
generateSqmSetReturningFunctionExpression
protected abstract <T> SelfRenderingSqmSetReturningFunction<T> generateSqmSetReturningFunctionExpression(List<? extends SqmTypedNode<?>> arguments, QueryEngine queryEngine) 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.- Parameters:
arguments
- the arguments of the function invocation
-