com.mysema.query.types.expr
Class StringExpression

java.lang.Object
  extended by com.mysema.query.types.ExpressionBase<T>
      extended by com.mysema.query.types.expr.SimpleExpression<T>
          extended by com.mysema.query.types.expr.ComparableExpressionBase<T>
              extended by com.mysema.query.types.expr.ComparableExpression<String>
                  extended by com.mysema.query.types.expr.StringExpression
All Implemented Interfaces:
Expression<String>, Serializable
Direct Known Subclasses:
PhraseElement, StringOperation, StringPath, StringSubQuery, StringTemplate, TermElement

public abstract class StringExpression
extends ComparableExpression<String>

StringExpression represents String expressions

Author:
tiwe
See Also:
String, Serialized Form

Field Summary
 
Fields inherited from class com.mysema.query.types.expr.SimpleExpression
primitive
 
Fields inherited from class com.mysema.query.types.ExpressionBase
type
 
Constructor Summary
StringExpression()
           
 
Method Summary
 StringExpression append(Expression<String> str)
          Get the concatenation of this and str
 StringExpression append(String str)
          Get the concatenation of this and str
 StringExpression as(Path<String> alias)
          Create an alias for the expression
 StringExpression as(String alias)
          Create an alias for the expression
 SimpleExpression<Character> charAt(Expression<Integer> i)
          Get the character at the given index
 SimpleExpression<Character> charAt(int i)
          Get the character at the given index
 StringExpression concat(Expression<String> str)
          Get the concatenation of this and str
 StringExpression concat(String str)
          Get the concatenation of this and str
 BooleanExpression contains(Expression<String> str)
          Returns true if the given String is contained
 BooleanExpression contains(String str)
          Returns true if the given String is contained
 BooleanExpression containsIgnoreCase(Expression<String> str)
           
 BooleanExpression containsIgnoreCase(String str)
           
 BooleanExpression endsWith(Expression<String> str)
          Returns true if this ends with str
 BooleanExpression endsWith(String str)
          Returns true if this ends with str
 BooleanExpression endsWithIgnoreCase(Expression<String> str)
           
 BooleanExpression endsWithIgnoreCase(String str)
           
 BooleanExpression equalsIgnoreCase(Expression<String> str)
          Compares this EString to another EString, ignoring case considerations.
 BooleanExpression equalsIgnoreCase(String str)
          Compares this EString to another EString, ignoring case considerations.
 NumberExpression<Integer> indexOf(Expression<String> str)
          Get the index of the given substring in this String
 NumberExpression<Integer> indexOf(Expression<String> str, int i)
          Get the index of the given substring in this String, starting from the given index
 NumberExpression<Integer> indexOf(String str)
          Get the index of the given substring in this String
 NumberExpression<Integer> indexOf(String str, int i)
          Get the index of the given substring in this String, starting from the given index
 BooleanExpression isEmpty()
          Return true if this String is empty
 BooleanExpression isNotEmpty()
          Return true if this String is not empty
 NumberExpression<Integer> length()
          Return the length of this String
 BooleanExpression like(String str)
          Expr: this like str
 BooleanExpression like(StringExpression str)
          Expr: this like str
 StringExpression lower()
          Get the lower case form
 BooleanExpression matches(Expression<String> regex)
          Return true if this String matches the given regular expression
 BooleanExpression matches(String regex)
          Return true if this String matches the given regular expression
 StringExpression max()
          Get the maximum value of this expression (aggregation)
 StringExpression min()
          Get the minimum value of this expression (aggregation)
 StringExpression prepend(Expression<String> str)
          Prepend the given String and return the result
 StringExpression prepend(String str)
          Prepend the given String and return the result
 SimpleExpression<String[]> split(String regex)
          Split the given String with regex as the matcher for the separator
 BooleanExpression startsWith(Expression<String> str)
          Return true if this starts with str
 BooleanExpression startsWith(String str)
          Return true if this starts with str
 BooleanExpression startsWithIgnoreCase(Expression<String> str)
           
 BooleanExpression startsWithIgnoreCase(String str)
           
 StringExpression stringValue()
          Get a cast to String expression
 StringExpression substring(int beginIndex)
          Get the given substring
 StringExpression substring(int beginIndex, int endIndex)
          Get the given substring
 StringExpression toLowerCase()
          Get the lower case form
 StringExpression toUpperCase()
          Get the upper case form
 StringExpression trim()
          Get a copy of the string, with leading and trailing whitespace omitted.
 StringExpression upper()
          Get the upper case form
 
Methods inherited from class com.mysema.query.types.expr.ComparableExpression
between, between, goe, goe, gt, gt, loe, loe, lt, lt, notBetween, notBetween
 
Methods inherited from class com.mysema.query.types.expr.ComparableExpressionBase
asc, castToNum, desc
 
Methods inherited from class com.mysema.query.types.expr.SimpleExpression
count, countDistinct, eq, eq, equals, hashCode, in, in, in, isNotNull, isNull, ne, ne, notIn, notIn, notIn, when, when
 
Methods inherited from class com.mysema.query.types.ExpressionBase
getType, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.mysema.query.types.Expression
accept
 

Constructor Detail

StringExpression

public StringExpression()
Method Detail

as

public StringExpression as(Path<String> alias)
Description copied from class: SimpleExpression
Create an alias for the expression

Overrides:
as in class ComparableExpression<String>
Returns:

as

public StringExpression as(String alias)
Description copied from class: SimpleExpression
Create an alias for the expression

Overrides:
as in class ComparableExpression<String>
Returns:

append

public StringExpression append(Expression<String> str)
Get the concatenation of this and str

Parameters:
str -
Returns:
this + str

append

public StringExpression append(String str)
Get the concatenation of this and str

Parameters:
str -
Returns:
this + str

charAt

public SimpleExpression<Character> charAt(Expression<Integer> i)
Get the character at the given index

Parameters:
i -
Returns:
this.charAt(i)
See Also:
String.charAt(int)

charAt

public SimpleExpression<Character> charAt(int i)
Get the character at the given index

Parameters:
i -
Returns:
this.charAt(i)
See Also:
String.charAt(int)

concat

public StringExpression concat(Expression<String> str)
Get the concatenation of this and str

Parameters:
str -
Returns:
this + str

concat

public StringExpression concat(String str)
Get the concatenation of this and str

Parameters:
str -
Returns:
this + str

contains

public BooleanExpression contains(Expression<String> str)
Returns true if the given String is contained

Parameters:
str -
Returns:
this.contains(str)
See Also:
String.contains(CharSequence)

contains

public BooleanExpression contains(String str)
Returns true if the given String is contained

Parameters:
str -
Returns:
this.contains(str)
See Also:
String.contains(CharSequence)

containsIgnoreCase

public BooleanExpression containsIgnoreCase(Expression<String> str)
Parameters:
str -
Returns:

containsIgnoreCase

public BooleanExpression containsIgnoreCase(String str)
Parameters:
str -
Returns:

endsWith

public BooleanExpression endsWith(Expression<String> str)
Returns true if this ends with str

Parameters:
str -
Returns:
this.endsWith(str)
See Also:
String.endsWith(String)

endsWithIgnoreCase

public BooleanExpression endsWithIgnoreCase(Expression<String> str)
Parameters:
str -
Returns:

endsWith

public BooleanExpression endsWith(String str)
Returns true if this ends with str

Parameters:
str -
Returns:
this.endsWith(str)
See Also:
String.endsWith(String)

endsWithIgnoreCase

public BooleanExpression endsWithIgnoreCase(String str)
Parameters:
str -
Returns:

equalsIgnoreCase

public BooleanExpression equalsIgnoreCase(Expression<String> str)
Compares this EString to another EString, ignoring case considerations.

Parameters:
str -
Returns:
this.equalsIgnoreCase(str)
See Also:
String.equalsIgnoreCase(String)

equalsIgnoreCase

public BooleanExpression equalsIgnoreCase(String str)
Compares this EString to another EString, ignoring case considerations.

Parameters:
str -
Returns:
this.equalsIgnoreCase(str)
See Also:
String.equalsIgnoreCase(String)

indexOf

public NumberExpression<Integer> indexOf(Expression<String> str)
Get the index of the given substring in this String

Parameters:
str -
Returns:
this.indexOf(str)
See Also:
String.indexOf(String)

indexOf

public NumberExpression<Integer> indexOf(String str)
Get the index of the given substring in this String

Parameters:
str -
Returns:
this.indexOf(str)
See Also:
String.indexOf(String)

indexOf

public NumberExpression<Integer> indexOf(String str,
                                         int i)
Get the index of the given substring in this String, starting from the given index

Parameters:
str -
i -
Returns:
this.indexOf(str, i)
See Also:
String.indexOf(String, int)

indexOf

public NumberExpression<Integer> indexOf(Expression<String> str,
                                         int i)
Get the index of the given substring in this String, starting from the given index

Parameters:
str -
i -
Returns:

isEmpty

public BooleanExpression isEmpty()
Return true if this String is empty

Returns:
this.isEmpty()
See Also:
String.isEmpty()

isNotEmpty

public BooleanExpression isNotEmpty()
Return true if this String is not empty

Returns:
!this.isEmpty()
See Also:
String.isEmpty()

length

public NumberExpression<Integer> length()
Return the length of this String

Returns:
this.length()
See Also:
String.length()

like

public BooleanExpression like(String str)
Expr: this like str

Parameters:
str -
Returns:

like

public BooleanExpression like(StringExpression str)
Expr: this like str

Parameters:
str -
Returns:

lower

public StringExpression lower()
Get the lower case form

Returns:
this.toLowerCase()
See Also:
String.toLowerCase()

matches

public BooleanExpression matches(Expression<String> regex)
Return true if this String matches the given regular expression

Parameters:
regex -
Returns:
this.matches(right)
See Also:
String.matches(String)

matches

public BooleanExpression matches(String regex)
Return true if this String matches the given regular expression

Parameters:
regex -
Returns:
this.matches(regex)
See Also:
String.matches(String)

max

public StringExpression max()
Get the maximum value of this expression (aggregation)

Returns:
max(this)

min

public StringExpression min()
Get the minimum value of this expression (aggregation)

Returns:
min(this)

prepend

public StringExpression prepend(Expression<String> str)
Prepend the given String and return the result

Parameters:
str -
Returns:
str + this

prepend

public StringExpression prepend(String str)
Prepend the given String and return the result

Parameters:
str -
Returns:
str + this

split

public SimpleExpression<String[]> split(String regex)
Split the given String with regex as the matcher for the separator

Parameters:
regex -
Returns:
this.split(regex)
See Also:
String.split(String)

startsWith

public BooleanExpression startsWith(Expression<String> str)
Return true if this starts with str

Parameters:
str -
Returns:
this.startsWith(str)
See Also:
String.startsWith(String)

startsWithIgnoreCase

public BooleanExpression startsWithIgnoreCase(Expression<String> str)
Parameters:
str -
Returns:

startsWith

public BooleanExpression startsWith(String str)
Return true if this starts with str

Parameters:
str -
Returns:
this.startsWith(str)
See Also:
String.startsWith(String)

startsWithIgnoreCase

public BooleanExpression startsWithIgnoreCase(String str)
Parameters:
str -
Returns:

stringValue

public StringExpression stringValue()
Description copied from class: ComparableExpressionBase
Get a cast to String expression

Overrides:
stringValue in class ComparableExpressionBase<String>
Returns:
See Also:
Object.toString()

substring

public StringExpression substring(int beginIndex)
Get the given substring

Parameters:
beginIndex -
Returns:
this.substring(beginIndex)
See Also:
String.substring(int)

substring

public StringExpression substring(int beginIndex,
                                  int endIndex)
Get the given substring

Parameters:
beginIndex -
endIndex -
Returns:
this.substring(beginIndex, endIndex)
See Also:
String.substring(int, int)

toLowerCase

public StringExpression toLowerCase()
Get the lower case form

Returns:
this.toLowerCase()
See Also:
String.toLowerCase()

toUpperCase

public StringExpression toUpperCase()
Get the upper case form

Returns:
See Also:
String.toUpperCase()

trim

public StringExpression trim()
Get a copy of the string, with leading and trailing whitespace omitted.

Returns:
See Also:
String.trim()

upper

public StringExpression upper()
Get the upper case form

Returns:
See Also:
String.toUpperCase()


Copyright © 2007-2011 Mysema Ltd. All Rights Reserved.