Top Description Fields Constructors Methods
org.hibernate.query.sqm.function

public Class MultipatternSqmFunctionDescriptor

extends AbstractSqmFunctionDescriptor
Class Inheritance
Imports
org.hibernate.query.ReturnableType, org.hibernate.query.spi.QueryEngine, org.hibernate.query.sqm.produce.function.ArgumentTypesValidator, .FunctionParameterType, .StandardArgumentsValidators, org.hibernate.query.sqm.tree.SqmTypedNode, org.hibernate.type.BasicType, org.hibernate.type.spi.TypeConfiguration, java.util.List

Support for overloaded functions defined in terms of a list of patterns, one for each possible function arity.
Author
Gavin King
See Also
PatternBasedSqmFunctionDescriptor

Field Summary

Modifier and TypeField and Description
private String
private SqmFunctionDescriptor[]

Constructor Summary

AccessConstructor and Description
public
MultipatternSqmFunctionDescriptor(String name, SqmFunctionDescriptor[]
the function templates to delegate to,
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.

public
MultipatternSqmFunctionDescriptor(String name, SqmFunctionDescriptor[]
the function templates to delegate to,
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

Modifier and TypeMethod and Description
private static int
protected <T> SelfRenderingSqmFunction<T>
generateSqmFunctionExpression(List<? extends SqmTypedNode<?>>
the arguments of the function invocation
arguments
,
ReturnableType<T>
the function return type as inferred from its usage
impliedResultType
,
QueryEngine queryEngine)

Implements abstract org.hibernate.query.sqm.function.AbstractSqmFunctionDescriptor.generateSqmFunctionExpression.

Return an SQM node or subtree representing an invocation of this function with the given arguments.
public String
public SqmFunctionDescriptor
getFunction(int argumentCount)

private static int
public void
setArgumentListSignature(String argumentListSignature)

Inherited from org.hibernate.query.sqm.function.AbstractSqmFunctionDescriptor:
generateAggregateSqmExpressiongenerateOrderedSetAggregateSqmExpressiongenerateSqmAggregateFunctionExpressiongenerateSqmExpressiongenerateSqmOrderedSetAggregateFunctionExpressiongenerateSqmWindowFunctionExpressiongenerateWindowSqmExpressiongetArgumentsValidatorgetArgumentTypeResolvergetNamegetReturnSignaturegetReturnTypeResolvergetSignature

Field Detail

argumentListSignatureback to summary
private String argumentListSignature
functionsback to summary
private SqmFunctionDescriptor[] functions

Constructor Detail

MultipatternSqmFunctionDescriptorback to summary
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
functions:SqmFunctionDescriptor[]

the function templates to delegate to,

MultipatternSqmFunctionDescriptorback to summary
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
functions:SqmFunctionDescriptor[]

the function templates to delegate to,

Method Detail

firstback to summary
private static int first(SqmFunctionDescriptor[] functions)
generateSqmFunctionExpressionback to summary
protected <T> SelfRenderingSqmFunction<T> generateSqmFunctionExpression(List<? extends SqmTypedNode<?>> arguments, ReturnableType<T> impliedResultType, QueryEngine queryEngine)

Implements abstract org.hibernate.query.sqm.function.AbstractSqmFunctionDescriptor.generateSqmFunctionExpression.

Doc from org.hibernate.query.sqm.function.AbstractSqmFunctionDescriptor.generateSqmFunctionExpression.

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:List<? extends SqmTypedNode<?>>

the arguments of the function invocation

impliedResultType:ReturnableType<T>

the function return type as inferred from its usage

Annotations
@Override
getArgumentListSignatureback to summary
public String getArgumentListSignature()

Overrides org.hibernate.query.sqm.function.AbstractSqmFunctionDescriptor.getArgumentListSignature.

Annotations
@Override
getFunctionback to summary
public SqmFunctionDescriptor getFunction(int argumentCount)
lastback to summary
private static int last(SqmFunctionDescriptor[] functions)
setArgumentListSignatureback to summary
public void setArgumentListSignature(String argumentListSignature)