|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.hibernate.dialect.function.AbstractAnsiTrimEmulationFunction org.hibernate.dialect.function.AnsiTrimEmulationFunction
public class AnsiTrimEmulationFunction
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.
Field Summary | |
---|---|
static String |
BOTH_SPACE_TRIM_FROM_TEMPLATE
|
static String |
BOTH_SPACE_TRIM_TEMPLATE
|
static String |
BOTH_TRIM_TEMPLATE
A template for the series of calls required to trim non-space chars from both the beginning and the end of text. |
static String |
LEADING_SPACE_TRIM_TEMPLATE
|
static String |
LEADING_TRIM_TEMPLATE
A template for the series of calls required to trim non-space chars from the beginning of text. |
static String |
LTRIM
|
static String |
REPLACE
|
static String |
RTRIM
|
static String |
SPACE_PLACEHOLDER
|
static String |
TRAILING_SPACE_TRIM_TEMPLATE
|
static String |
TRAILING_TRIM_TEMPLATE
A template for the series of calls required to trim non-space chars from the end of text. |
Constructor Summary | |
---|---|
AnsiTrimEmulationFunction()
Constructs a new AnsiTrimEmulationFunction using LTRIM , RTRIM , and REPLACE
respectively. |
|
AnsiTrimEmulationFunction(String ltrimFunctionName,
String rtrimFunctionName,
String replaceFunctionName)
Constructs a trim() emulation function definition using the specified function calls. |
Method Summary | |
---|---|
protected SQLFunction |
resolveBothSpaceTrimFromFunction()
Resolve the function definition which should be used to trim both leading and trailing spaces. |
protected SQLFunction |
resolveBothSpaceTrimFunction()
Resolve the function definition which should be used to trim both leading and trailing spaces. |
protected SQLFunction |
resolveBothTrimFunction()
Resolve the function definition which should be used to trim the specified character from both the beginning (leading) and end (trailing) of the trim source. |
protected SQLFunction |
resolveLeadingSpaceTrimFunction()
Resolve the function definition which should be used to trim leading spaces. |
protected SQLFunction |
resolveLeadingTrimFunction()
Resolve the function definition which should be used to trim the specified character from the beginning (leading) of the trim source. |
protected SQLFunction |
resolveTrailingSpaceTrimFunction()
Resolve the function definition which should be used to trim trailing spaces. |
protected SQLFunction |
resolveTrailingTrimFunction()
Resolve the function definition which should be used to trim the specified character from the end (trailing) of the trim source. |
Methods inherited from class org.hibernate.dialect.function.AbstractAnsiTrimEmulationFunction |
---|
getReturnType, hasArguments, hasParenthesesIfNoArguments, render |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String LTRIM
public static final String RTRIM
public static final String REPLACE
public static final String SPACE_PLACEHOLDER
public static final String LEADING_SPACE_TRIM_TEMPLATE
public static final String TRAILING_SPACE_TRIM_TEMPLATE
public static final String BOTH_SPACE_TRIM_TEMPLATE
public static final String BOTH_SPACE_TRIM_FROM_TEMPLATE
public static final String LEADING_TRIM_TEMPLATE
public static final String TRAILING_TRIM_TEMPLATE
LEADING_TRIM_TEMPLATE
except that here,
instead of left-trimming the added spaces, we right-trim them to remove them from the end of the text.
public static final String BOTH_TRIM_TEMPLATE
LEADING_TRIM_TEMPLATE
except that here we perform both left (leading) and right (trailing) trimming.
Constructor Detail |
---|
public AnsiTrimEmulationFunction()
LTRIM
, RTRIM
, and REPLACE
respectively.
AnsiTrimEmulationFunction(String,String,String)
public AnsiTrimEmulationFunction(String ltrimFunctionName, String rtrimFunctionName, String replaceFunctionName)
ltrimFunctionName
- The left trim function to use.rtrimFunctionName
- The right trim function to use.replaceFunctionName
- The replace function to use.Method Detail |
---|
protected SQLFunction resolveBothSpaceTrimFunction()
resolveBothSpaceTrimFunction
in class AbstractAnsiTrimEmulationFunction
protected SQLFunction resolveBothSpaceTrimFromFunction()
SQLFunction.render(java.util.List, org.hibernate.engine.SessionFactoryImplementor)
processing.
resolveBothSpaceTrimFromFunction
in class AbstractAnsiTrimEmulationFunction
protected SQLFunction resolveLeadingSpaceTrimFunction()
resolveLeadingSpaceTrimFunction
in class AbstractAnsiTrimEmulationFunction
protected SQLFunction resolveTrailingSpaceTrimFunction()
resolveTrailingSpaceTrimFunction
in class AbstractAnsiTrimEmulationFunction
protected SQLFunction resolveBothTrimFunction()
resolveBothTrimFunction
in class AbstractAnsiTrimEmulationFunction
protected SQLFunction resolveLeadingTrimFunction()
resolveLeadingTrimFunction
in class AbstractAnsiTrimEmulationFunction
protected SQLFunction resolveTrailingTrimFunction()
resolveTrailingTrimFunction
in class AbstractAnsiTrimEmulationFunction
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |