Top Description Constructors Methods
org.hibernate.dialect.function

public Class LpadRpadPadEmulation

extends AbstractSqmFunctionDescriptor
Class Inheritance
Imports
org.hibernate.query.ReturnableType, org.hibernate.query.sqm.TrimSpec, org.hibernate.query.spi.QueryEngine, org.hibernate.query.sqm.function.AbstractSqmFunctionDescriptor, .SelfRenderingSqmFunction, org.hibernate.query.sqm.produce.function.ArgumentTypesValidator, .StandardArgumentsValidators, .StandardFunctionArgumentTypeResolvers, .StandardFunctionReturnTypeResolvers, org.hibernate.query.sqm.tree.SqmTypedNode, org.hibernate.query.sqm.tree.expression.SqmTrimSpecification, org.hibernate.type.StandardBasicTypes, org.hibernate.type.spi.TypeConfiguration, java.util.List

HQL function inspired by the ANSI SQL trim function, with a funny syntax involving a TrimSpec. Emulated using rpad() and lpad() or by equivalent emulations of those functions.

For example, pad(text with 5 leading ' ').

Author
Gavin King

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
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
Inherited from org.hibernate.query.sqm.function.AbstractSqmFunctionDescriptor:
generateAggregateSqmExpressiongenerateOrderedSetAggregateSqmExpressiongenerateSqmAggregateFunctionExpressiongenerateSqmExpressiongenerateSqmOrderedSetAggregateFunctionExpressiongenerateSqmWindowFunctionExpressiongenerateWindowSqmExpressiongetArgumentsValidatorgetArgumentTypeResolvergetNamegetReturnSignaturegetReturnTypeResolvergetSignature

Constructor Detail

LpadRpadPadEmulationback to summary
public LpadRpadPadEmulation(TypeConfiguration typeConfiguration)

Method Detail

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