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 Valueabs(Value val)Return a value representing the absolute value of the given one.Valueadd(Value val1, Value val2)Return a value representing the two values added together.Valueall(Value val)Return an expression representing the given condition.Expressionand(Expression exp1, Expression exp2)Return the two expressions AND'd together.Valueany(Value val)Return an expression representing the given condition.ExpressionasExpression(Value v)Return the given value as an expression.Valueavg(Value val)Return the average of the given value for all matches.ExpressionbindKeyVariable(Value var, Value val)Bind the given variable to the key set of the given map value.ExpressionbindValueVariable(Value var, Value val)Bind the given variable to the value set of the given map value.ExpressionbindVariable(Value var, Value val)Bind the given variable to the given collection value.Valuecast(Value val, java.lang.Class cls)Cast the value to the given class.ValuecoalesceExpression(Value[] val)Return a coalesce expressionValueconcat(Value val1, Value val2)Return a value representing the concatenation of the given target with the given args.Expressioncontains(Value v1, Value v2)Return an expression representing the given condition.ExpressioncontainsKey(Value v1, Value v2)Return an expression representing the given condition.ExpressioncontainsValue(Value v1, Value v2)Return an expression representing the given condition.Valuecount(Value val)Return the count of the given value for all matches.java.util.Listdistinct(QueryExpressions exps, boolean fromExtent, java.util.List matches)Filter the given list of matches, removing duplicate entries.Valuedistinct(Value val)Return distinct values of the given value.Valuedivide(Value val1, Value val2)Return a value representing the first value divided by the first one.ExpressionemptyExpression()Return a blank expression; this is used when the filter is empty.ExpressionendsWith(Value v1, Value v2)Return whether the first string ends with the second.Expressionequal(Value v1, Value v2)Return an expression representing the given condition.ValuegeneralCaseExpression(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.ValuegetKey(Value val)Path navigation thru map keyValuegetMapValue(Value map, Value arg)Return an expression representing the given condition.ValuegetNull()Return a value representing null.ValuegetObjectId(Value val)Return the object id of the given value.ValuegetThis()Return a value representingthis.ExpressiongreaterThan(Value v1, Value v2)Return an expression representing the given condition.ExpressiongreaterThanEqual(Value v1, Value v2)Return an expression representing the given condition.java.util.Listgroup(QueryExpressions exps, java.util.List matches, StoreContext ctx, java.lang.Object[] params)Group the list of matches into a list of lists.Valueindex(Value val)Return an index/position of the given value within a collection/map.ValueindexOf(Value val1, Value val2)Return a value representing the indexOf (LOCATE in JPQL) function on the given target with the given args.ExpressionisEmpty(Value v1)Return an expression representing the given condition.ExpressionisInstance(Value v1, java.lang.Class c)Return whether the first value is an instance of the given class.ExpressionisNotEmpty(Value v1)Return an expression representing the given condition.booleanisVerticalType(Value val)Return true if the Value is a Type expression and the Type uses joined table strategy.ExpressionlessThan(Value v1, Value v2)Return an expression representing the given condition.ExpressionlessThanEqual(Value v1, Value v2)Return an expression representing the given condition.ValuemapEntry(Value key, Value val)Return the map entry of the given value.ValuemapKey(Value key, Value val)Return the map key of the given valueprotected booleanmatches(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.booleanmatches(QueryExpressions exps, java.util.Collection group, StoreContext ctx, java.lang.Object[] params)Return true if the given group matches the having expression.booleanmatches(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.Expressionmatches(Value v1, Value v2, java.lang.String single, java.lang.String multi, java.lang.String esc)Return whether the string matches the matching pattern.Valuemax(Value val)Return the max of the given value for all matches.Valuemin(Value val)Return the max of the given value for all matches.Valuemod(Value val1, Value val2)Return a value representing the first value mod'd by the second one.Valuemultiply(Value val1, Value val2)Return a value representing the two values multiplied together.ValuenewAggregate(AggregateListener listener, Value arg)Return the value of the given function.ArgumentsnewArgumentList(Value... values)Return a function argument list consisting of the given values, any of which may itself be an argument list.ArgumentsnewArgumentList(Value val1, Value val2)Return a function argument list consisting of the given values, either of which may itself be an argument list.ValuenewBoundVariable(java.lang.String name, java.lang.Class type)This method will be called only once per variable bound in acontainsclause, and the returned value will be reused for any further instances of the variable in subexpression of the filter string.ParameternewCollectionValuedParameter(java.lang.Object name, java.lang.Class type)Return a value representing a collection-valued parameter.ValuenewExtension(FilterListener listener, Value target, Value arg)Return the value of the given extension.ValuenewFunction(java.lang.String functionName, java.lang.Class<?> resultType, Value... args)Return a value representing the given datastore function with the given arguments.LiteralnewLiteral(java.lang.Object val, int parseType)Return a value representing the given constant, which will be aNumber,String, orBooleaninstance.ParameternewParameter(java.lang.Object name, java.lang.Class type)Return a value representing a parameter for the given value.PathnewPath()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.cityPathnewPath(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.citySubquerynewSubquery(ClassMetaData candidate, boolean subs, java.lang.String alias)Return a subquery.LiteralnewTypeLiteral(java.lang.Object val, int parseType)Return a value representing the given constant, which will be aNumber,String, orBooleaninstance.ValuenewUnboundVariable(java.lang.String name, java.lang.Class type)Return an unbound variable.Expressionnot(Expression exp)Return the inverse of this expression.ExpressionnotEqual(Value v1, Value v2)Return an expression representing the given condition.ExpressionnotMatches(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.ValuenullIfExpression(Value val1, Value val2)Return a nullif expressionExpressionor(Expression exp1, Expression exp2)Return the two expressions OR'd together.java.util.Listorder(QueryExpressions exps, java.util.List matches, StoreContext ctx, java.lang.Object[] params)Order the given list of matches on the given value.java.util.Listproject(QueryExpressions exps, java.util.List matches, StoreContext ctx, java.lang.Object[] params)Create the projections for the given results.ValuesimpleCaseExpression(Value caseOperand, Expression[] exp, Value val)Return a simple case expressionValuesize(Value val)Return an expression representing the given condition.Valuesqrt(Value val)Return the square root of the given value.ExpressionstartsWith(Value v1, Value v2)Return whether the first string starts with the second.ValuestringLength(Value str)Returns the number of characters in the String value.Valuesubstring(Value val1, Value val2)Return a value representing the substring function on the given target with the given args.Valuesubtract(Value val1, Value val2)Return a value representing the second value subtracted from the first.Valuesum(Value val)Return the max of the given value for all matches.ValuetoLowerCase(Value val)Return the upper case of the given value.ValuetoUpperCase(Value val)Return the upper case of the given value.Valuetrim(Value str, Value trimChar, java.lang.Boolean where)Trims the specified specified trimChar from the specified value.Valuetype(Value val)Return the type/class of the given value.ExpressionwhenCondition(Expression exp, Value val)Return a when condidional clauseExpressionwhenScalar(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:ExpressionFactoryReturn a blank expression; this is used when the filter is empty.- Specified by:
emptyExpressionin interfaceExpressionFactory
-
asExpression
public Expression asExpression(Value v)
Description copied from interface:ExpressionFactoryReturn the given value as an expression.- Specified by:
asExpressionin interfaceExpressionFactory
-
equal
public Expression equal(Value v1, Value v2)
Description copied from interface:ExpressionFactoryReturn an expression representing the given condition.- Specified by:
equalin interfaceExpressionFactory
-
notEqual
public Expression notEqual(Value v1, Value v2)
Description copied from interface:ExpressionFactoryReturn an expression representing the given condition.- Specified by:
notEqualin interfaceExpressionFactory
-
lessThan
public Expression lessThan(Value v1, Value v2)
Description copied from interface:ExpressionFactoryReturn an expression representing the given condition.- Specified by:
lessThanin interfaceExpressionFactory
-
greaterThan
public Expression greaterThan(Value v1, Value v2)
Description copied from interface:ExpressionFactoryReturn an expression representing the given condition.- Specified by:
greaterThanin interfaceExpressionFactory
-
lessThanEqual
public Expression lessThanEqual(Value v1, Value v2)
Description copied from interface:ExpressionFactoryReturn an expression representing the given condition.- Specified by:
lessThanEqualin interfaceExpressionFactory
-
greaterThanEqual
public Expression greaterThanEqual(Value v1, Value v2)
Description copied from interface:ExpressionFactoryReturn an expression representing the given condition.- Specified by:
greaterThanEqualin interfaceExpressionFactory
-
isEmpty
public Expression isEmpty(Value v1)
Description copied from interface:ExpressionFactoryReturn an expression representing the given condition.- Specified by:
isEmptyin interfaceExpressionFactory
-
isNotEmpty
public Expression isNotEmpty(Value v1)
Description copied from interface:ExpressionFactoryReturn an expression representing the given condition.- Specified by:
isNotEmptyin interfaceExpressionFactory
-
contains
public Expression contains(Value v1, Value v2)
Description copied from interface:ExpressionFactoryReturn an expression representing the given condition.- Specified by:
containsin interfaceExpressionFactory
-
containsKey
public Expression containsKey(Value v1, Value v2)
Description copied from interface:ExpressionFactoryReturn an expression representing the given condition.- Specified by:
containsKeyin interfaceExpressionFactory
-
containsValue
public Expression containsValue(Value v1, Value v2)
Description copied from interface:ExpressionFactoryReturn an expression representing the given condition.- Specified by:
containsValuein interfaceExpressionFactory
-
getMapValue
public Value getMapValue(Value map, Value arg)
Description copied from interface:ExpressionFactoryReturn an expression representing the given condition.- Specified by:
getMapValuein interfaceExpressionFactory
-
isInstance
public Expression isInstance(Value v1, java.lang.Class c)
Description copied from interface:ExpressionFactoryReturn whether the first value is an instance of the given class.- Specified by:
isInstancein interfaceExpressionFactory
-
and
public Expression and(Expression exp1, Expression exp2)
Description copied from interface:ExpressionFactoryReturn the two expressions AND'd together.- Specified by:
andin interfaceExpressionFactory
-
or
public Expression or(Expression exp1, Expression exp2)
Description copied from interface:ExpressionFactoryReturn the two expressions OR'd together.- Specified by:
orin interfaceExpressionFactory
-
not
public Expression not(Expression exp)
Description copied from interface:ExpressionFactoryReturn the inverse of this expression.- Specified by:
notin interfaceExpressionFactory
-
bindVariable
public Expression bindVariable(Value var, Value val)
Description copied from interface:ExpressionFactoryBind the given variable to the given collection value.- Specified by:
bindVariablein interfaceExpressionFactory
-
bindKeyVariable
public Expression bindKeyVariable(Value var, Value val)
Description copied from interface:ExpressionFactoryBind the given variable to the key set of the given map value.- Specified by:
bindKeyVariablein interfaceExpressionFactory
-
bindValueVariable
public Expression bindValueVariable(Value var, Value val)
Description copied from interface:ExpressionFactoryBind the given variable to the value set of the given map value.- Specified by:
bindValueVariablein interfaceExpressionFactory
-
endsWith
public Expression endsWith(Value v1, Value v2)
Description copied from interface:ExpressionFactoryReturn whether the first string ends with the second.- Specified by:
endsWithin 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:ExpressionFactoryReturn whether the string matches the matching pattern.- Specified by:
matchesin 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:ExpressionFactoryReturn whether the string does not match the given pattern.- Specified by:
notMatchesin 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:ExpressionFactoryReturn whether the first string starts with the second.- Specified by:
startsWithin interfaceExpressionFactory
-
newSubquery
public Subquery newSubquery(ClassMetaData candidate, boolean subs, java.lang.String alias)
Description copied from interface:ExpressionFactoryReturn a subquery. Paths for the candidates of the subquery are created withExpressionFactory.newPath(Value), passing in the subquery as the value.- Specified by:
newSubqueryin 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:ExpressionFactoryReturn 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:
newPathin interfaceExpressionFactory
-
newPath
public Path newPath(Value val)
Description copied from interface:ExpressionFactoryReturn 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:
newPathin interfaceExpressionFactory
-
newLiteral
public Literal newLiteral(java.lang.Object val, int parseType)
Description copied from interface:ExpressionFactoryReturn a value representing the given constant, which will be aNumber,String, orBooleaninstance.- Specified by:
newLiteralin interfaceExpressionFactory
-
newTypeLiteral
public Literal newTypeLiteral(java.lang.Object val, int parseType)
Description copied from interface:ExpressionFactoryReturn a value representing the given constant, which will be aNumber,String, orBooleaninstance.- Specified by:
newTypeLiteralin interfaceExpressionFactory
-
getThis
public Value getThis()
Description copied from interface:ExpressionFactoryReturn a value representingthis.- Specified by:
getThisin interfaceExpressionFactory
-
getNull
public Value getNull()
Description copied from interface:ExpressionFactoryReturn a value representing null.- Specified by:
getNullin interfaceExpressionFactory
-
getCurrentDate
public <T extends java.util.Date> Value getCurrentDate(java.lang.Class<T> dateType)
Description copied from interface:ExpressionFactoryReturn a value representing the current date.- Specified by:
getCurrentDatein interfaceExpressionFactory
-
getCurrentTime
public <T extends java.util.Date> Value getCurrentTime(java.lang.Class<T> dateType)
Description copied from interface:ExpressionFactoryReturn a value representing the current time.- Specified by:
getCurrentTimein interfaceExpressionFactory
-
getCurrentTimestamp
public <T extends java.util.Date> Value getCurrentTimestamp(java.lang.Class<T> dateType)
Description copied from interface:ExpressionFactoryReturn a value representing the current timestamp.- Specified by:
getCurrentTimestampin interfaceExpressionFactory
-
newParameter
public Parameter newParameter(java.lang.Object name, java.lang.Class type)
Description copied from interface:ExpressionFactoryReturn a value representing a parameter for the given value. The type may beObjectif the parameter is not declared.- Specified by:
newParameterin interfaceExpressionFactory
-
newCollectionValuedParameter
public Parameter newCollectionValuedParameter(java.lang.Object name, java.lang.Class type)
Description copied from interface:ExpressionFactoryReturn a value representing a collection-valued parameter. The type may beObjectif the parameter is not declared.- Specified by:
newCollectionValuedParameterin interfaceExpressionFactory
-
newExtension
public Value newExtension(FilterListener listener, Value target, Value arg)
Description copied from interface:ExpressionFactoryReturn the value of the given extension.- Specified by:
newExtensionin interfaceExpressionFactory
-
newAggregate
public Value newAggregate(AggregateListener listener, Value arg)
Description copied from interface:ExpressionFactoryReturn the value of the given function.- Specified by:
newAggregatein interfaceExpressionFactory
-
newArgumentList
public Arguments newArgumentList(Value val1, Value val2)
Description copied from interface:ExpressionFactoryReturn a function argument list consisting of the given values, either of which may itself be an argument list.- Specified by:
newArgumentListin interfaceExpressionFactory
-
newArgumentList
public Arguments newArgumentList(Value... values)
Description copied from interface:ExpressionFactoryReturn a function argument list consisting of the given values, any of which may itself be an argument list.- Specified by:
newArgumentListin interfaceExpressionFactory
-
newUnboundVariable
public Value newUnboundVariable(java.lang.String name, java.lang.Class type)
Description copied from interface:ExpressionFactoryReturn an unbound variable. This method will only be called once for a given named unbound variable. The type may beObjectif the variable is not declared.- Specified by:
newUnboundVariablein interfaceExpressionFactory
-
newBoundVariable
public Value newBoundVariable(java.lang.String name, java.lang.Class type)
Description copied from interface:ExpressionFactoryThis method will be called only once per variable bound in acontainsclause, and the returned value will be reused for any further instances of the variable in subexpression of the filter string. The type may beObjectif the variable is not declared.- Specified by:
newBoundVariablein interfaceExpressionFactory
-
cast
public Value cast(Value val, java.lang.Class cls)
Description copied from interface:ExpressionFactoryCast the value to the given class.- Specified by:
castin interfaceExpressionFactory
-
add
public Value add(Value val1, Value val2)
Description copied from interface:ExpressionFactoryReturn a value representing the two values added together.- Specified by:
addin interfaceExpressionFactory
-
subtract
public Value subtract(Value val1, Value val2)
Description copied from interface:ExpressionFactoryReturn a value representing the second value subtracted from the first.- Specified by:
subtractin interfaceExpressionFactory
-
multiply
public Value multiply(Value val1, Value val2)
Description copied from interface:ExpressionFactoryReturn a value representing the two values multiplied together.- Specified by:
multiplyin interfaceExpressionFactory
-
divide
public Value divide(Value val1, Value val2)
Description copied from interface:ExpressionFactoryReturn a value representing the first value divided by the first one.- Specified by:
dividein interfaceExpressionFactory
-
mod
public Value mod(Value val1, Value val2)
Description copied from interface:ExpressionFactoryReturn a value representing the first value mod'd by the second one.- Specified by:
modin interfaceExpressionFactory
-
abs
public Value abs(Value val)
Description copied from interface:ExpressionFactoryReturn a value representing the absolute value of the given one.- Specified by:
absin interfaceExpressionFactory
-
indexOf
public Value indexOf(Value val1, Value val2)
Description copied from interface:ExpressionFactoryReturn 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:
indexOfin interfaceExpressionFactory
-
concat
public Value concat(Value val1, Value val2)
Description copied from interface:ExpressionFactoryReturn a value representing the concatenation of the given target with the given args.- Specified by:
concatin interfaceExpressionFactory
-
stringLength
public Value stringLength(Value str)
Description copied from interface:ExpressionFactoryReturns the number of characters in the String value.- Specified by:
stringLengthin interfaceExpressionFactory
-
trim
public Value trim(Value str, Value trimChar, java.lang.Boolean where)
Description copied from interface:ExpressionFactoryTrims the specified specified trimChar from the specified value.- Specified by:
trimin 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:ExpressionFactoryReturn the square root of the given value.- Specified by:
sqrtin interfaceExpressionFactory
-
substring
public Value substring(Value val1, Value val2)
Description copied from interface:ExpressionFactoryReturn 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:
substringin interfaceExpressionFactory
-
toUpperCase
public Value toUpperCase(Value val)
Description copied from interface:ExpressionFactoryReturn the upper case of the given value.- Specified by:
toUpperCasein interfaceExpressionFactory
-
toLowerCase
public Value toLowerCase(Value val)
Description copied from interface:ExpressionFactoryReturn the upper case of the given value.- Specified by:
toLowerCasein interfaceExpressionFactory
-
avg
public Value avg(Value val)
Description copied from interface:ExpressionFactoryReturn the average of the given value for all matches.- Specified by:
avgin interfaceExpressionFactory
-
count
public Value count(Value val)
Description copied from interface:ExpressionFactoryReturn the count of the given value for all matches.- Specified by:
countin interfaceExpressionFactory
-
distinct
public Value distinct(Value val)
Description copied from interface:ExpressionFactoryReturn distinct values of the given value. This is typically used within aggregates, for example: max(distinct(path))- Specified by:
distinctin interfaceExpressionFactory
-
max
public Value max(Value val)
Description copied from interface:ExpressionFactoryReturn the max of the given value for all matches.- Specified by:
maxin interfaceExpressionFactory
-
min
public Value min(Value val)
Description copied from interface:ExpressionFactoryReturn the max of the given value for all matches.- Specified by:
minin interfaceExpressionFactory
-
sum
public Value sum(Value val)
Description copied from interface:ExpressionFactoryReturn the max of the given value for all matches.- Specified by:
sumin interfaceExpressionFactory
-
any
public Value any(Value val)
Description copied from interface:ExpressionFactoryReturn an expression representing the given condition.- Specified by:
anyin interfaceExpressionFactory
-
all
public Value all(Value val)
Description copied from interface:ExpressionFactoryReturn an expression representing the given condition.- Specified by:
allin interfaceExpressionFactory
-
size
public Value size(Value val)
Description copied from interface:ExpressionFactoryReturn an expression representing the given condition.- Specified by:
sizein interfaceExpressionFactory
-
index
public Value index(Value val)
Description copied from interface:ExpressionFactoryReturn an index/position of the given value within a collection/map.- Specified by:
indexin interfaceExpressionFactory
-
type
public Value type(Value val)
Description copied from interface:ExpressionFactoryReturn the type/class of the given value.- Specified by:
typein interfaceExpressionFactory
-
mapEntry
public Value mapEntry(Value key, Value val)
Description copied from interface:ExpressionFactoryReturn the map entry of the given value.- Specified by:
mapEntryin interfaceExpressionFactory
-
mapKey
public Value mapKey(Value key, Value val)
Description copied from interface:ExpressionFactoryReturn the map key of the given value- Specified by:
mapKeyin interfaceExpressionFactory
-
getKey
public Value getKey(Value val)
Description copied from interface:ExpressionFactoryPath navigation thru map key- Specified by:
getKeyin interfaceExpressionFactory
-
getObjectId
public Value getObjectId(Value val)
Description copied from interface:ExpressionFactoryReturn the object id of the given value.- Specified by:
getObjectIdin interfaceExpressionFactory
-
generalCaseExpression
public Value generalCaseExpression(Expression[] exp, Value val)
Description copied from interface:ExpressionFactoryReturn a general case expression- Specified by:
generalCaseExpressionin interfaceExpressionFactory
-
simpleCaseExpression
public Value simpleCaseExpression(Value caseOperand, Expression[] exp, Value val)
Description copied from interface:ExpressionFactoryReturn a simple case expression- Specified by:
simpleCaseExpressionin interfaceExpressionFactory
-
whenCondition
public Expression whenCondition(Expression exp, Value val)
Description copied from interface:ExpressionFactoryReturn a when condidional clause- Specified by:
whenConditionin interfaceExpressionFactory
-
whenScalar
public Expression whenScalar(Value val1, Value val2)
Description copied from interface:ExpressionFactoryReturn a when scalar_expression clause- Specified by:
whenScalarin interfaceExpressionFactory
-
coalesceExpression
public Value coalesceExpression(Value[] val)
Description copied from interface:ExpressionFactoryReturn a coalesce expression- Specified by:
coalesceExpressionin interfaceExpressionFactory
-
nullIfExpression
public Value nullIfExpression(Value val1, Value val2)
Description copied from interface:ExpressionFactoryReturn a nullif expression- Specified by:
nullIfExpressionin interfaceExpressionFactory
-
newFunction
public Value newFunction(java.lang.String functionName, java.lang.Class<?> resultType, Value... args)
Description copied from interface:ExpressionFactoryReturn a value representing the given datastore function with the given arguments.- Specified by:
newFunctionin interfaceExpressionFactory
-
isVerticalType
public boolean isVerticalType(Value val)
Description copied from interface:ExpressionFactoryReturn true if the Value is a Type expression and the Type uses joined table strategy.- Specified by:
isVerticalTypein interfaceExpressionFactory
-
-