Package javax.jdo.query
Interface StringExpression
-
- All Superinterfaces:
ComparableExpression<String>
,Expression<String>
public interface StringExpression extends ComparableExpression<String>
Representation of a string in a query.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringExpression
add(String str)
Method to return an expression for this string added to the passed expression (String concatenation).StringExpression
add(Expression expr)
Method to return an expression for this expression added to the passed expression (String concatenation).CharacterExpression
charAt(int pos)
Method to return an expression for the character at a position of this string expression.CharacterExpression
charAt(NumericExpression<Integer> pos)
Method to return an expression for the character at a position of this string expression.BooleanExpression
endsWith(String str)
Method returning an expression for whether this string expression ends with the passed string expression.BooleanExpression
endsWith(StringExpression expr)
Method returning an expression for whether this string expression ends with the passed string expression.BooleanExpression
equalsIgnoreCase(String str)
Method returning an expression for whether this string expression is equal to (ignoring case) the passed string.BooleanExpression
equalsIgnoreCase(StringExpression expr)
Method returning an expression for whether this string expression is equal to (ignoring case) the passed string expression.NumericExpression<Integer>
indexOf(String str)
Method to return an expression for the position of the passed string in this string.NumericExpression<Integer>
indexOf(String str, int pos)
Method to return an expression for the position of the passed string in this string after a position.NumericExpression<Integer>
indexOf(String str, NumericExpression<Integer> pos)
Method to return an expression for the position of the passed string in this string after a position.NumericExpression<Integer>
indexOf(StringExpression expr)
Method to return an expression for the position of the passed string in this string.NumericExpression<Integer>
indexOf(StringExpression expr, int pos)
Method to return an expression for the position of the passed string in this string after a position.NumericExpression<Integer>
indexOf(StringExpression expr, NumericExpression<Integer> pos)
Method to return an expression for the position of the passed string in this string after a position.NumericExpression<Integer>
length()
Method returning a expression for the length of this string.BooleanExpression
matches(String str)
Method to return an expression for whether this string expression matches the provided string.BooleanExpression
matches(StringExpression expr)
Method to return an expression for whether this string expression matches the provided expression.BooleanExpression
startsWith(String str)
Method returning an expression for whether this string expression starts with the passed string.BooleanExpression
startsWith(String str, int pos)
Method returning an expression for whether this string expression starts with the passed string.BooleanExpression
startsWith(String str, NumericExpression<Integer> pos)
Method returning an expression for whether this string expression starts with the passed string.BooleanExpression
startsWith(StringExpression expr)
Method returning an expression for whether this string expression starts with the passed string expression.BooleanExpression
startsWith(StringExpression expr, int pos)
Method returning an expression for whether this string expression starts with the passed string expression.BooleanExpression
startsWith(StringExpression expr, NumericExpression<Integer> pos)
Method returning an expression for whether this string expression starts with the passed string expression.StringExpression
substring(int pos)
Method to return an expression for the substring of this string expression.StringExpression
substring(int startPos, int endPos)
Method to return an expression for the substring of this string expression.StringExpression
substring(NumericExpression<Integer> pos)
Method to return an expression for the substring of this string expression.StringExpression
substring(NumericExpression<Integer> startPos, NumericExpression<Integer> endPos)
Method to return an expression for the substring of this string expression.StringExpression
toLowerCase()
Method to return a StringExpression representing this string expression in lower case.StringExpression
toUpperCase()
Method to return a StringExpression representing this string expression in upper case.StringExpression
trim()
Method returning a string expression with whitespace trimmed from start and end.-
Methods inherited from interface javax.jdo.query.ComparableExpression
asc, desc, gt, gt, gteq, gteq, lt, lt, lteq, lteq, max, min
-
Methods inherited from interface javax.jdo.query.Expression
as, cast, count, countDistinct, eq, eq, instanceOf, ne, ne
-
-
-
-
Method Detail
-
add
StringExpression add(Expression expr)
Method to return an expression for this expression added to the passed expression (String concatenation).- Parameters:
expr
- The other expression- Returns:
- The summation
-
add
StringExpression add(String str)
Method to return an expression for this string added to the passed expression (String concatenation).- Parameters:
str
- The other string- Returns:
- The summation
-
charAt
CharacterExpression charAt(int pos)
Method to return an expression for the character at a position of this string expression.- Parameters:
pos
- The position- Returns:
- Expression for the character
-
charAt
CharacterExpression charAt(NumericExpression<Integer> pos)
Method to return an expression for the character at a position of this string expression.- Parameters:
pos
- The position- Returns:
- Expression for the character
-
endsWith
BooleanExpression endsWith(StringExpression expr)
Method returning an expression for whether this string expression ends with the passed string expression.- Parameters:
expr
- The expression that it ends with.- Returns:
- Whether it ends with the other string
-
endsWith
BooleanExpression endsWith(String str)
Method returning an expression for whether this string expression ends with the passed string expression.- Parameters:
str
- The string that it ends with.- Returns:
- Whether it ends with the other string
-
equalsIgnoreCase
BooleanExpression equalsIgnoreCase(StringExpression expr)
Method returning an expression for whether this string expression is equal to (ignoring case) the passed string expression.- Parameters:
expr
- The expression- Returns:
- Whether they are equal
-
equalsIgnoreCase
BooleanExpression equalsIgnoreCase(String str)
Method returning an expression for whether this string expression is equal to (ignoring case) the passed string.- Parameters:
str
- The string- Returns:
- Whether they are equal
-
indexOf
NumericExpression<Integer> indexOf(StringExpression expr)
Method to return an expression for the position of the passed string in this string.- Parameters:
expr
- The other string- Returns:
- Expression for the position of the passed string
-
indexOf
NumericExpression<Integer> indexOf(String str)
Method to return an expression for the position of the passed string in this string.- Parameters:
str
- The other string- Returns:
- Expression for the position of the passed string
-
indexOf
NumericExpression<Integer> indexOf(StringExpression expr, NumericExpression<Integer> pos)
Method to return an expression for the position of the passed string in this string after a position.- Parameters:
expr
- The other stringpos
- Start point of the search- Returns:
- Expression for the position of the passed string
-
indexOf
NumericExpression<Integer> indexOf(String str, NumericExpression<Integer> pos)
Method to return an expression for the position of the passed string in this string after a position.- Parameters:
str
- The other stringpos
- Start point of the search- Returns:
- Expression for the position of the passed string
-
indexOf
NumericExpression<Integer> indexOf(String str, int pos)
Method to return an expression for the position of the passed string in this string after a position.- Parameters:
str
- The other stringpos
- Start point of the search- Returns:
- Expression for the position of the passed string
-
indexOf
NumericExpression<Integer> indexOf(StringExpression expr, int pos)
Method to return an expression for the position of the passed string in this string after a position.- Parameters:
expr
- The other stringpos
- Start point of the search- Returns:
- Expression for the position of the passed string
-
length
NumericExpression<Integer> length()
Method returning a expression for the length of this string.- Returns:
- Expression for the length
-
matches
BooleanExpression matches(StringExpression expr)
Method to return an expression for whether this string expression matches the provided expression.- Parameters:
expr
- The expression to match against- Returns:
- Whether this expression matches the provided expression
-
matches
BooleanExpression matches(String str)
Method to return an expression for whether this string expression matches the provided string.- Parameters:
str
- String literal to match against- Returns:
- Whether this expression matches the provided string
-
startsWith
BooleanExpression startsWith(StringExpression expr)
Method returning an expression for whether this string expression starts with the passed string expression.- Parameters:
expr
- The expression that it starts with.- Returns:
- Whether it starts with the other string
-
startsWith
BooleanExpression startsWith(String str)
Method returning an expression for whether this string expression starts with the passed string.- Parameters:
str
- The string that it starts with.- Returns:
- Whether it starts with the other string
-
startsWith
BooleanExpression startsWith(StringExpression expr, int pos)
Method returning an expression for whether this string expression starts with the passed string expression.- Parameters:
expr
- The expression that it starts with.pos
- The position to start from- Returns:
- Whether it starts with the other string
-
startsWith
BooleanExpression startsWith(String str, int pos)
Method returning an expression for whether this string expression starts with the passed string.- Parameters:
str
- The string that it starts with.pos
- The position to start from- Returns:
- Whether it starts with the other string
-
startsWith
BooleanExpression startsWith(StringExpression expr, NumericExpression<Integer> pos)
Method returning an expression for whether this string expression starts with the passed string expression.- Parameters:
expr
- The expression that it starts with.pos
- The position to start from- Returns:
- Whether it starts with the other string
-
startsWith
BooleanExpression startsWith(String str, NumericExpression<Integer> pos)
Method returning an expression for whether this string expression starts with the passed string.- Parameters:
str
- The string that it starts with.pos
- The position to start from- Returns:
- Whether it starts with the other string
-
substring
StringExpression substring(NumericExpression<Integer> pos)
Method to return an expression for the substring of this string expression.- Parameters:
pos
- The position of the start point of the substring- Returns:
- Expression for the substring
-
substring
StringExpression substring(int pos)
Method to return an expression for the substring of this string expression.- Parameters:
pos
- The position of the start point of the substring- Returns:
- Expression for the substring
-
substring
StringExpression substring(NumericExpression<Integer> startPos, NumericExpression<Integer> endPos)
Method to return an expression for the substring of this string expression.- Parameters:
startPos
- The position of the start point of the substring (inclusive, origin 0)endPos
- The position of the end point of the substring (exclusive, origin 0)- Returns:
- Expression for the substring
-
substring
StringExpression substring(int startPos, int endPos)
Method to return an expression for the substring of this string expression.- Parameters:
startPos
- The position of the start point of the substring (inclusive, origin 0)endPos
- The position of the end point of the substring (exclusive, origin 0)- Returns:
- Expression for the substring
-
toLowerCase
StringExpression toLowerCase()
Method to return a StringExpression representing this string expression in lower case.- Returns:
- The lower case expression
-
toUpperCase
StringExpression toUpperCase()
Method to return a StringExpression representing this string expression in upper case.- Returns:
- The upper case expression
-
trim
StringExpression trim()
Method returning a string expression with whitespace trimmed from start and end.- Returns:
- String expression with whitespace trimmed
-
-