org.hibernate.dialect.function
Class AnsiTrimEmulationFunction
java.lang.Object
org.hibernate.dialect.function.AnsiTrimEmulationFunction
- SQLFunction
public class AnsiTrimEmulationFunction
extends java.lang.Object
A
SQLFunction
implementation that emulates the ANSI SQL trim function
on dialects which do not support the full definition. However, this function
definition does assume the availability of ltrim, rtrim, and replace functions
which it uses in various combinations to emulate the desired ANSI trim()
functionality.
getReturnType
public Type getReturnType(Type columnType,
Mapping mapping)
throws QueryException
The return type of the function. May be either a concrete type which
is preset, or variable depending upon the type of the first function
argument.
- getReturnType in interface SQLFunction
columnType
- the type of the first argumentmapping
- The mapping source.
- The type to be expected as a return.
hasArguments
public boolean hasArguments()
Does this function have any arguments?
- hasArguments in interface SQLFunction
- True if the function expects to have parameters; false otherwise.
hasParenthesesIfNoArguments
public boolean hasParenthesesIfNoArguments()
If there are no arguments, are parens required?
- hasParenthesesIfNoArguments in interface SQLFunction
- True if a no-arg call of this function requires parentheses.