Interface Expression
- All Superinterfaces:
OrderByItem
,PredicateOperand
,SelectItem
- All Known Subinterfaces:
Aggregate
,DomainObject
,PathExpression
- All Known Implementing Classes:
AbsExpression
,AbstractDomainObject
,ArrayExpression
,AverageExpression
,BinaryOperatorExpression
,ConcatExpression
,CountExpression
,CurrentTimeExpression
,DistinctExpression
,DividedByExpression
,ElseExpression
,EntryExpression
,FetchPath
,IndexExpression
,JoinPath
,KeyExpression
,LengthExpression
,LiteralExpression
,LocateExpression
,LowerExpression
,MaxExpression
,MinExpression
,MinusExpression
,OperatorPath
,ParameterExpression
,PlusExpression
,QueryDefinitionImpl
,RangeExpression
,RootPath
,SizeExpression
,SquareRootExpression
,SubStringExpression
,SumExpression
,TimesExpression
,TrimExpression
,TypeExpression
,UnaryMinusExpression
,UpperExpression
,ValueExpression
,VarArgsExpression
Instances of this interface can be used either as select list items or as
predicate operands.
-
Method Summary
Modifier and TypeMethodDescriptionabs()
Absolute value.Concatenate a string with other string(s).concat
(Expression... str) Concatenate a string with other string(s).Division.dividedBy
(Expression expr) Division.Create a predicate for testing whether the expression value is a member of the argument list.Create a predicate for testing whether the expression value is a member of the argument list.Create a predicate for testing whether the expression value is a member of the argument list.Create a predicate for testing whether the expression value is a member of the argument list.in
(Expression... params) Create a predicate for testing whether the expression value is a member of the argument list.Create a predicate for testing whether the expression value is a member of a subquery result.isNull()
Create a predicate for testing whether the value of the expression is null.length()
String length This method must be invoked on an expression corresponding to a string.Locate a string contained within the string corresponding to the expression on which the method was invoked.Locate a string contained within the string corresponding to the expression on which the method was invoked, starting at a specified search position.locate
(String str, Expression position) Locate a string contained within the string corresponding to the expression on which the method was invoked, starting at a specified search position.locate
(Expression str) Locate a string contained within the string corresponding to the expression on which the method was invoked.locate
(Expression str, int position) Locate a string contained within the string corresponding to the expression on which the method was invoked, starting at a specified search position.locate
(Expression str, Expression position) Locate a string contained within the string corresponding to the expression on which the method was invoked, starting at a specified search position.lower()
Convert string to lowercase.member
(PathExpression arg) Create a predicate for testing whether the expression is a member of the association or element collection denoted by the path expression.minus()
Unary minus.Subtraction.minus
(Expression expr) Subtraction.mod
(int num) Modulo operation.mod
(Expression expr) Modulo operation.Addition.plus
(Expression expr) Addition.sqrt()
Square root.substring
(int start) Extract a substring starting at specified position through to the end of the string.substring
(int start, int len) Extract a substring.substring
(int start, Expression len) Extract a substring.substring
(Expression start) Extract a substring starting at specified position through to the end of the string.substring
(Expression start, int len) Extract a substring.substring
(Expression start, Expression len) Extract a substring.Multiplication.times
(Expression expr) Multiplication.trim()
Trim leading and trailing blanks.trim
(char c) Trim leading and trailing occurrences of character from the string.Trim occurrences of the character from leading or trailing (or both) positions of the string, as specified by trim spec.trim
(Expression expr) Trim leading and trailing occurrences of character specified by the expression argument from the string.trim
(Expression expr, TrimSpec spec) Trim occurrences of the character specified by the expression argument from leading or trailing (or both) positions of the string, as specified by trim spec.Trim leading, trailing blanks (or both) as specified by trim spec.upper()
Convert string to uppercase.Methods inherited from interface org.apache.openjpa.persistence.query.PredicateOperand
between, between, between, between, between, between, between, between, between, between, between, between, between, equal, equal, equal, equal, equal, equal, equal, equal, greaterEqual, greaterEqual, greaterEqual, greaterEqual, greaterEqual, greaterThan, greaterThan, greaterThan, greaterThan, greaterThan, lessEqual, lessEqual, lessEqual, lessEqual, lessEqual, lessThan, lessThan, lessThan, lessThan, lessThan, like, like, like, like, like, like, notEqual, notEqual, notEqual, notEqual, notEqual, notEqual, notEqual, notEqual
Methods inherited from interface org.apache.openjpa.persistence.query.SelectItem
asc, desc
-
Method Details
-
member
Create a predicate for testing whether the expression is a member of the association or element collection denoted by the path expression. The argument must correspond to a collection-valued association or element collection of like type.- Parameters:
arg
- - a path expression that specifies a collection-valued association or an element collection- Returns:
- conditional predicate
-
isNull
Predicate isNull()Create a predicate for testing whether the value of the expression is null.- Returns:
- conditional predicate
-
in
Create a predicate for testing whether the expression value is a member of the argument list.- Parameters:
strings
-- Returns:
- conditional predicate
-
in
Create a predicate for testing whether the expression value is a member of the argument list.- Parameters:
nums
-- Returns:
- conditional predicate
-
in
Create a predicate for testing whether the expression value is a member of the argument list.- Parameters:
enums
-- Returns:
- conditional predicate
-
in
Create a predicate for testing whether the expression value is a member of the argument list.- Parameters:
classes
-- Returns:
- conditional predicate
-
in
Create a predicate for testing whether the expression value is a member of the argument list.- Parameters:
params
-- Returns:
- conditional predicate
-
in
Create a predicate for testing whether the expression value is a member of a subquery result.- Parameters:
subquery
-- Returns:
- conditional predicate
-
length
Expression length()String length This method must be invoked on an expression corresponding to a string.- Returns:
- expression denoting the length of the string.
-
concat
Concatenate a string with other string(s). This method must be invoked on an expression corresponding to a string.- Parameters:
str
- - string(s)- Returns:
- expression denoting the concatenation of the strings, starting with the string corresponding to the expression on which the method was invoked.
-
concat
Concatenate a string with other string(s). This method must be invoked on an expression corresponding to a string.- Parameters:
str
- - expression(s) corresponding to string(s)- Returns:
- expression denoting the concatenation of the strings, starting with the string corresponding to the expression on which the method was invoked.
-
substring
Extract a substring starting at specified position through to the end of the string. This method must be invoked on an expression corresponding to a string.- Parameters:
start
- - start position (1 indicates first position)- Returns:
- expression denoting the extracted substring
-
substring
Extract a substring starting at specified position through to the end of the string. This method must be invoked on an expression corresponding to a string.- Parameters:
start
- - expression denoting start position (1 indicates first position)- Returns:
- expression denoting the extracted substring
-
substring
Extract a substring. This method must be invoked on an expression corresponding to a string.- Parameters:
start
- - start position (1 indicates first position)len
- - length of the substring to be returned- Returns:
- expression denoting the extracted substring
-
substring
Extract a substring. This method must be invoked on an expression corresponding to a string.- Parameters:
start
- - start position (1 indicates first position)len
- - expression denoting length of the substring to return- Returns:
- expression denoting the extracted substring
-
substring
Extract a substring. This method must be invoked on an expression corresponding to a string.- Parameters:
start
- - expression denoting start position (1 indicates first position)len
- - length of the substring to return- Returns:
- expression denoting the extracted substring
-
substring
Extract a substring. This method must be invoked on an expression corresponding to a string.- Parameters:
start
- - expression denoting start position (1 indicates first position)len
- - expression denoting length of the substring to return- Returns:
- expression denoting the extracted substring
-
lower
Expression lower()Convert string to lowercase. This method must be invoked on an expression corresponding to a string.- Returns:
- expression denoting the string in lowercase
-
upper
Expression upper()Convert string to uppercase. This method must be invoked on an expression corresponding to a string.- Returns:
- expression denoting the string in uppercase
-
trim
Expression trim()Trim leading and trailing blanks. This method must be invoked on an expression corresponding to a string.- Returns:
- expression denoting trimmed string
-
trim
Trim leading, trailing blanks (or both) as specified by trim spec. This method must be invoked on an expression corresponding to a string.- Parameters:
spec
- - trim specification- Returns:
- expression denoting trimmed string
-
trim
Trim leading and trailing occurrences of character from the string. This method must be invoked on an expression corresponding to a string.- Parameters:
c
- - character to be trimmed- Returns:
- expression denoting trimmed string
-
trim
Trim occurrences of the character from leading or trailing (or both) positions of the string, as specified by trim spec. This method must be invoked on an expression corresponding to a string.- Parameters:
c
- - character to be trimmedspec
- - trim specification- Returns:
- expression denoting trimmed string
-
trim
Trim leading and trailing occurrences of character specified by the expression argument from the string. This method must be invoked on an expression corresponding to a string.- Parameters:
expr
- - expression corresponding to the character to be trimmed- Returns:
- expression denoting trimmed string
-
trim
Trim occurrences of the character specified by the expression argument from leading or trailing (or both) positions of the string, as specified by trim spec. This method must be invoked on an expression corresponding to a string.- Parameters:
expr
- - expression corresponding to the character to be trimmedspec
- - trim specification- Returns:
- expression denoting trimmed string
-
locate
Locate a string contained within the string corresponding to the expression on which the method was invoked. The search is started at position 1 (first string position). This method must be invoked on an expression corresponding to a string.- Parameters:
str
- - string to be located- Returns:
- expression denoting the first position at which the string was found or expression denoting 0 if the string was not found
-
locate
Locate a string contained within the string corresponding to the expression on which the method was invoked. The search is started at position 1 (first string position). This method must be invoked on an expression corresponding to a string.- Parameters:
str
- - expression corresponding to the string to be located- Returns:
- expression denoting the first position at which the string was found or expression denoting 0 if the string was not found
-
locate
Locate a string contained within the string corresponding to the expression on which the method was invoked, starting at a specified search position. This method must be invoked on an expression corresponding to a string.- Parameters:
str
- - string to be locatedposition
- - position at which to start the search- Returns:
- expression denoting the first position at which the string was found or expression denoting 0 if the string was not found
-
locate
Locate a string contained within the string corresponding to the expression on which the method was invoked, starting at a specified search position. This method must be invoked on an expression corresponding to a string.- Parameters:
str
- - string to be locatedposition
- - expression corresponding to position at which to start the search- Returns:
- expression denoting the first position at which the string was found or expression denoting 0 if the string was not found
-
locate
Locate a string contained within the string corresponding to the expression on which the method was invoked, starting at a specified search position. This method must be invoked on an expression corresponding to a string.- Parameters:
str
- - expression corresponding to the string to be locatedposition
- - position at which to start the search- Returns:
- expression denoting the first position at which the string was found or expression denoting 0 if the string was not found
-
locate
Locate a string contained within the string corresponding to the expression on which the method was invoked, starting at a specified search position. This method must be invoked on an expression corresponding to a string.- Parameters:
str
- - expression corresponding to the string to be locatedposition
- - expression corresponding to position at which to start the search- Returns:
- expression denoting the first position at which the string was found or expression denoting 0 if the string was not found
-
plus
Addition. This method must be invoked on an expression corresponding to a number.- Parameters:
num
- - number to be added- Returns:
- expression denoting the sum
-
plus
Addition. This method must be invoked on an expression corresponding to a number.- Parameters:
expr
- - expression corresponding to number to be added- Returns:
- expression denoting the sum
-
minus
Expression minus()Unary minus. This method must be invoked on an expression corresponding to a number.- Returns:
- expression denoting the unary minus of the expression
-
minus
Subtraction. This method must be invoked on an expression corresponding to a number.- Parameters:
num
- - subtrahend- Returns:
- expression denoting the result of subtracting the argument from the number corresponding to the expression on which the method was invoked.
-
minus
Subtraction. This method must be invoked on an expression corresponding to a number.- Parameters:
expr
- - expression corresponding to subtrahend- Returns:
- expression denoting the result of subtracting the number denoted by the argument from the number corresponding to the expression on which the method was invoked.
-
dividedBy
Division. This method must be invoked on an expression corresponding to a number.- Parameters:
num
- - divisor- Returns:
- expression denoting the result of dividing the number corresponding to the expression on which the method was invoked by the argument
-
dividedBy
Division. This method must be invoked on an expression corresponding to a number.- Parameters:
expr
- - expression corresponding to the divisor- Returns:
- expression denoting the result of dividing the number corresponding to the expression on which the method was invoked by the number denoted by the argument
-
times
Multiplication. This method must be invoked on an expression corresponding to a number.- Parameters:
num
- - multiplier- Returns:
- expression denoting the result of multiplying the argument with the number corresponding to the expression on which the method was invoked.
-
times
Multiplication. This method must be invoked on an expression corresponding to a number.- Parameters:
expr
- - expression corresponding to the multiplier- Returns:
- expression denoting the result of multiplying the number denoted by the argument with the number corresponding to the expression on which the method was invoked.
-
abs
Expression abs()Absolute value. This method must be invoked on an expression corresponding to a number.- Returns:
- expression corresponding to the absolute value
-
sqrt
Expression sqrt()Square root. This method must be invoked on an expression corresponding to a number.- Returns:
- expression corresponding to the square root
-
mod
Modulo operation. This must be invoked on an expression corresponding to an integer value- Parameters:
num
- - integer divisor- Returns:
- expression corresponding to the integer remainder of the division of the integer corresponding to the expression on which the method was invoked by the argument.
-
mod
Modulo operation. This must be invoked on an expression corresponding to an integer value- Parameters:
expr
- - expression corresponding to integer divisor- Returns:
- expression corresponding to the integer remainder of the division of the integer corresponding to the expression on which the method was invoked by the argument.
-