org.datanucleus.query.typesafe
Interface StringExpression

All Superinterfaces:
ComparableExpression<java.lang.String>, Expression<java.lang.String>
All Known Implementing Classes:
StringExpressionImpl

public interface StringExpression
extends ComparableExpression<java.lang.String>

Representation of a string in a query.


Method Summary
 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 pos)
          Method to return an expression for the character at a position of this string expression.
 BooleanExpression endsWith(java.lang.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(java.lang.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 indexOf(java.lang.String str)
          Method to return an expression for the position of the passed string in this string.
 NumericExpression indexOf(StringExpression expr)
          Method to return an expression for the position of the passed string in this string.
 NumericExpression indexOf(StringExpression expr, int pos)
          Method to return an expression for the position of the passed string in this string after a position.
 NumericExpression indexOf(StringExpression expr, NumericExpression pos)
          Method to return an expression for the position of the passed string in this string after a position.
 NumericExpression indexOf(java.lang.String str, int pos)
          Method to return an expression for the position of the passed string in this string after a position.
 NumericExpression indexOf(java.lang.String str, NumericExpression pos)
          Method to return an expression for the position of the passed string in this string after a position.
 NumericExpression length()
          Method returning a expression for the length of this string.
 BooleanExpression startsWith(java.lang.String str)
          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.
 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 pos)
          Method to return an expression for the substring of this string expression.
 StringExpression substring(NumericExpression startPos, NumericExpression 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 org.datanucleus.query.typesafe.ComparableExpression
asc, desc, gt, gt, gteq, gteq, lt, lt, lteq, lteq, max, min
 
Methods inherited from interface org.datanucleus.query.typesafe.Expression
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

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 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(java.lang.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(java.lang.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 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 indexOf(java.lang.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 indexOf(StringExpression expr,
                          NumericExpression pos)
Method to return an expression for the position of the passed string in this string after a position.

Parameters:
expr - The other string
pos - Start point of the search
Returns:
Expression for the position of the passed string

indexOf

NumericExpression indexOf(java.lang.String str,
                          NumericExpression pos)
Method to return an expression for the position of the passed string in this string after a position.

Parameters:
str - The other string
pos - Start point of the search
Returns:
Expression for the position of the passed string

indexOf

NumericExpression indexOf(java.lang.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 string
pos - Start point of the search
Returns:
Expression for the position of the passed string

indexOf

NumericExpression 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 string
pos - Start point of the search
Returns:
Expression for the position of the passed string

length

NumericExpression length()
Method returning a expression for the length of this string.

Returns:
Expression for the length

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(java.lang.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

substring

StringExpression substring(NumericExpression 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 startPos,
                           NumericExpression 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


Copyright © 2011. All Rights Reserved.