Class StringExpression
- All Implemented Interfaces:
Expression<String>,Serializable
- Direct Known Subclasses:
StringOperation,StringPath,StringTemplate
StringExpression represents String expressions- Author:
- tiwe
- See Also:
-
Field Summary
Fields inherited from class com.querydsl.core.types.dsl.DslExpression
hashCode, mixin -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionappend(Expression<String> str) Create aconcat(this, str)expressionCreate aconcat(this, str)expressionCreate an alias for the expressionCreate an alias for the expressioncharAt(int i) Create athis.charAt(i)expressioncharAt(Expression<Integer> i) Create athis.charAt(i)expressioncoalesce(Expression<?>... exprs) Create acoalesce(this, exprs...)expressioncoalesce(Expression<String> expr) Create acoalesce(this, expr)expressionCreate acoalesce(this, arg)expressionCreate acoalesce(this, args...)expressionconcat(Expression<String> str) Create aconcat(this, str)expressionCreate aconcat(this, str)expressioncontains(Expression<String> str) Create athis.contains(str)expressionCreate athis.contains(str)expressionCreate athis.containsIgnoreCase(str)expressioncontainsIgnoreCase(String str) Create athis.containsIgnoreCase(str)expressionendsWith(Expression<String> str) Create athis.endsWith(str)expressionCreate athis.endsWith(str)expressionCreate athis.endsWithIgnoreCase(str)expressionendsWithIgnoreCase(String str) Create athis.endsWithIgnoreCase(str)expressionequalsIgnoreCase(Expression<String> str) Create athis.equalsIgnoreCase(str)expressionequalsIgnoreCase(String str) Create athis.equalsIgnoreCase(str)expressionindexOf(Expression<String> str) Create athis.indexOf(str)expressionindexOf(Expression<String> str, int i) Create athis.indexOf(str)expressionCreate athis.indexOf(str)expressionCreate athis.indexOf(str, i)expressionisEmpty()Create athis.isEmpty()expressionCreate a!this.isEmpty()expressionlength()Create athis.length()expressionlike(Expression<String> str) Create athis like strexpressionlike(Expression<String> str, char escape) Create athis like strexpressionCreate athis like strexpressionCreate athis like strexpressionlikeIgnoreCase(Expression<String> str) Create athis like strexpression ignoring caselikeIgnoreCase(Expression<String> str, char escape) Create athis like strexpression ignoring caselikeIgnoreCase(String str) Create athis like strexpression ignoring caselikeIgnoreCase(String str, char escape) Create athis like strexpression ignoring caselocate(Expression<String> str) Create alocate(str, this)expressionlocate(Expression<String> str, NumberExpression<Integer> start) Create alocate(str, this, start)expressionCreate alocate(str, this)expressionCreate alocate(str, this, start)expressionlocate(String str, Expression<Integer> start) Create alocate(str, this, start)expressionlower()Create athis.toLowerCase()expressionmatches(Expression<String> regex) Create athis.matches(regex)expressionCreate athis.matches(regex)expressionmax()Create amax(this)expressionmin()Create amin(this)expressionCreate a!this.equalsIgnoreCase(str)expressionCreate a!this.equalsIgnoreCase(str)expressionnotLike(Expression<String> str) Create athis not like strexpressionnotLike(Expression<String> str, char escape) Create athis not like strexpressionCreate athis not like strexpressionCreate athis not like strexpressionnullif(Expression<String> other) Create anullif(this, other)expressionCreate anullif(this, other)expressionprepend(Expression<String> str) Create aconcat(str, this)expressionCreate aconcat(str, this)expressionstartsWith(Expression<String> str) Create athis.startsWith(str)expressionstartsWith(String str) Create athis.startsWith(str)expressionCreate athis.startsWithIgnoreCase(str)expressionCreate athis.startsWithIgnoreCase(str)expressionCreate a cast to String expressionsubstring(int beginIndex) Create athis.substring(beginIndex)expressionsubstring(int beginIndex, int endIndex) Create athis.substring(beginIndex, endIndex)expressionsubstring(int beginIndex, Expression<Integer> endIndex) Create athis.substring(beginIndex, endIndex)expressionsubstring(Expression<Integer> beginIndex) Create athis.substring(beginIndex)expressionsubstring(Expression<Integer> beginIndex, int endIndex) Create athis.substring(beginIndex, endIndex)expressionsubstring(Expression<Integer> beginIndex, Expression<Integer> endIndex) Create athis.substring(beginIndex, endIndex)expressionCreate athis.toLowerCase()expressionCreate athis.toUpperCase()expressiontrim()Create athis.trim()expressionupper()Create athis.toUpperCase()expressionMethods inherited from class com.querydsl.core.types.dsl.LiteralExpression
castToNumMethods inherited from class com.querydsl.core.types.dsl.ComparableExpression
between, between, goe, goe, goeAll, goeAll, goeAny, goeAny, gt, gt, gtAll, gtAll, gtAny, gtAny, loe, loe, loeAll, loeAll, loeAny, loeAny, lt, lt, ltAll, ltAll, ltAny, ltAny, notBetween, notBetweenMethods inherited from class com.querydsl.core.types.dsl.ComparableExpressionBase
asc, descMethods inherited from class com.querydsl.core.types.dsl.SimpleExpression
count, countDistinct, eq, eq, eqAll, eqAll, eqAny, eqAny, in, in, in, in, in, isNotNull, isNull, ne, ne, neAll, neAny, notIn, notIn, notIn, notIn, notIn, when, whenMethods inherited from class com.querydsl.core.types.dsl.DslExpression
equals, getType, hashCode, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.querydsl.core.types.Expression
accept
-
Constructor Details
-
StringExpression
-
-
Method Details
-
as
Description copied from class:SimpleExpressionCreate an alias for the expression- Overrides:
asin classComparableExpression<String>- Returns:
- alias expression
-
as
Description copied from class:SimpleExpressionCreate an alias for the expression- Overrides:
asin classComparableExpression<String>- Returns:
- alias expression
-
append
Create aconcat(this, str)expressionGet the concatenation of this and str
- Parameters:
str- string to append- Returns:
- this + str
-
append
Create aconcat(this, str)expressionGet the concatenation of this and str
- Parameters:
str- string to append- Returns:
- this + str
-
charAt
Create athis.charAt(i)expressionGet the character at the given index
- Parameters:
i- zero based index- Returns:
- this.charAt(i)
- See Also:
-
charAt
Create athis.charAt(i)expressionGet the character at the given index
- Parameters:
i- zero based index- Returns:
- this.charAt(i)
- See Also:
-
concat
Create aconcat(this, str)expressionGet the concatenation of this and str
- Parameters:
str- string to append- Returns:
- this + str
-
concat
Create aconcat(this, str)expressionGet the concatenation of this and str
- Parameters:
str- string to append- Returns:
- this + str
-
contains
Create athis.contains(str)expressionReturns true if the given String is contained
- Parameters:
str- string- Returns:
- this.contains(str)
- See Also:
-
contains
Create athis.contains(str)expressionReturns true if the given String is contained
- Parameters:
str- string- Returns:
- this.contains(str)
- See Also:
-
containsIgnoreCase
Create athis.containsIgnoreCase(str)expressionReturns true if the given String is contained, compare case insensitively
- Parameters:
str- string- Returns:
- this.containsIgnoreCase(str) expression
-
containsIgnoreCase
Create athis.containsIgnoreCase(str)expressionReturns true if the given String is contained, compare case insensitively
- Parameters:
str- string- Returns:
- this.containsIgnoreCase(str)
-
endsWith
Create athis.endsWith(str)expressionReturns true if this ends with str
- Parameters:
str- string- Returns:
- this.endsWith(str)
- See Also:
-
endsWithIgnoreCase
Create athis.endsWithIgnoreCase(str)expressionReturns true if this ends with str, compares case insensitively
- Parameters:
str- string- Returns:
- this.endsWithIgnoreCase(str)
-
endsWith
Create athis.endsWith(str)expressionReturns true if this ends with str
- Parameters:
str- string- Returns:
- this.endsWith(str)
- See Also:
-
endsWithIgnoreCase
Create athis.endsWithIgnoreCase(str)expressionReturns true if this ends with str, compares case insensitively
- Parameters:
str- string- Returns:
- this.endsWithIgnoreCase(str)
-
equalsIgnoreCase
Create athis.equalsIgnoreCase(str)expressionCompares this
StringExpressionto anotherStringExpression, ignoring case considerations.- Parameters:
str- string- Returns:
- this.equalsIgnoreCase(str)
- See Also:
-
equalsIgnoreCase
Create athis.equalsIgnoreCase(str)expressionCompares this
StringExpressionto anotherStringExpression, ignoring case considerations.- Parameters:
str- string- Returns:
- this.equalsIgnoreCase(str)
- See Also:
-
indexOf
Create athis.indexOf(str)expressionGet the index of the given substring in this String
- Parameters:
str- string- Returns:
- this.indexOf(str)
- See Also:
-
indexOf
Create athis.indexOf(str)expressionGet the index of the given substring in this String
- Parameters:
str- string- Returns:
- this.indexOf(str)
- See Also:
-
indexOf
Create athis.indexOf(str, i)expressionGet the index of the given substring in this String, starting from the given index
- Parameters:
str- stringi- zero based index- Returns:
- this.indexOf(str, i)
- See Also:
-
indexOf
Create athis.indexOf(str)expressionGet the index of the given substring in this String, starting from the given index
- Parameters:
str- stringi- zero based index- Returns:
- this.indexOf(str)
-
isEmpty
Create athis.isEmpty()expressionReturn true if this String is empty
- Returns:
- this.isEmpty()
- See Also:
-
isNotEmpty
Create a!this.isEmpty()expressionReturn true if this String is not empty
- Returns:
- !this.isEmpty()
- See Also:
-
length
Create athis.length()expressionReturn the length of this String
- Returns:
- this.length()
- See Also:
-
like
Create athis like strexpression- Parameters:
str- string- Returns:
- this like str
-
like
Create athis like strexpression- Parameters:
str- string- Returns:
- this like str
-
likeIgnoreCase
Create athis like strexpression ignoring case- Parameters:
str- string- Returns:
- this like str
-
likeIgnoreCase
Create athis like strexpression ignoring case- Parameters:
str- string- Returns:
- this like str
-
like
Create athis like strexpression- Parameters:
str- string- Returns:
- this like str
-
like
Create athis like strexpression- Parameters:
str- string- Returns:
- this like str
-
likeIgnoreCase
Create athis like strexpression ignoring case- Parameters:
str- stringescape- escape character- Returns:
- this like string
-
likeIgnoreCase
Create athis like strexpression ignoring case- Parameters:
str- stringescape- escape character- Returns:
- this like string
-
locate
Create alocate(str, this)expressionGet the position of the given String in this String, the first position is 1
- Parameters:
str- string- Returns:
- locate(str, this)
-
locate
Create alocate(str, this)expressionGet the position of the given String in this String, the first position is 1
- Parameters:
str- string- Returns:
- locate(str, this)
-
locate
Create alocate(str, this, start)expressionGet the position of the given String in this String, the first position is 1
- Parameters:
str- stringstart- start- Returns:
- locate(str, this, start)
-
locate
Create alocate(str, this, start)expressionGet the position of the given String in this String, the first position is 1
- Parameters:
str- stringstart- start- Returns:
- locate(str, this, start)
-
locate
Create alocate(str, this, start)expressionGet the position of the given String in this String, the first position is 1
- Parameters:
str- stringstart- start- Returns:
- locate(str, this, start)
-
lower
Create athis.toLowerCase()expressionGet the lower case form
- Returns:
- this.toLowerCase()
- See Also:
-
matches
Create athis.matches(regex)expressionReturn true if this String matches the given regular expression
Some implementations such as Querydsl JPA will try to convert a regex expression into like form and will throw an Exception when this fails
- Parameters:
regex- regular expression- Returns:
- this.matches(right)
- See Also:
-
matches
Create athis.matches(regex)expressionReturn true if this String matches the given regular expression
Some implementations such as Querydsl JPA will try to convert a regex expression into like form and will throw an Exception when this fails
- Parameters:
regex- regular expression- Returns:
- this.matches(regex)
- See Also:
-
max
Create amax(this)expressionGet the maximum value of this expression (aggregation)
- Overrides:
maxin classComparableExpression<String>- Returns:
- max(this)
-
min
Create amin(this)expressionGet the minimum value of this expression (aggregation)
- Overrides:
minin classComparableExpression<String>- Returns:
- min(this)
-
notEqualsIgnoreCase
Create a!this.equalsIgnoreCase(str)expressionCompares this
StringExpressionto anotherStringExpression, ignoring case considerations.- Parameters:
str- string- Returns:
- !this.equalsIgnoreCase(str)
- See Also:
-
notEqualsIgnoreCase
Create a!this.equalsIgnoreCase(str)expressionCompares this
StringExpressionto anotherStringExpression, ignoring case considerations.- Parameters:
str- string- Returns:
- !this.equalsIgnoreCase(str)
- See Also:
-
notLike
Create athis not like strexpression- Parameters:
str- string- Returns:
- this not like str
-
notLike
Create athis not like strexpression- Parameters:
str- string- Returns:
- this not like str
-
notLike
Create athis not like strexpression- Parameters:
str- string- Returns:
- this not like str
-
notLike
Create athis not like strexpression- Parameters:
str- string- Returns:
- this not like str
-
prepend
Create aconcat(str, this)expressionPrepend the given String and return the result
- Parameters:
str- string- Returns:
- str + this
-
prepend
Create aconcat(str, this)expressionPrepend the given String and return the result
- Parameters:
str- string- Returns:
- str + this
-
startsWith
Create athis.startsWith(str)expressionReturn true if this starts with str
- Parameters:
str- string- Returns:
- this.startsWith(str)
- See Also:
-
startsWithIgnoreCase
Create athis.startsWithIgnoreCase(str)expression- Parameters:
str- string- Returns:
- this.startsWithIgnoreCase(str)
-
startsWith
Create athis.startsWith(str)expressionReturn true if this starts with str
- Parameters:
str- string- Returns:
- this.startsWith(str)
- See Also:
-
startsWithIgnoreCase
Create athis.startsWithIgnoreCase(str)expression- Parameters:
str- string- Returns:
- this.startsWithIgnoreCase(str)
-
stringValue
Description copied from class:LiteralExpressionCreate a cast to String expression- Overrides:
stringValuein classLiteralExpression<String>- Returns:
- cast expression
- See Also:
-
substring
Create athis.substring(beginIndex)expression- Parameters:
beginIndex- inclusive start index- Returns:
- this.substring(beginIndex)
- See Also:
-
substring
Create athis.substring(beginIndex, endIndex)expression- Parameters:
beginIndex- inclusive start indexendIndex- exclusive end index- Returns:
- this.substring(beginIndex, endIndex)
- See Also:
-
substring
Create athis.substring(beginIndex, endIndex)expression- Parameters:
beginIndex- inclusive start indexendIndex- exclusive end index- Returns:
- this.substring(beginIndex, endIndex)
- See Also:
-
substring
Create athis.substring(beginIndex, endIndex)expression- Parameters:
beginIndex- inclusive start indexendIndex- exclusive end index- Returns:
- this.substring(beginIndex, endIndex)
- See Also:
-
substring
Create athis.substring(beginIndex)expression- Parameters:
beginIndex- inclusive start index- Returns:
- this.substring(beginIndex)
- See Also:
-
substring
Create athis.substring(beginIndex, endIndex)expression- Parameters:
beginIndex- inclusive start indexendIndex- exclusive end index- Returns:
- this.substring(beginIndex, endIndex)
- See Also:
-
toLowerCase
Create athis.toLowerCase()expressionGet the lower case form
- Returns:
- this.toLowerCase()
- See Also:
-
toUpperCase
Create athis.toUpperCase()expressionGet the upper case form
- Returns:
- this.toUpperCase()
- See Also:
-
trim
Create athis.trim()expressionCreate a copy of the string, with leading and trailing whitespace omitted.
- Returns:
- this.trim()
- See Also:
-
upper
Create athis.toUpperCase()expressionGet the upper case form
- Returns:
- this.toUpperCase()
- See Also:
-
nullif
Create anullif(this, other)expression- Overrides:
nullifin classComparableExpression<String>- Parameters:
other-- Returns:
- nullif(this, other)
-
nullif
Create anullif(this, other)expression- Overrides:
nullifin classComparableExpression<String>- Parameters:
other-- Returns:
- nullif(this, other)
-
coalesce
Create acoalesce(this, expr)expression- Overrides:
coalescein classComparableExpression<String>- Parameters:
expr- additional argument- Returns:
- coalesce
-
coalesce
Create acoalesce(this, exprs...)expression- Overrides:
coalescein classComparableExpression<String>- Parameters:
exprs- additional arguments- Returns:
- coalesce
-
coalesce
Create acoalesce(this, arg)expression- Overrides:
coalescein classComparableExpression<String>- Parameters:
arg- additional argument- Returns:
- coalesce
-
coalesce
Create acoalesce(this, args...)expression- Overrides:
coalescein classComparableExpression<String>- Parameters:
args- additional arguments- Returns:
- coalesce
-