Package org.apache.openjpa.kernel.exps
Class InMemoryExpressionFactory
- java.lang.Object
-
- org.apache.openjpa.kernel.exps.InMemoryExpressionFactory
-
- All Implemented Interfaces:
ExpressionFactory
public class InMemoryExpressionFactory extends java.lang.Object implements ExpressionFactory
Expression factory implementation that can be used to execute queries in memory.- Author:
- Abe White
-
-
Constructor Summary
Constructors Constructor Description InMemoryExpressionFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Value
abs(Value val)
Return a value representing the absolute value of the given one.Value
add(Value val1, Value val2)
Return a value representing the two values added together.Value
all(Value val)
Return an expression representing the given condition.Expression
and(Expression exp1, Expression exp2)
Return the two expressions AND'd together.Value
any(Value val)
Return an expression representing the given condition.Expression
asExpression(Value v)
Return the given value as an expression.Value
avg(Value val)
Return the average of the given value for all matches.Expression
bindKeyVariable(Value var, Value val)
Bind the given variable to the key set of the given map value.Expression
bindValueVariable(Value var, Value val)
Bind the given variable to the value set of the given map value.Expression
bindVariable(Value var, Value val)
Bind the given variable to the given collection value.Value
cast(Value val, java.lang.Class cls)
Cast the value to the given class.Value
coalesceExpression(Value[] val)
Return a coalesce expressionValue
concat(Value val1, Value val2)
Return a value representing the concatenation of the given target with the given args.Expression
contains(Value v1, Value v2)
Return an expression representing the given condition.Expression
containsKey(Value v1, Value v2)
Return an expression representing the given condition.Expression
containsValue(Value v1, Value v2)
Return an expression representing the given condition.Value
count(Value val)
Return the count of the given value for all matches.java.util.List
distinct(QueryExpressions exps, boolean fromExtent, java.util.List matches)
Filter the given list of matches, removing duplicate entries.Value
distinct(Value val)
Return distinct values of the given value.Value
divide(Value val1, Value val2)
Return a value representing the first value divided by the first one.Expression
emptyExpression()
Return a blank expression; this is used when the filter is empty.Expression
endsWith(Value v1, Value v2)
Return whether the first string ends with the second.Expression
equal(Value v1, Value v2)
Return an expression representing the given condition.Value
generalCaseExpression(Expression[] exp, Value val)
Return a general case expression<T extends java.util.Date>
ValuegetCurrentDate(java.lang.Class<T> dateType)
Return a value representing the current date.<T extends java.util.Date>
ValuegetCurrentTime(java.lang.Class<T> dateType)
Return a value representing the current time.<T extends java.util.Date>
ValuegetCurrentTimestamp(java.lang.Class<T> dateType)
Return a value representing the current timestamp.Value
getKey(Value val)
Path navigation thru map keyValue
getMapValue(Value map, Value arg)
Return an expression representing the given condition.Value
getNull()
Return a value representing null.Value
getObjectId(Value val)
Return the object id of the given value.Value
getThis()
Return a value representingthis
.Expression
greaterThan(Value v1, Value v2)
Return an expression representing the given condition.Expression
greaterThanEqual(Value v1, Value v2)
Return an expression representing the given condition.java.util.List
group(QueryExpressions exps, java.util.List matches, StoreContext ctx, java.lang.Object[] params)
Group the list of matches into a list of lists.Value
index(Value val)
Return an index/position of the given value within a collection/map.Value
indexOf(Value val1, Value val2)
Return a value representing the indexOf (LOCATE in JPQL) function on the given target with the given args.Expression
isEmpty(Value v1)
Return an expression representing the given condition.Expression
isInstance(Value v1, java.lang.Class c)
Return whether the first value is an instance of the given class.Expression
isNotEmpty(Value v1)
Return an expression representing the given condition.boolean
isVerticalType(Value val)
Return true if the Value is a Type expression and the Type uses joined table strategy.Expression
lessThan(Value v1, Value v2)
Return an expression representing the given condition.Expression
lessThanEqual(Value v1, Value v2)
Return an expression representing the given condition.Value
mapEntry(Value key, Value val)
Return the map entry of the given value.Value
mapKey(Value key, Value val)
Return the map key of the given valueprotected boolean
matches(Exp exp, java.lang.Object candidate, StoreContext ctx, java.lang.Object[] params, int i)
Recursive method to evaluate the expression for all possible combinations of unbound variables.boolean
matches(QueryExpressions exps, java.util.Collection group, StoreContext ctx, java.lang.Object[] params)
Return true if the given group matches the having expression.boolean
matches(QueryExpressions exps, ClassMetaData type, boolean subs, java.lang.Object candidate, StoreContext ctx, java.lang.Object[] params)
Tests whether the given candidate matches the given type and this expression.Expression
matches(Value v1, Value v2, java.lang.String single, java.lang.String multi, java.lang.String esc)
Return whether the string matches the matching pattern.Value
max(Value val)
Return the max of the given value for all matches.Value
min(Value val)
Return the max of the given value for all matches.Value
mod(Value val1, Value val2)
Return a value representing the first value mod'd by the second one.Value
multiply(Value val1, Value val2)
Return a value representing the two values multiplied together.Value
newAggregate(AggregateListener listener, Value arg)
Return the value of the given function.Arguments
newArgumentList(Value... values)
Return a function argument list consisting of the given values, any of which may itself be an argument list.Arguments
newArgumentList(Value val1, Value val2)
Return a function argument list consisting of the given values, either of which may itself be an argument list.Value
newBoundVariable(java.lang.String name, java.lang.Class type)
This method will be called only once per variable bound in acontains
clause, and the returned value will be reused for any further instances of the variable in subexpression of the filter string.Parameter
newCollectionValuedParameter(java.lang.Object name, java.lang.Class type)
Return a value representing a collection-valued parameter.Value
newExtension(FilterListener listener, Value target, Value arg)
Return the value of the given extension.Value
newFunction(java.lang.String functionName, java.lang.Class<?> resultType, Value... args)
Return a value representing the given datastore function with the given arguments.Literal
newLiteral(java.lang.Object val, int parseType)
Return a value representing the given constant, which will be aNumber
,String
, orBoolean
instance.Parameter
newParameter(java.lang.Object name, java.lang.Class type)
Return a value representing a parameter for the given value.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
Path
newPath(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
Subquery
newSubquery(ClassMetaData candidate, boolean subs, java.lang.String alias)
Return a subquery.Literal
newTypeLiteral(java.lang.Object val, int parseType)
Return a value representing the given constant, which will be aNumber
,String
, orBoolean
instance.Value
newUnboundVariable(java.lang.String name, java.lang.Class type)
Return an unbound variable.Expression
not(Expression exp)
Return the inverse of this expression.Expression
notEqual(Value v1, Value v2)
Return an expression representing the given condition.Expression
notMatches(Value v1, Value v2, java.lang.String single, java.lang.String multi, java.lang.String esc)
Return whether the string does not match the given pattern.Value
nullIfExpression(Value val1, Value val2)
Return a nullif expressionExpression
or(Expression exp1, Expression exp2)
Return the two expressions OR'd together.java.util.List
order(QueryExpressions exps, java.util.List matches, StoreContext ctx, java.lang.Object[] params)
Order the given list of matches on the given value.java.util.List
project(QueryExpressions exps, java.util.List matches, StoreContext ctx, java.lang.Object[] params)
Create the projections for the given results.Value
simpleCaseExpression(Value caseOperand, Expression[] exp, Value val)
Return a simple case expressionValue
size(Value val)
Return an expression representing the given condition.Value
sqrt(Value val)
Return the square root of the given value.Expression
startsWith(Value v1, Value v2)
Return whether the first string starts with the second.Value
stringLength(Value str)
Returns the number of characters in the String value.Value
substring(Value val1, Value val2)
Return a value representing the substring function on the given target with the given args.Value
subtract(Value val1, Value val2)
Return a value representing the second value subtracted from the first.Value
sum(Value val)
Return the max of the given value for all matches.Value
toLowerCase(Value val)
Return the upper case of the given value.Value
toUpperCase(Value val)
Return the upper case of the given value.Value
trim(Value str, Value trimChar, java.lang.Boolean where)
Trims the specified specified trimChar from the specified value.Value
type(Value val)
Return the type/class of the given value.Expression
whenCondition(Expression exp, Value val)
Return a when condidional clauseExpression
whenScalar(Value val1, Value val2)
Return a when scalar_expression clause
-
-
-
Method Detail
-
matches
public boolean matches(QueryExpressions exps, ClassMetaData type, boolean subs, java.lang.Object candidate, StoreContext ctx, java.lang.Object[] params)
Tests whether the given candidate matches the given type and this expression.
-
matches
protected boolean matches(Exp exp, java.lang.Object candidate, StoreContext ctx, java.lang.Object[] params, int i)
Recursive method to evaluate the expression for all possible combinations of unbound variables. This method simulates a sequence of embedded procedural loops over the extents of all variables in the unbounds list.
-
group
public java.util.List group(QueryExpressions exps, java.util.List matches, StoreContext ctx, java.lang.Object[] params)
Group the list of matches into a list of lists.
-
matches
public boolean matches(QueryExpressions exps, java.util.Collection group, StoreContext ctx, java.lang.Object[] params)
Return true if the given group matches the having expression.
-
project
public java.util.List project(QueryExpressions exps, java.util.List matches, StoreContext ctx, java.lang.Object[] params)
Create the projections for the given results.
-
order
public java.util.List order(QueryExpressions exps, java.util.List matches, StoreContext ctx, java.lang.Object[] params)
Order the given list of matches on the given value.
-
distinct
public java.util.List distinct(QueryExpressions exps, boolean fromExtent, java.util.List matches)
Filter the given list of matches, removing duplicate entries.
-
emptyExpression
public Expression emptyExpression()
Description copied from interface:ExpressionFactory
Return a blank expression; this is used when the filter is empty.- Specified by:
emptyExpression
in interfaceExpressionFactory
-
asExpression
public Expression asExpression(Value v)
Description copied from interface:ExpressionFactory
Return the given value as an expression.- Specified by:
asExpression
in interfaceExpressionFactory
-
equal
public Expression equal(Value v1, Value v2)
Description copied from interface:ExpressionFactory
Return an expression representing the given condition.- Specified by:
equal
in interfaceExpressionFactory
-
notEqual
public Expression notEqual(Value v1, Value v2)
Description copied from interface:ExpressionFactory
Return an expression representing the given condition.- Specified by:
notEqual
in interfaceExpressionFactory
-
lessThan
public Expression lessThan(Value v1, Value v2)
Description copied from interface:ExpressionFactory
Return an expression representing the given condition.- Specified by:
lessThan
in interfaceExpressionFactory
-
greaterThan
public Expression greaterThan(Value v1, Value v2)
Description copied from interface:ExpressionFactory
Return an expression representing the given condition.- Specified by:
greaterThan
in interfaceExpressionFactory
-
lessThanEqual
public Expression lessThanEqual(Value v1, Value v2)
Description copied from interface:ExpressionFactory
Return an expression representing the given condition.- Specified by:
lessThanEqual
in interfaceExpressionFactory
-
greaterThanEqual
public Expression greaterThanEqual(Value v1, Value v2)
Description copied from interface:ExpressionFactory
Return an expression representing the given condition.- Specified by:
greaterThanEqual
in interfaceExpressionFactory
-
isEmpty
public Expression isEmpty(Value v1)
Description copied from interface:ExpressionFactory
Return an expression representing the given condition.- Specified by:
isEmpty
in interfaceExpressionFactory
-
isNotEmpty
public Expression isNotEmpty(Value v1)
Description copied from interface:ExpressionFactory
Return an expression representing the given condition.- Specified by:
isNotEmpty
in interfaceExpressionFactory
-
contains
public Expression contains(Value v1, Value v2)
Description copied from interface:ExpressionFactory
Return an expression representing the given condition.- Specified by:
contains
in interfaceExpressionFactory
-
containsKey
public Expression containsKey(Value v1, Value v2)
Description copied from interface:ExpressionFactory
Return an expression representing the given condition.- Specified by:
containsKey
in interfaceExpressionFactory
-
containsValue
public Expression containsValue(Value v1, Value v2)
Description copied from interface:ExpressionFactory
Return an expression representing the given condition.- Specified by:
containsValue
in interfaceExpressionFactory
-
getMapValue
public Value getMapValue(Value map, Value arg)
Description copied from interface:ExpressionFactory
Return an expression representing the given condition.- Specified by:
getMapValue
in interfaceExpressionFactory
-
isInstance
public Expression isInstance(Value v1, java.lang.Class c)
Description copied from interface:ExpressionFactory
Return whether the first value is an instance of the given class.- Specified by:
isInstance
in interfaceExpressionFactory
-
and
public Expression and(Expression exp1, Expression exp2)
Description copied from interface:ExpressionFactory
Return the two expressions AND'd together.- Specified by:
and
in interfaceExpressionFactory
-
or
public Expression or(Expression exp1, Expression exp2)
Description copied from interface:ExpressionFactory
Return the two expressions OR'd together.- Specified by:
or
in interfaceExpressionFactory
-
not
public Expression not(Expression exp)
Description copied from interface:ExpressionFactory
Return the inverse of this expression.- Specified by:
not
in interfaceExpressionFactory
-
bindVariable
public Expression bindVariable(Value var, Value val)
Description copied from interface:ExpressionFactory
Bind the given variable to the given collection value.- Specified by:
bindVariable
in interfaceExpressionFactory
-
bindKeyVariable
public Expression bindKeyVariable(Value var, Value val)
Description copied from interface:ExpressionFactory
Bind the given variable to the key set of the given map value.- Specified by:
bindKeyVariable
in interfaceExpressionFactory
-
bindValueVariable
public Expression bindValueVariable(Value var, Value val)
Description copied from interface:ExpressionFactory
Bind the given variable to the value set of the given map value.- Specified by:
bindValueVariable
in interfaceExpressionFactory
-
endsWith
public Expression endsWith(Value v1, Value v2)
Description copied from interface:ExpressionFactory
Return whether the first string ends with the second.- Specified by:
endsWith
in interfaceExpressionFactory
-
matches
public Expression matches(Value v1, Value v2, java.lang.String single, java.lang.String multi, java.lang.String esc)
Description copied from interface:ExpressionFactory
Return whether the string matches the matching pattern.- Specified by:
matches
in interfaceExpressionFactory
- Parameters:
v1
- the value to comparev2
- the pattern against which to comparesingle
- the token that signifies a single-character matchmulti
- the token that signifies a multi-character matchesc
- the escape token that escapes the matching tokens
-
notMatches
public Expression notMatches(Value v1, Value v2, java.lang.String single, java.lang.String multi, java.lang.String esc)
Description copied from interface:ExpressionFactory
Return whether the string does not match the given pattern.- Specified by:
notMatches
in interfaceExpressionFactory
- Parameters:
v1
- the value to comparev2
- the pattern against which to comparesingle
- the token that signifies a single-character matchmulti
- the token that signifies a multi-character matchesc
- the escape token that escapes the matching tokens
-
startsWith
public Expression startsWith(Value v1, Value v2)
Description copied from interface:ExpressionFactory
Return whether the first string starts with the second.- Specified by:
startsWith
in interfaceExpressionFactory
-
newSubquery
public Subquery newSubquery(ClassMetaData candidate, boolean subs, java.lang.String alias)
Description copied from interface:ExpressionFactory
Return a subquery. Paths for the candidates of the subquery are created withExpressionFactory.newPath(Value)
, passing in the subquery as the value.- Specified by:
newSubquery
in interfaceExpressionFactory
- Parameters:
candidate
- the candidate class of the subquerysubs
- whether the query includes subclassesalias
- the alias given to the query candidate class
-
newPath
public Path newPath()
Description copied from interface:ExpressionFactory
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
- Specified by:
newPath
in interfaceExpressionFactory
-
newPath
public Path newPath(Value val)
Description copied from interface:ExpressionFactory
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
- Specified by:
newPath
in interfaceExpressionFactory
-
newLiteral
public Literal newLiteral(java.lang.Object val, int parseType)
Description copied from interface:ExpressionFactory
Return a value representing the given constant, which will be aNumber
,String
, orBoolean
instance.- Specified by:
newLiteral
in interfaceExpressionFactory
-
newTypeLiteral
public Literal newTypeLiteral(java.lang.Object val, int parseType)
Description copied from interface:ExpressionFactory
Return a value representing the given constant, which will be aNumber
,String
, orBoolean
instance.- Specified by:
newTypeLiteral
in interfaceExpressionFactory
-
getThis
public Value getThis()
Description copied from interface:ExpressionFactory
Return a value representingthis
.- Specified by:
getThis
in interfaceExpressionFactory
-
getNull
public Value getNull()
Description copied from interface:ExpressionFactory
Return a value representing null.- Specified by:
getNull
in interfaceExpressionFactory
-
getCurrentDate
public <T extends java.util.Date> Value getCurrentDate(java.lang.Class<T> dateType)
Description copied from interface:ExpressionFactory
Return a value representing the current date.- Specified by:
getCurrentDate
in interfaceExpressionFactory
-
getCurrentTime
public <T extends java.util.Date> Value getCurrentTime(java.lang.Class<T> dateType)
Description copied from interface:ExpressionFactory
Return a value representing the current time.- Specified by:
getCurrentTime
in interfaceExpressionFactory
-
getCurrentTimestamp
public <T extends java.util.Date> Value getCurrentTimestamp(java.lang.Class<T> dateType)
Description copied from interface:ExpressionFactory
Return a value representing the current timestamp.- Specified by:
getCurrentTimestamp
in interfaceExpressionFactory
-
newParameter
public Parameter newParameter(java.lang.Object name, java.lang.Class type)
Description copied from interface:ExpressionFactory
Return a value representing a parameter for the given value. The type may beObject
if the parameter is not declared.- Specified by:
newParameter
in interfaceExpressionFactory
-
newCollectionValuedParameter
public Parameter newCollectionValuedParameter(java.lang.Object name, java.lang.Class type)
Description copied from interface:ExpressionFactory
Return a value representing a collection-valued parameter. The type may beObject
if the parameter is not declared.- Specified by:
newCollectionValuedParameter
in interfaceExpressionFactory
-
newExtension
public Value newExtension(FilterListener listener, Value target, Value arg)
Description copied from interface:ExpressionFactory
Return the value of the given extension.- Specified by:
newExtension
in interfaceExpressionFactory
-
newAggregate
public Value newAggregate(AggregateListener listener, Value arg)
Description copied from interface:ExpressionFactory
Return the value of the given function.- Specified by:
newAggregate
in interfaceExpressionFactory
-
newArgumentList
public Arguments newArgumentList(Value val1, Value val2)
Description copied from interface:ExpressionFactory
Return a function argument list consisting of the given values, either of which may itself be an argument list.- Specified by:
newArgumentList
in interfaceExpressionFactory
-
newArgumentList
public Arguments newArgumentList(Value... values)
Description copied from interface:ExpressionFactory
Return a function argument list consisting of the given values, any of which may itself be an argument list.- Specified by:
newArgumentList
in interfaceExpressionFactory
-
newUnboundVariable
public Value newUnboundVariable(java.lang.String name, java.lang.Class type)
Description copied from interface:ExpressionFactory
Return an unbound variable. This method will only be called once for a given named unbound variable. The type may beObject
if the variable is not declared.- Specified by:
newUnboundVariable
in interfaceExpressionFactory
-
newBoundVariable
public Value newBoundVariable(java.lang.String name, java.lang.Class type)
Description copied from interface:ExpressionFactory
This method will be called only once per variable bound in acontains
clause, and the returned value will be reused for any further instances of the variable in subexpression of the filter string. The type may beObject
if the variable is not declared.- Specified by:
newBoundVariable
in interfaceExpressionFactory
-
cast
public Value cast(Value val, java.lang.Class cls)
Description copied from interface:ExpressionFactory
Cast the value to the given class.- Specified by:
cast
in interfaceExpressionFactory
-
add
public Value add(Value val1, Value val2)
Description copied from interface:ExpressionFactory
Return a value representing the two values added together.- Specified by:
add
in interfaceExpressionFactory
-
subtract
public Value subtract(Value val1, Value val2)
Description copied from interface:ExpressionFactory
Return a value representing the second value subtracted from the first.- Specified by:
subtract
in interfaceExpressionFactory
-
multiply
public Value multiply(Value val1, Value val2)
Description copied from interface:ExpressionFactory
Return a value representing the two values multiplied together.- Specified by:
multiply
in interfaceExpressionFactory
-
divide
public Value divide(Value val1, Value val2)
Description copied from interface:ExpressionFactory
Return a value representing the first value divided by the first one.- Specified by:
divide
in interfaceExpressionFactory
-
mod
public Value mod(Value val1, Value val2)
Description copied from interface:ExpressionFactory
Return a value representing the first value mod'd by the second one.- Specified by:
mod
in interfaceExpressionFactory
-
abs
public Value abs(Value val)
Description copied from interface:ExpressionFactory
Return a value representing the absolute value of the given one.- Specified by:
abs
in interfaceExpressionFactory
-
indexOf
public Value indexOf(Value val1, Value val2)
Description copied from interface:ExpressionFactory
Return a value representing the indexOf (LOCATE in JPQL) function on the given target with the given args. The optional second argument is one-based.- Specified by:
indexOf
in interfaceExpressionFactory
-
concat
public Value concat(Value val1, Value val2)
Description copied from interface:ExpressionFactory
Return a value representing the concatenation of the given target with the given args.- Specified by:
concat
in interfaceExpressionFactory
-
stringLength
public Value stringLength(Value str)
Description copied from interface:ExpressionFactory
Returns the number of characters in the String value.- Specified by:
stringLength
in interfaceExpressionFactory
-
trim
public Value trim(Value str, Value trimChar, java.lang.Boolean where)
Description copied from interface:ExpressionFactory
Trims the specified specified trimChar from the specified value.- Specified by:
trim
in interfaceExpressionFactory
- Parameters:
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 trailing
-
sqrt
public Value sqrt(Value val)
Description copied from interface:ExpressionFactory
Return the square root of the given value.- Specified by:
sqrt
in interfaceExpressionFactory
-
substring
public Value substring(Value val1, Value val2)
Description copied from interface:ExpressionFactory
Return a value representing the substring function on the given target with the given args. Unlike as withString.substring(int)
, the start index is one-based, and the second argument is the length.- Specified by:
substring
in interfaceExpressionFactory
-
toUpperCase
public Value toUpperCase(Value val)
Description copied from interface:ExpressionFactory
Return the upper case of the given value.- Specified by:
toUpperCase
in interfaceExpressionFactory
-
toLowerCase
public Value toLowerCase(Value val)
Description copied from interface:ExpressionFactory
Return the upper case of the given value.- Specified by:
toLowerCase
in interfaceExpressionFactory
-
avg
public Value avg(Value val)
Description copied from interface:ExpressionFactory
Return the average of the given value for all matches.- Specified by:
avg
in interfaceExpressionFactory
-
count
public Value count(Value val)
Description copied from interface:ExpressionFactory
Return the count of the given value for all matches.- Specified by:
count
in interfaceExpressionFactory
-
distinct
public Value distinct(Value val)
Description copied from interface:ExpressionFactory
Return distinct values of the given value. This is typically used within aggregates, for example: max(distinct(path))- Specified by:
distinct
in interfaceExpressionFactory
-
max
public Value max(Value val)
Description copied from interface:ExpressionFactory
Return the max of the given value for all matches.- Specified by:
max
in interfaceExpressionFactory
-
min
public Value min(Value val)
Description copied from interface:ExpressionFactory
Return the max of the given value for all matches.- Specified by:
min
in interfaceExpressionFactory
-
sum
public Value sum(Value val)
Description copied from interface:ExpressionFactory
Return the max of the given value for all matches.- Specified by:
sum
in interfaceExpressionFactory
-
any
public Value any(Value val)
Description copied from interface:ExpressionFactory
Return an expression representing the given condition.- Specified by:
any
in interfaceExpressionFactory
-
all
public Value all(Value val)
Description copied from interface:ExpressionFactory
Return an expression representing the given condition.- Specified by:
all
in interfaceExpressionFactory
-
size
public Value size(Value val)
Description copied from interface:ExpressionFactory
Return an expression representing the given condition.- Specified by:
size
in interfaceExpressionFactory
-
index
public Value index(Value val)
Description copied from interface:ExpressionFactory
Return an index/position of the given value within a collection/map.- Specified by:
index
in interfaceExpressionFactory
-
type
public Value type(Value val)
Description copied from interface:ExpressionFactory
Return the type/class of the given value.- Specified by:
type
in interfaceExpressionFactory
-
mapEntry
public Value mapEntry(Value key, Value val)
Description copied from interface:ExpressionFactory
Return the map entry of the given value.- Specified by:
mapEntry
in interfaceExpressionFactory
-
mapKey
public Value mapKey(Value key, Value val)
Description copied from interface:ExpressionFactory
Return the map key of the given value- Specified by:
mapKey
in interfaceExpressionFactory
-
getKey
public Value getKey(Value val)
Description copied from interface:ExpressionFactory
Path navigation thru map key- Specified by:
getKey
in interfaceExpressionFactory
-
getObjectId
public Value getObjectId(Value val)
Description copied from interface:ExpressionFactory
Return the object id of the given value.- Specified by:
getObjectId
in interfaceExpressionFactory
-
generalCaseExpression
public Value generalCaseExpression(Expression[] exp, Value val)
Description copied from interface:ExpressionFactory
Return a general case expression- Specified by:
generalCaseExpression
in interfaceExpressionFactory
-
simpleCaseExpression
public Value simpleCaseExpression(Value caseOperand, Expression[] exp, Value val)
Description copied from interface:ExpressionFactory
Return a simple case expression- Specified by:
simpleCaseExpression
in interfaceExpressionFactory
-
whenCondition
public Expression whenCondition(Expression exp, Value val)
Description copied from interface:ExpressionFactory
Return a when condidional clause- Specified by:
whenCondition
in interfaceExpressionFactory
-
whenScalar
public Expression whenScalar(Value val1, Value val2)
Description copied from interface:ExpressionFactory
Return a when scalar_expression clause- Specified by:
whenScalar
in interfaceExpressionFactory
-
coalesceExpression
public Value coalesceExpression(Value[] val)
Description copied from interface:ExpressionFactory
Return a coalesce expression- Specified by:
coalesceExpression
in interfaceExpressionFactory
-
nullIfExpression
public Value nullIfExpression(Value val1, Value val2)
Description copied from interface:ExpressionFactory
Return a nullif expression- Specified by:
nullIfExpression
in interfaceExpressionFactory
-
newFunction
public Value newFunction(java.lang.String functionName, java.lang.Class<?> resultType, Value... args)
Description copied from interface:ExpressionFactory
Return a value representing the given datastore function with the given arguments.- Specified by:
newFunction
in interfaceExpressionFactory
-
isVerticalType
public boolean isVerticalType(Value val)
Description copied from interface:ExpressionFactory
Return true if the Value is a Type expression and the Type uses joined table strategy.- Specified by:
isVerticalType
in interfaceExpressionFactory
-
-