- All Known Implementing Classes:
Db2Dialect.Db2ExpressionFunctions,H212126Dialect.H212126ExpressionFunctions,H214199Dialect.H214199ExpressionFunctions,H2Dialect.H2ExpressionFunctions,HsqldbDialect.HsqldbExpressionFunctions,Mssql2008Dialect.Mssql2008ExpressionFunctions,MssqlDialect.MssqlExpressionFunctions,MysqlDialect.MysqlExpressionFunctions,NullExpressionFunctions,Oracle11Dialect.Oracle11ExpressionFunctions,OracleDialect.OracleExpressionFunctions,PostgresDialect.PostgresExpressionFunctions,SqliteDialect.SqliteExpressionFunctions,StandardDialect.StandardExpressionFunctions
public interface ExpressionFunctions
The aggregation of functions that are available in expressions in SQL templates.
-
Method Summary
Modifier and TypeMethodDescriptionescape(CharSequence text) Escapes the SQL LIKE wild card characters in a target string by using the default escape character.escape(CharSequence text, char escapeChar) Escapes the SQL LIKE wild card characters in a target string by using a specified escape character.infix(CharSequence infix) 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.infix(CharSequence infix, 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.booleanisBlank(CharSequence text) Whether a text is blank.booleanisEmpty(CharSequence text) Whether a text is empty.booleanisNotBlank(CharSequence text) Whether a text is not blank.booleanisNotEmpty(CharSequence text) Whether a text is not empty.prefix(CharSequence prefix) 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.prefix(CharSequence prefix, 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.roundDownTimePart(Date date) Round down a time part ofDate.roundDownTimePart(Timestamp timestamp) Round down a time part ofTimestamp.roundDownTimePart(LocalDateTime localDateTime) Round down a time part ofLocalDateTime.roundDownTimePart(Date date) Round down a time part ofDate.roundUpTimePart(Date date) Round up a time part ofDate.roundUpTimePart(Timestamp timestamp) Round up a time part ofTimestamp.roundUpTimePart(LocalDate localDate) Return the next day.roundUpTimePart(LocalDateTime localDateTime) Round up a time part ofLocalDateTime.roundUpTimePart(Date date) Round up a time part ofDate.suffix(CharSequence suffix) 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.suffix(CharSequence suffix, 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.
-
Method Details
-
escape
Escapes the SQL LIKE wild card characters in a target string by using the default escape character.For example,
a%b_is converted to the aa$%b$_.- Parameters:
text- the target text- Returns:
- the escaped text
-
escape
Escapes the SQL LIKE wild card characters in a target string by using a specified escape character.- Parameters:
text- the target textescapeChar- the escape character- Returns:
- the escaped text
-
prefix
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.For example,
a%b_is converted to the aa$%b$_%.- Parameters:
prefix- the prefix text- Returns:
- the text for a prefix search
-
prefix
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.- Parameters:
prefix- the prefixed textescapeChar- the escape character- Returns:
- the text for a prefix search
-
suffix
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.For example,
a%b_is converted to the a%a$%b$_.- Parameters:
suffix- the suffix text- Returns:
- the text for a suffix search
-
suffix
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.- Parameters:
suffix- the suffix textescapeChar- the escape character- Returns:
- the text for a suffix search
-
infix
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.For example,
a%b_is converted to the a%a$%b$_%.- Parameters:
infix- the infix text- Returns:
- the text for a infix search
-
infix
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.- Parameters:
infix- the infix textescapeChar- the escape character- Returns:
- the text for a infix search
-
roundDownTimePart
Round down a time part ofDate.- Parameters:
date- the target date- Returns:
- the date whose time part is rounded down
-
roundDownTimePart
Round down a time part ofDate.- Parameters:
date- the target date- Returns:
- the date whose time part is rounded down
-
roundDownTimePart
Round down a time part ofTimestamp.- Parameters:
timestamp- the target timestamp- Returns:
- the timestamp whose time part is rounded down
-
roundDownTimePart
Round down a time part ofLocalDateTime.- Parameters:
localDateTime- the target localDateTime- Returns:
- the localDateTime whose time part is rounded down
-
roundUpTimePart
Round up a time part ofDate.- Parameters:
date- the target date- Returns:
- the date whose time part is rounded up
-
roundUpTimePart
Round up a time part ofDate.- Parameters:
date- the target date- Returns:
- the date whose time part is rounded up
-
roundUpTimePart
Round up a time part ofTimestamp.- Parameters:
timestamp- the target timestamp- Returns:
- the timestamp whose time part is rounded up
-
roundUpTimePart
Return the next day.- Parameters:
localDate- the target localDate- Returns:
- the next day
-
roundUpTimePart
Round up a time part ofLocalDateTime.- Parameters:
localDateTime- the target localDateTime- Returns:
- the localDateTime whose time part is rounded up
-
isEmpty
Whether a text is empty.- Parameters:
text- the target text- Returns:
trueif the text isnullor its length is0, elsefalse
-
isNotEmpty
Whether a text is not empty.- Parameters:
text- the target text- Returns:
falseif the text isnullor its length is0, elsetrue
-
isBlank
Whether a text is blank.- Parameters:
text- the target text- Returns:
trueif the text isnull, its length is0or the text contains only blank characters, elsefalse.
-
isNotBlank
Whether a text is not blank.- Parameters:
text- the target text- Returns:
falseif the text isnull, its length is0or the text contains only blank characters, elsetrue.
-