Package org.apache.openjpa.kernel.exps
Class Val
java.lang.Object
org.apache.openjpa.kernel.exps.Val
- All Implemented Interfaces:
Serializable
,Value
- Direct Known Subclasses:
CandidatePath
,Coalesce
,NullIf
,SimpleCase
An in-memory representation of a
Value
.- Author:
- Abe White
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
acceptVisit
(ExpressionVisitor visitor) Accept a visit from a tree visitor.protected abstract Object
eval
(Object candidate, Object orig, StoreContext ctx, Object[] params) Return this value for the given candidate.protected Collection
eval
(Collection candidates, Object orig, StoreContext ctx, Object[] params) Return a list of values resulting from evaluating each given candidate.final Object
evaluate
(Object candidate, Object orig, StoreContext ctx, Object[] params) Return this value as a projection on the given candidate.final Object
evaluate
(Collection candidates, Object orig, StoreContext ctx, Object[] params) Return this value as an aggregate projection on the given group of candidates.getAlias()
Return select item aliasReturn any associated persistent type.getName()
getPath()
Return 'this' concrete class if alias is set, otherwise nullboolean
Return true if this value is an aggregate.boolean
Return true if this value is a variable.boolean
isXPath()
Return true if this value is an XML Path.void
Set select item aliasvoid
setMetaData
(ClassMetaData meta) Associate a persistent type with this value.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.openjpa.kernel.exps.Value
getType, setImplicitType
-
Constructor Details
-
Val
public Val()
-
-
Method Details
-
evaluate
Return this value as a projection on the given candidate. -
evaluate
Return this value as an aggregate projection on the given group of candidates. -
eval
Return this value for the given candidate. -
eval
Return a list of values resulting from evaluating each given candidate. By default, this implementation invokes#eval(Object,Object,StoreContext,Map)
for each instance and packs the return value into a new list. Aggregates should override. -
getMetaData
Description copied from interface:Value
Return any associated persistent type.- Specified by:
getMetaData
in interfaceValue
-
setMetaData
Description copied from interface:Value
Associate a persistent type with this value.- Specified by:
setMetaData
in interfaceValue
-
isVariable
public boolean isVariable()Description copied from interface:Value
Return true if this value is a variable.- Specified by:
isVariable
in interfaceValue
-
isAggregate
public boolean isAggregate()Description copied from interface:Value
Return true if this value is an aggregate.- Specified by:
isAggregate
in interfaceValue
-
isXPath
public boolean isXPath()Description copied from interface:Value
Return true if this value is an XML Path. -
acceptVisit
Description copied from interface:Value
Accept a visit from a tree visitor.- Specified by:
acceptVisit
in interfaceValue
-
getAlias
Description copied from interface:Value
Return select item alias -
setAlias
Description copied from interface:Value
Set select item alias -
getSelectAs
Description copied from interface:Value
Return 'this' concrete class if alias is set, otherwise null- Specified by:
getSelectAs
in interfaceValue
-
getPath
-
getName
-