public static class StandardDialect.StandardExpressionFunctions extends java.lang.Object implements ExpressionFunctions
ExpressionFunctions.| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
defaultReplacement
the default replacement string for wild card characters
|
protected java.util.regex.Pattern |
defaultWildcardReplacementPattern
the default pattern for escape wild card characters
|
protected char |
escapeChar
the escape character for the SQL LIKE operator
|
protected char[] |
wildcards
the wild card characters for the SQL LIKE operator
|
| Modifier | Constructor and Description |
|---|---|
protected |
StandardExpressionFunctions() |
protected |
StandardExpressionFunctions(char[] wildcards) |
protected |
StandardExpressionFunctions(char escapeChar,
char[] wildcards) |
protected |
StandardExpressionFunctions(char escapeChar,
char[] wildcards,
java.util.regex.Pattern defaultWildcardReplacementPattern,
java.lang.String defaultReplacement) |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String |
createWildcardReplacement(char escapeChar)
Create the replacement string that replaces wild card characters.
|
protected java.util.regex.Pattern |
createWildcardReplacementPattern(char escapeChar,
char[] wildcards)
Creates the regular expression pattern that is represents the wild card characters .
|
java.lang.String |
escape(java.lang.CharSequence text)
Escapes the SQL LIKE wild card characters in a target string by using the default escape
character.
|
java.lang.String |
escape(java.lang.CharSequence text,
char escapeChar)
Escapes the SQL LIKE wild card characters in a target string by using a specified escape
character.
|
protected java.lang.String |
escapeWildcard(java.lang.CharSequence input,
char escapeChar)
Escapes wild card characters.
|
protected java.lang.String |
escapeWildcard(java.util.regex.Pattern pattern,
java.lang.CharSequence input,
java.lang.String replacement)
Escapes wild card characters with the regular expression.
|
java.lang.String |
infix(java.lang.CharSequence text)
Escapes the SQL LIKE wild card characters in a target string by using the default escape
character '$' and generate a text to perform a infix search for the SQL LIKE operator.
|
java.lang.String |
infix(java.lang.CharSequence text,
char escapeChar)
Escapes the SQL LIKE wild card characters in a target string by using a specified escape
character and generate a text to perform a infix search for the SQL LIKE operator.
|
boolean |
isBlank(java.lang.CharSequence charSequence)
Whether a text is blank.
|
boolean |
isEmpty(java.lang.CharSequence charSequence)
Whether a text is empty.
|
boolean |
isNotBlank(java.lang.CharSequence charSequence)
Whether a text is not blank.
|
boolean |
isNotEmpty(java.lang.CharSequence charSequence)
Whether a text is not empty.
|
protected java.util.Calendar |
makeRoundedDownCalendar(java.util.Date date) |
protected java.util.Calendar |
makeRoundedDownClandar(java.util.Date date)
Deprecated.
Use
makeRoundedDownCalendar(java.util.Date) instead |
protected java.util.Calendar |
makeRoundedUpCalendar(java.util.Date date) |
protected java.util.Calendar |
makeRoundedUpClandar(java.util.Date date)
Deprecated.
Use
makeRoundedUpCalendar(java.util.Date) instead |
java.lang.String |
prefix(java.lang.CharSequence text)
Escapes the SQL LIKE wild card characters in a target string by using the default escape
character '$' and generate a text to perform a prefix search for the SQL Like operator.
|
java.lang.String |
prefix(java.lang.CharSequence text,
char escapeChar)
Escapes the SQL LIKE wild card characters in a target string by using a specified escape
character and generate a text to perform a prefix search for the SQL LIKE operator.
|
java.util.Date |
roundDownTimePart(java.util.Date date)
Round down a time part of
Date. |
java.sql.Date |
roundDownTimePart(java.sql.Date date)
Round down a time part of
Date. |
java.time.LocalDateTime |
roundDownTimePart(java.time.LocalDateTime localDateTime)
Round down a time part of
LocalDateTime. |
java.sql.Timestamp |
roundDownTimePart(java.sql.Timestamp timestamp)
Round down a time part of
Timestamp. |
java.util.Date |
roundUpTimePart(java.util.Date date)
Round up a time part of
Date. |
java.sql.Date |
roundUpTimePart(java.sql.Date date)
Round up a time part of
Date. |
java.time.LocalDate |
roundUpTimePart(java.time.LocalDate localDate)
Return the next day.
|
java.time.LocalDateTime |
roundUpTimePart(java.time.LocalDateTime localDateTime)
Round up a time part of
LocalDateTime. |
java.sql.Timestamp |
roundUpTimePart(java.sql.Timestamp timestamp)
Round up a time part of
Timestamp. |
java.lang.String |
suffix(java.lang.CharSequence text)
Escapes the SQL LIKE wild card characters in a target string by using the default escape
character '$' and generate a text to perform a suffix search for the SQL LIKE operator.
|
java.lang.String |
suffix(java.lang.CharSequence text,
char escapeChar)
Escapes the SQL LIKE wild card characters in a target string by using a specified escape
character and generate a text to perform a suffix search for the SQL LIKE operator.
|
protected final char escapeChar
protected final char[] wildcards
protected final java.util.regex.Pattern defaultWildcardReplacementPattern
protected final java.lang.String defaultReplacement
protected StandardExpressionFunctions()
protected StandardExpressionFunctions(char[] wildcards)
wildcards - the wild card characters for the SQL LIKE operatorprotected StandardExpressionFunctions(char escapeChar,
char[] wildcards)
escapeChar - the escape character for the SQL LIKE operatorwildcards - the wild card characters for the SQL LIKE operatorprotected StandardExpressionFunctions(char escapeChar,
char[] wildcards,
java.util.regex.Pattern defaultWildcardReplacementPattern,
java.lang.String defaultReplacement)
escapeChar - the escape character for the SQL LIKE operatorwildcards - the wild card characters for the SQL LIKE operatordefaultWildcardReplacementPattern - the default pattern for escape wild card charactersdefaultReplacement - the default replacement string for wild card characterspublic java.lang.String escape(java.lang.CharSequence text,
char escapeChar)
ExpressionFunctionsescape in interface ExpressionFunctionstext - the target textescapeChar - the escape characterpublic java.lang.String escape(java.lang.CharSequence text)
ExpressionFunctionsFor example, a%b_ is converted to the a a$%b$_.
escape in interface ExpressionFunctionstext - the target textpublic java.lang.String prefix(java.lang.CharSequence text)
ExpressionFunctionsFor example, a%b_ is converted to the a a$%b$_%.
prefix in interface ExpressionFunctionstext - the prefix textpublic java.lang.String prefix(java.lang.CharSequence text,
char escapeChar)
ExpressionFunctionsprefix in interface ExpressionFunctionstext - the prefixed textescapeChar - the escape characterpublic java.lang.String suffix(java.lang.CharSequence text)
ExpressionFunctionsFor example, a%b_ is converted to the a %a$%b$_.
suffix in interface ExpressionFunctionstext - the suffix textpublic java.lang.String suffix(java.lang.CharSequence text,
char escapeChar)
ExpressionFunctionssuffix in interface ExpressionFunctionstext - the suffix textescapeChar - the escape characterpublic java.lang.String infix(java.lang.CharSequence text)
ExpressionFunctionsFor example, a%b_ is converted to the a %a$%b$_%.
infix in interface ExpressionFunctionstext - the infix textpublic java.lang.String infix(java.lang.CharSequence text,
char escapeChar)
ExpressionFunctionsinfix in interface ExpressionFunctionstext - the infix textescapeChar - the escape characterprotected java.lang.String escapeWildcard(java.lang.CharSequence input,
char escapeChar)
input - the target string for escapingescapeChar - the escape characterprotected java.lang.String escapeWildcard(java.util.regex.Pattern pattern,
java.lang.CharSequence input,
java.lang.String replacement)
pattern - the regular expression patterninput - the target string for escapingreplacement - the replacement stringpublic java.util.Date roundDownTimePart(java.util.Date date)
ExpressionFunctionsDate.roundDownTimePart in interface ExpressionFunctionsdate - the target datepublic java.sql.Date roundDownTimePart(java.sql.Date date)
ExpressionFunctionsDate.roundDownTimePart in interface ExpressionFunctionsdate - the target datepublic java.sql.Timestamp roundDownTimePart(java.sql.Timestamp timestamp)
ExpressionFunctionsTimestamp.roundDownTimePart in interface ExpressionFunctionstimestamp - the target timestamppublic java.time.LocalDateTime roundDownTimePart(java.time.LocalDateTime localDateTime)
ExpressionFunctionsLocalDateTime.roundDownTimePart in interface ExpressionFunctionslocalDateTime - the target localDateTimeprotected java.util.Calendar makeRoundedDownCalendar(java.util.Date date)
@Deprecated protected java.util.Calendar makeRoundedDownClandar(java.util.Date date)
makeRoundedDownCalendar(java.util.Date) insteaddate - the datepublic java.util.Date roundUpTimePart(java.util.Date date)
ExpressionFunctionsDate.roundUpTimePart in interface ExpressionFunctionsdate - the target datepublic java.sql.Date roundUpTimePart(java.sql.Date date)
ExpressionFunctionsDate.roundUpTimePart in interface ExpressionFunctionsdate - the target datepublic java.sql.Timestamp roundUpTimePart(java.sql.Timestamp timestamp)
ExpressionFunctionsTimestamp.roundUpTimePart in interface ExpressionFunctionstimestamp - the target timestamppublic java.time.LocalDate roundUpTimePart(java.time.LocalDate localDate)
ExpressionFunctionsroundUpTimePart in interface ExpressionFunctionslocalDate - the target localDatepublic java.time.LocalDateTime roundUpTimePart(java.time.LocalDateTime localDateTime)
ExpressionFunctionsLocalDateTime.roundUpTimePart in interface ExpressionFunctionslocalDateTime - the target localDateTimeprotected java.util.Calendar makeRoundedUpCalendar(java.util.Date date)
@Deprecated protected java.util.Calendar makeRoundedUpClandar(java.util.Date date)
makeRoundedUpCalendar(java.util.Date) insteaddate - the dateprotected java.util.regex.Pattern createWildcardReplacementPattern(char escapeChar,
char[] wildcards)
escapeChar - the escape characterwildcards - the wild card characterprotected java.lang.String createWildcardReplacement(char escapeChar)
escapeChar - the escape characterpublic boolean isEmpty(java.lang.CharSequence charSequence)
ExpressionFunctionsisEmpty in interface ExpressionFunctionscharSequence - the target texttrue if the text is null or its length is 0, else falsepublic boolean isNotEmpty(java.lang.CharSequence charSequence)
ExpressionFunctionsisNotEmpty in interface ExpressionFunctionscharSequence - the target textfalse if the text is null or its length is 0, else truepublic boolean isBlank(java.lang.CharSequence charSequence)
ExpressionFunctionsisBlank in interface ExpressionFunctionscharSequence - the target texttrue if the text is null, its length is 0 or the text contains
only blank characters, else false.public boolean isNotBlank(java.lang.CharSequence charSequence)
ExpressionFunctionsisNotBlank in interface ExpressionFunctionscharSequence - the target textfalse if the text is null, its length is 0 or the text contains
only blank characters, else true.