public class QueryExpressionFactory extends Object implements org.apache.openjpa.kernel.exps.ExpressionFactory
Constructor and Description |
---|
QueryExpressionFactory(StoreManager store) |
Modifier and Type | Method and Description |
---|---|
org.apache.openjpa.kernel.exps.Value |
abs(org.apache.openjpa.kernel.exps.Value num)
Return a value representing the absolute value of the given one.
|
org.apache.openjpa.kernel.exps.Value |
add(org.apache.openjpa.kernel.exps.Value num1,
org.apache.openjpa.kernel.exps.Value num2)
Return a value representing the two values added together.
|
org.apache.openjpa.kernel.exps.Value |
all(org.apache.openjpa.kernel.exps.Value target)
Return an expression representing the given condition.
|
org.apache.openjpa.kernel.exps.Expression |
and(org.apache.openjpa.kernel.exps.Expression exp1,
org.apache.openjpa.kernel.exps.Expression exp2)
Return the two expressions AND'd together.
|
org.apache.openjpa.kernel.exps.Value |
any(org.apache.openjpa.kernel.exps.Value target)
Return an expression representing the given condition.
|
org.apache.openjpa.kernel.exps.Expression |
asExpression(org.apache.openjpa.kernel.exps.Value bool)
Return the given value as an expression.
|
org.apache.openjpa.kernel.exps.Value |
avg(org.apache.openjpa.kernel.exps.Value num)
Return the average of the given value for all matches.
|
org.apache.openjpa.kernel.exps.Expression |
bindKeyVariable(org.apache.openjpa.kernel.exps.Value var,
org.apache.openjpa.kernel.exps.Value map)
Bind the given variable to the key set of the given map value.
|
org.apache.openjpa.kernel.exps.Expression |
bindValueVariable(org.apache.openjpa.kernel.exps.Value var,
org.apache.openjpa.kernel.exps.Value map)
Bind the given variable to the value set of the given map value.
|
org.apache.openjpa.kernel.exps.Expression |
bindVariable(org.apache.openjpa.kernel.exps.Value var,
org.apache.openjpa.kernel.exps.Value coll)
Bind the given variable to the given collection value.
|
org.apache.openjpa.kernel.exps.Value |
cast(org.apache.openjpa.kernel.exps.Value obj,
Class cls)
Cast the value to the given class.
|
org.apache.openjpa.kernel.exps.Value |
coalesceExpression(org.apache.openjpa.kernel.exps.Value[] val)
Return a coalesce expression
|
org.apache.openjpa.kernel.exps.Value |
concat(org.apache.openjpa.kernel.exps.Value str,
org.apache.openjpa.kernel.exps.Value args)
Return a value representing the concatenation of the given target with the given args.
|
org.apache.openjpa.kernel.exps.Expression |
contains(org.apache.openjpa.kernel.exps.Value fieldPath,
org.apache.openjpa.kernel.exps.Value value)
Return an expression representing the given condition.
|
org.apache.openjpa.kernel.exps.Expression |
containsKey(org.apache.openjpa.kernel.exps.Value map,
org.apache.openjpa.kernel.exps.Value arg)
Return an expression representing the given condition.
|
org.apache.openjpa.kernel.exps.Expression |
containsValue(org.apache.openjpa.kernel.exps.Value map,
org.apache.openjpa.kernel.exps.Value arg)
Return an expression representing the given condition.
|
org.apache.openjpa.kernel.exps.Value |
count(org.apache.openjpa.kernel.exps.Value obj)
Return the count of the given value for all matches.
|
org.apache.openjpa.kernel.exps.Value |
distinct(org.apache.openjpa.kernel.exps.Value obj)
Return distinct values of the given value.
|
org.apache.openjpa.kernel.exps.Value |
divide(org.apache.openjpa.kernel.exps.Value num1,
org.apache.openjpa.kernel.exps.Value num2)
Return a value representing the first value divided by the first one.
|
org.apache.openjpa.kernel.exps.Expression |
emptyExpression()
Return a blank expression; this is used when the filter is empty.
|
org.apache.openjpa.kernel.exps.Expression |
endsWith(org.apache.openjpa.kernel.exps.Value str1,
org.apache.openjpa.kernel.exps.Value str2)
Return whether the first string ends with the second.
|
org.apache.openjpa.kernel.exps.Expression |
equal(org.apache.openjpa.kernel.exps.Value v1,
org.apache.openjpa.kernel.exps.Value v2)
Return an expression representing the given condition.
|
org.apache.openjpa.kernel.exps.Value |
generalCaseExpression(org.apache.openjpa.kernel.exps.Expression[] exp,
org.apache.openjpa.kernel.exps.Value val)
Return a general case expression
|
<T extends Date> |
getCurrentDate(Class<T> dateType)
Return a value representing the current date.
|
<T extends Date> |
getCurrentTime(Class<T> timeType)
Return a value representing the current time.
|
<T extends Date> |
getCurrentTimestamp(Class<T> timestampType)
Return a value representing the current timestamp.
|
org.apache.openjpa.kernel.exps.Value |
getKey(org.apache.openjpa.kernel.exps.Value val)
Path navigation thru map key
|
org.apache.openjpa.kernel.exps.Value |
getMapValue(org.apache.openjpa.kernel.exps.Value map,
org.apache.openjpa.kernel.exps.Value arg)
Return an expression representing the given condition.
|
org.apache.openjpa.kernel.exps.Value |
getNull()
Return a value representing null.
|
org.apache.openjpa.kernel.exps.Value |
getObjectId(org.apache.openjpa.kernel.exps.Value val)
Return the object id of the given value.
|
org.apache.openjpa.kernel.exps.Value |
getThis()
Return a value representing
this . |
org.apache.openjpa.kernel.exps.Expression |
greaterThan(org.apache.openjpa.kernel.exps.Value v1,
org.apache.openjpa.kernel.exps.Value v2)
Return an expression representing the given condition.
|
org.apache.openjpa.kernel.exps.Expression |
greaterThanEqual(org.apache.openjpa.kernel.exps.Value v1,
org.apache.openjpa.kernel.exps.Value v2)
Return an expression representing the given condition.
|
org.apache.openjpa.kernel.exps.Value |
index(org.apache.openjpa.kernel.exps.Value target)
Return an index/position of the given value within a collection/map.
|
org.apache.openjpa.kernel.exps.Value |
indexOf(org.apache.openjpa.kernel.exps.Value str,
org.apache.openjpa.kernel.exps.Value args)
Return a value representing the
String.indexOf(int) function on the given target with the
given args. |
org.apache.openjpa.kernel.exps.Expression |
isEmpty(org.apache.openjpa.kernel.exps.Value target)
Return an expression representing the given condition.
|
org.apache.openjpa.kernel.exps.Expression |
isInstance(org.apache.openjpa.kernel.exps.Value obj,
Class c)
Return whether the first value is an instance of the given class.
|
org.apache.openjpa.kernel.exps.Expression |
isNotEmpty(org.apache.openjpa.kernel.exps.Value target)
Return an expression representing the given condition.
|
boolean |
isVerticalType(org.apache.openjpa.kernel.exps.Value val)
Return true if the Value is a Type expression and the Type uses joined table strategy.
|
org.apache.openjpa.kernel.exps.Expression |
lessThan(org.apache.openjpa.kernel.exps.Value v1,
org.apache.openjpa.kernel.exps.Value v2)
Return an expression representing the given condition.
|
org.apache.openjpa.kernel.exps.Expression |
lessThanEqual(org.apache.openjpa.kernel.exps.Value v1,
org.apache.openjpa.kernel.exps.Value v2)
Return an expression representing the given condition.
|
org.apache.openjpa.kernel.exps.Value |
mapEntry(org.apache.openjpa.kernel.exps.Value key,
org.apache.openjpa.kernel.exps.Value val)
Return the map entry of the given value.
|
org.apache.openjpa.kernel.exps.Value |
mapKey(org.apache.openjpa.kernel.exps.Value key,
org.apache.openjpa.kernel.exps.Value val)
Return the map key of the given value
|
org.apache.openjpa.kernel.exps.Expression |
matches(org.apache.openjpa.kernel.exps.Value str,
org.apache.openjpa.kernel.exps.Value regexp,
String single,
String multi,
String escape)
Return whether the string matches the matching pattern.
|
org.apache.openjpa.kernel.exps.Value |
max(org.apache.openjpa.kernel.exps.Value num)
Return the max of the given value for all matches.
|
org.apache.openjpa.kernel.exps.Value |
min(org.apache.openjpa.kernel.exps.Value num)
Return the max of the given value for all matches.
|
org.apache.openjpa.kernel.exps.Value |
mod(org.apache.openjpa.kernel.exps.Value num1,
org.apache.openjpa.kernel.exps.Value num2)
Return a value representing the first value mod'd by the second one.
|
org.apache.openjpa.kernel.exps.Value |
multiply(org.apache.openjpa.kernel.exps.Value num1,
org.apache.openjpa.kernel.exps.Value num2)
Return a value representing the two values multiplied together.
|
org.apache.openjpa.kernel.exps.Value |
newAggregate(org.apache.openjpa.kernel.exps.AggregateListener listener,
org.apache.openjpa.kernel.exps.Value args)
Return the value of the given function.
|
org.apache.openjpa.kernel.exps.Arguments |
newArgumentList(org.apache.openjpa.kernel.exps.Value... values)
Return a function argument list consisting of the given values, any of which may itself be an
argument list.
|
org.apache.openjpa.kernel.exps.Arguments |
newArgumentList(org.apache.openjpa.kernel.exps.Value arg1,
org.apache.openjpa.kernel.exps.Value arg2)
Return a function argument list consisting of the given values, either of which may itself be
an argument list.
|
org.apache.openjpa.kernel.exps.Value |
newBoundVariable(String name,
Class type)
This method will be called only once per variable bound in a
contains clause,
and the returned value will be reused for any further instances of the variable in
subexpression of the filter string. |
org.apache.openjpa.kernel.exps.Parameter |
newCollectionValuedParameter(Object name,
Class type)
Return a value representing a collection-valued parameter.
|
org.apache.openjpa.kernel.exps.Value |
newExtension(org.apache.openjpa.kernel.exps.FilterListener listener,
org.apache.openjpa.kernel.exps.Value target,
org.apache.openjpa.kernel.exps.Value args)
Return the value of the given extension.
|
org.apache.openjpa.kernel.exps.Value |
newFunction(String functionName,
Class<?> resultType,
org.apache.openjpa.kernel.exps.Value... args)
Return a value representing the given datastore function with the given arguments.
|
org.apache.openjpa.kernel.exps.Literal |
newLiteral(Object val,
int parseType)
|
org.apache.openjpa.kernel.exps.Parameter |
newParameter(Object name,
Class type)
Return a value representing a parameter for the given value.
|
org.apache.openjpa.kernel.exps.Path |
newPath()
Return a value representing a path which will consist of a chain of 1 or more field names
starting in the namespace of the candidate class.
Example: parent.address.city |
org.apache.openjpa.kernel.exps.Path |
newPath(org.apache.openjpa.kernel.exps.Value val)
Return a value representing a path which will consist of a chain of 1 or more field names
starting in the namespace of the given value.
Example: var.address.city |
org.apache.openjpa.kernel.exps.Subquery |
newSubquery(org.apache.openjpa.meta.ClassMetaData candidate,
boolean subs,
String alias)
Return a subquery.
|
org.apache.openjpa.kernel.exps.Literal |
newTypeLiteral(Object val,
int parseType)
|
org.apache.openjpa.kernel.exps.Value |
newUnboundVariable(String name,
Class type)
Return an unbound variable.
|
org.apache.openjpa.kernel.exps.Expression |
not(org.apache.openjpa.kernel.exps.Expression exp)
Return the inverse of this expression.
|
org.apache.openjpa.kernel.exps.Expression |
notEqual(org.apache.openjpa.kernel.exps.Value v1,
org.apache.openjpa.kernel.exps.Value v2)
Return an expression representing the given condition.
|
org.apache.openjpa.kernel.exps.Expression |
notMatches(org.apache.openjpa.kernel.exps.Value str,
org.apache.openjpa.kernel.exps.Value regexp,
String single,
String multi,
String escape)
Return whether the string does not match the given pattern.
|
org.apache.openjpa.kernel.exps.Value |
nullIfExpression(org.apache.openjpa.kernel.exps.Value val1,
org.apache.openjpa.kernel.exps.Value val2)
Return a nullif expression
|
org.apache.openjpa.kernel.exps.Expression |
or(org.apache.openjpa.kernel.exps.Expression exp1,
org.apache.openjpa.kernel.exps.Expression exp2)
Return the two expressions OR'd together.
|
org.apache.openjpa.kernel.exps.Value |
simpleCaseExpression(org.apache.openjpa.kernel.exps.Value caseOperand,
org.apache.openjpa.kernel.exps.Expression[] exp,
org.apache.openjpa.kernel.exps.Value val)
Return a simple case expression
|
org.apache.openjpa.kernel.exps.Value |
size(org.apache.openjpa.kernel.exps.Value target)
Return an expression representing the given condition.
|
org.apache.openjpa.kernel.exps.Value |
sqrt(org.apache.openjpa.kernel.exps.Value num)
Return the square root of the given value.
|
org.apache.openjpa.kernel.exps.Expression |
startsWith(org.apache.openjpa.kernel.exps.Value str1,
org.apache.openjpa.kernel.exps.Value str2)
Return whether the first string starts with the second.
|
org.apache.openjpa.kernel.exps.Value |
stringLength(org.apache.openjpa.kernel.exps.Value str)
Returns the number of characters in the String value.
|
org.apache.openjpa.kernel.exps.Value |
substring(org.apache.openjpa.kernel.exps.Value str,
org.apache.openjpa.kernel.exps.Value args)
Return a value representing the
String.substring(int) function on the given target with
the given args. |
org.apache.openjpa.kernel.exps.Value |
subtract(org.apache.openjpa.kernel.exps.Value num1,
org.apache.openjpa.kernel.exps.Value num2)
Return a value representing the second value subtracted from the first.
|
org.apache.openjpa.kernel.exps.Value |
sum(org.apache.openjpa.kernel.exps.Value num)
Return the max of the given value for all matches.
|
org.apache.openjpa.kernel.exps.Value |
toLowerCase(org.apache.openjpa.kernel.exps.Value str)
Return the upper case of the given value.
|
org.apache.openjpa.kernel.exps.Value |
toUpperCase(org.apache.openjpa.kernel.exps.Value str)
Return the upper case of the given value.
|
org.apache.openjpa.kernel.exps.Value |
trim(org.apache.openjpa.kernel.exps.Value str,
org.apache.openjpa.kernel.exps.Value trimChar,
Boolean where)
Trims the specified specified trimChar from the specified value.
|
org.apache.openjpa.kernel.exps.Value |
type(org.apache.openjpa.kernel.exps.Value target)
Return the type/class of the given value.
|
org.apache.openjpa.kernel.exps.Expression |
whenCondition(org.apache.openjpa.kernel.exps.Expression exp,
org.apache.openjpa.kernel.exps.Value val)
Return a when condidional clause
|
org.apache.openjpa.kernel.exps.Expression |
whenScalar(org.apache.openjpa.kernel.exps.Value val1,
org.apache.openjpa.kernel.exps.Value val2)
Return a when scalar_expression clause
|
public QueryExpressionFactory(StoreManager store)
public org.apache.openjpa.kernel.exps.Expression emptyExpression()
emptyExpression
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Expression asExpression(org.apache.openjpa.kernel.exps.Value bool)
asExpression
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Expression equal(org.apache.openjpa.kernel.exps.Value v1, org.apache.openjpa.kernel.exps.Value v2)
equal
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Expression notEqual(org.apache.openjpa.kernel.exps.Value v1, org.apache.openjpa.kernel.exps.Value v2)
notEqual
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Expression lessThan(org.apache.openjpa.kernel.exps.Value v1, org.apache.openjpa.kernel.exps.Value v2)
lessThan
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Expression greaterThan(org.apache.openjpa.kernel.exps.Value v1, org.apache.openjpa.kernel.exps.Value v2)
greaterThan
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Expression lessThanEqual(org.apache.openjpa.kernel.exps.Value v1, org.apache.openjpa.kernel.exps.Value v2)
lessThanEqual
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Expression greaterThanEqual(org.apache.openjpa.kernel.exps.Value v1, org.apache.openjpa.kernel.exps.Value v2)
greaterThanEqual
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Expression isEmpty(org.apache.openjpa.kernel.exps.Value target)
isEmpty
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Expression isNotEmpty(org.apache.openjpa.kernel.exps.Value target)
isNotEmpty
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Expression contains(org.apache.openjpa.kernel.exps.Value fieldPath, org.apache.openjpa.kernel.exps.Value value)
contains
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Expression containsKey(org.apache.openjpa.kernel.exps.Value map, org.apache.openjpa.kernel.exps.Value arg)
containsKey
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Expression containsValue(org.apache.openjpa.kernel.exps.Value map, org.apache.openjpa.kernel.exps.Value arg)
containsValue
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Value getMapValue(org.apache.openjpa.kernel.exps.Value map, org.apache.openjpa.kernel.exps.Value arg)
getMapValue
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Expression isInstance(org.apache.openjpa.kernel.exps.Value obj, Class c)
isInstance
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Expression and(org.apache.openjpa.kernel.exps.Expression exp1, org.apache.openjpa.kernel.exps.Expression exp2)
and
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Expression or(org.apache.openjpa.kernel.exps.Expression exp1, org.apache.openjpa.kernel.exps.Expression exp2)
or
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Expression not(org.apache.openjpa.kernel.exps.Expression exp)
not
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Expression bindVariable(org.apache.openjpa.kernel.exps.Value var, org.apache.openjpa.kernel.exps.Value coll)
bindVariable
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Expression bindKeyVariable(org.apache.openjpa.kernel.exps.Value var, org.apache.openjpa.kernel.exps.Value map)
bindKeyVariable
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Expression bindValueVariable(org.apache.openjpa.kernel.exps.Value var, org.apache.openjpa.kernel.exps.Value map)
bindValueVariable
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Expression endsWith(org.apache.openjpa.kernel.exps.Value str1, org.apache.openjpa.kernel.exps.Value str2)
endsWith
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Expression matches(org.apache.openjpa.kernel.exps.Value str, org.apache.openjpa.kernel.exps.Value regexp, String single, String multi, String escape)
matches
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
str
- the value to compareregexp
- the pattern against which to comparesingle
- the token that signifies a single-character matchmulti
- the token that signifies a multi-character matchescape
- the escape token that escapes the matching tokenspublic org.apache.openjpa.kernel.exps.Expression notMatches(org.apache.openjpa.kernel.exps.Value str, org.apache.openjpa.kernel.exps.Value regexp, String single, String multi, String escape)
notMatches
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
str
- the value to compareregexp
- the pattern against which to comparesingle
- the token that signifies a single-character matchmulti
- the token that signifies a multi-character matchescape
- the escape token that escapes the matching tokenspublic org.apache.openjpa.kernel.exps.Expression startsWith(org.apache.openjpa.kernel.exps.Value str1, org.apache.openjpa.kernel.exps.Value str2)
startsWith
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Value stringLength(org.apache.openjpa.kernel.exps.Value str)
stringLength
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Value trim(org.apache.openjpa.kernel.exps.Value str, org.apache.openjpa.kernel.exps.Value trimChar, Boolean where)
trim
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
str
- the value from which to trimtrimChar
- the characters to trim offwhere
- which side of the String to trim: null indicates both sides, true indicates
leading, and false indicates trailingpublic org.apache.openjpa.kernel.exps.Subquery newSubquery(org.apache.openjpa.meta.ClassMetaData candidate, boolean subs, String alias)
newPath(Value)
, passing in the subquery as the value.newSubquery
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
candidate
- the candidate class of the subquerysubs
- whether the query includes subclassesalias
- the alias given to the query candidate classpublic org.apache.openjpa.kernel.exps.Path newPath()
parent.address.city
newPath
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Path newPath(org.apache.openjpa.kernel.exps.Value val)
var.address.city
newPath
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Literal newLiteral(Object val, int parseType)
Number
, String
, or Boolean
instance.newLiteral
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Value getThis()
this
.getThis
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Value getNull()
getNull
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public <T extends Date> org.apache.openjpa.kernel.exps.Value getCurrentDate(Class<T> dateType)
getCurrentDate
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public <T extends Date> org.apache.openjpa.kernel.exps.Value getCurrentTime(Class<T> timeType)
getCurrentTime
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public <T extends Date> org.apache.openjpa.kernel.exps.Value getCurrentTimestamp(Class<T> timestampType)
getCurrentTimestamp
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Parameter newParameter(Object name, Class type)
Object
if the parameter is not declared.newParameter
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Parameter newCollectionValuedParameter(Object name, Class type)
Object
if the parameter is not declared.newCollectionValuedParameter
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Value newExtension(org.apache.openjpa.kernel.exps.FilterListener listener, org.apache.openjpa.kernel.exps.Value target, org.apache.openjpa.kernel.exps.Value args)
newExtension
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Value newAggregate(org.apache.openjpa.kernel.exps.AggregateListener listener, org.apache.openjpa.kernel.exps.Value args)
newAggregate
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Arguments newArgumentList(org.apache.openjpa.kernel.exps.Value arg1, org.apache.openjpa.kernel.exps.Value arg2)
newArgumentList
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Arguments newArgumentList(org.apache.openjpa.kernel.exps.Value... values)
newArgumentList
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Value newUnboundVariable(String name, Class type)
Object
if the variable is not declared.newUnboundVariable
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Value newBoundVariable(String name, Class type)
contains
clause,
and the returned value will be reused for any further instances of the variable in
subexpression of the filter string. The type may be Object
if the variable is
not declared.newBoundVariable
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Value cast(org.apache.openjpa.kernel.exps.Value obj, Class cls)
cast
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Value add(org.apache.openjpa.kernel.exps.Value num1, org.apache.openjpa.kernel.exps.Value num2)
add
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Value subtract(org.apache.openjpa.kernel.exps.Value num1, org.apache.openjpa.kernel.exps.Value num2)
subtract
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Value multiply(org.apache.openjpa.kernel.exps.Value num1, org.apache.openjpa.kernel.exps.Value num2)
multiply
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Value divide(org.apache.openjpa.kernel.exps.Value num1, org.apache.openjpa.kernel.exps.Value num2)
divide
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Value mod(org.apache.openjpa.kernel.exps.Value num1, org.apache.openjpa.kernel.exps.Value num2)
mod
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Value abs(org.apache.openjpa.kernel.exps.Value num)
abs
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Value indexOf(org.apache.openjpa.kernel.exps.Value str, org.apache.openjpa.kernel.exps.Value args)
String.indexOf(int)
function on the given target with the
given args.indexOf
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Value concat(org.apache.openjpa.kernel.exps.Value str, org.apache.openjpa.kernel.exps.Value args)
concat
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Value sqrt(org.apache.openjpa.kernel.exps.Value num)
sqrt
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Value substring(org.apache.openjpa.kernel.exps.Value str, org.apache.openjpa.kernel.exps.Value args)
String.substring(int)
function on the given target with
the given args. As with String.substring(int)
, the start index is zero-based, and the
second argument is the end index.substring
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Value toUpperCase(org.apache.openjpa.kernel.exps.Value str)
toUpperCase
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Value toLowerCase(org.apache.openjpa.kernel.exps.Value str)
toLowerCase
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Value avg(org.apache.openjpa.kernel.exps.Value num)
avg
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Value count(org.apache.openjpa.kernel.exps.Value obj)
count
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Value max(org.apache.openjpa.kernel.exps.Value num)
max
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Value min(org.apache.openjpa.kernel.exps.Value num)
min
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Value sum(org.apache.openjpa.kernel.exps.Value num)
sum
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Value any(org.apache.openjpa.kernel.exps.Value target)
any
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Value all(org.apache.openjpa.kernel.exps.Value target)
all
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Value size(org.apache.openjpa.kernel.exps.Value target)
size
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Value index(org.apache.openjpa.kernel.exps.Value target)
index
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Value type(org.apache.openjpa.kernel.exps.Value target)
type
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Value mapEntry(org.apache.openjpa.kernel.exps.Value key, org.apache.openjpa.kernel.exps.Value val)
mapEntry
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Value mapKey(org.apache.openjpa.kernel.exps.Value key, org.apache.openjpa.kernel.exps.Value val)
mapKey
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Value getKey(org.apache.openjpa.kernel.exps.Value val)
getKey
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Value distinct(org.apache.openjpa.kernel.exps.Value obj)
distinct
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Value getObjectId(org.apache.openjpa.kernel.exps.Value val)
getObjectId
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Value simpleCaseExpression(org.apache.openjpa.kernel.exps.Value caseOperand, org.apache.openjpa.kernel.exps.Expression[] exp, org.apache.openjpa.kernel.exps.Value val)
simpleCaseExpression
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Value generalCaseExpression(org.apache.openjpa.kernel.exps.Expression[] exp, org.apache.openjpa.kernel.exps.Value val)
generalCaseExpression
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Expression whenCondition(org.apache.openjpa.kernel.exps.Expression exp, org.apache.openjpa.kernel.exps.Value val)
whenCondition
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Expression whenScalar(org.apache.openjpa.kernel.exps.Value val1, org.apache.openjpa.kernel.exps.Value val2)
whenScalar
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Value coalesceExpression(org.apache.openjpa.kernel.exps.Value[] val)
coalesceExpression
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Value nullIfExpression(org.apache.openjpa.kernel.exps.Value val1, org.apache.openjpa.kernel.exps.Value val2)
nullIfExpression
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Literal newTypeLiteral(Object val, int parseType)
Number
, String
, or Boolean
instance.newTypeLiteral
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public org.apache.openjpa.kernel.exps.Value newFunction(String functionName, Class<?> resultType, org.apache.openjpa.kernel.exps.Value... args)
newFunction
in interface org.apache.openjpa.kernel.exps.ExpressionFactory
public boolean isVerticalType(org.apache.openjpa.kernel.exps.Value val)
Copyright © GigaSpaces.