Top Description Fields Constructors Methods
org.hibernate.dialect.function

public Class TrimFunction

extends AbstractSqmSelfRenderingFunctionDescriptor
Class Inheritance
Imports
java.util.Collections, .List, org.hibernate.dialect.Dialect, org.hibernate.query.ReturnableType, org.hibernate.query.sqm.TrimSpec, org.hibernate.query.sqm.function.AbstractSqmSelfRenderingFunctionDescriptor, org.hibernate.query.sqm.produce.function.ArgumentTypesValidator, .FunctionArgumentException, .StandardArgumentsValidators, .StandardFunctionArgumentTypeResolvers, .StandardFunctionReturnTypeResolvers, org.hibernate.query.sqm.produce.function.internal.PatternRenderer, org.hibernate.query.sqm.sql.internal.SqmParameterInterpretation, org.hibernate.sql.ast.SqlAstNodeRenderingMode, .SqlAstTranslator, org.hibernate.sql.ast.spi.SqlAppender, org.hibernate.sql.ast.tree.SqlAstNode, org.hibernate.sql.ast.tree.expression.Expression, .Literal, .TrimSpecification, org.hibernate.type.StandardBasicTypes, org.hibernate.type.descriptor.jdbc.JdbcType, org.hibernate.type.spi.TypeConfiguration

Deprecated

as a consequence of AbstractSqmSelfRenderingFunctionDescriptor being deprecated. See corresponding docs for further information.

ANSI SQL-standard trim() function, which has a funny syntax involving a TrimSpec, and portability is achieved using Dialect#trimPattern(TrimSpec, boolean).

For example, trim(leading ' ' from text).

Author
Gavin King

Field Summary

Modifier and TypeField and Description
private SqlAstNodeRenderingMode
private final Dialect

Constructor Summary

AccessConstructor and Description
public
TrimFunction(Dialect dialect, TypeConfiguration typeConfiguration)

public
TrimFunction(Dialect dialect, TypeConfiguration typeConfiguration, SqlAstNodeRenderingMode argumentRenderingMode)

Method Summary

Modifier and TypeMethod and Description
public String
private static boolean
isWhitespace(SqlAstNode trimCharacter)

public void
Inherited from org.hibernate.query.sqm.function.AbstractSqmSelfRenderingFunctionDescriptor:
generateSqmAggregateFunctionExpressiongenerateSqmFunctionExpressiongenerateSqmOrderedSetAggregateFunctionExpressiongenerateSqmWindowFunctionExpressiongetFunctionKind

Field Detail

argumentRenderingModeback to summary
private SqlAstNodeRenderingMode argumentRenderingMode
dialectback to summary
private final Dialect dialect

Constructor Detail

TrimFunctionback to summary
public TrimFunction(Dialect dialect, TypeConfiguration typeConfiguration)
TrimFunctionback to summary
public TrimFunction(Dialect dialect, TypeConfiguration typeConfiguration, SqlAstNodeRenderingMode argumentRenderingMode)

Method Detail

getArgumentListSignatureback to summary
public String getArgumentListSignature()

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

Annotations
@Override
isWhitespaceback to summary
private static boolean isWhitespace(SqlAstNode trimCharacter)
renderback to summary
public void render(SqlAppender sqlAppender, List<? extends SqlAstNode> sqlAstArguments, ReturnableType<?> returnType, SqlAstTranslator<?> walker)

Overrides org.hibernate.query.sqm.function.AbstractSqmSelfRenderingFunctionDescriptor.render.

Implements org.hibernate.query.sqm.function.FunctionRenderer.render.

Annotations
@Override