public class OperandEvaluator extends Object
operands
. This class evaluates operands
in the context of a value factory
, a set of bind
variables and possibly a query result row.Constructor and Description |
---|
OperandEvaluator(javax.jcr.ValueFactory factory,
Map<String,javax.jcr.Value> variables)
Creates an operand evaluator for the given value factory and set of
bind variables.
|
OperandEvaluator(javax.jcr.ValueFactory factory,
Map<String,javax.jcr.Value> variables,
Locale locale)
Creates an operand evaluator for the given value factory and set of
bind variables.
|
Modifier and Type | Method and Description |
---|---|
javax.jcr.Value |
getValue(javax.jcr.query.qom.Operand operand,
javax.jcr.query.Row row)
Returns the value of the given operand in the context of the given row.
|
javax.jcr.Value |
getValue(javax.jcr.query.qom.StaticOperand operand)
Returns the value of the given static operand
(
literal or bind variable ). |
javax.jcr.Value |
getValue(javax.jcr.query.qom.StaticOperand operand,
int type)
Returns the value of the given static operand
(
literal or bind variable )
casted to the given type. |
javax.jcr.Value[] |
getValues(javax.jcr.query.qom.Operand operand,
javax.jcr.Node node)
Evaluates the given operand in the context of the given node.
|
javax.jcr.Value[] |
getValues(javax.jcr.query.qom.Operand operand,
javax.jcr.query.Row row)
Evaluates the given operand in the context of the given row.
|
public OperandEvaluator(javax.jcr.ValueFactory factory, Map<String,javax.jcr.Value> variables, Locale locale)
factory
- value factoryvariables
- bind variableslocale
- locale to use in upper- and lower-case conversionspublic OperandEvaluator(javax.jcr.ValueFactory factory, Map<String,javax.jcr.Value> variables)
Locale.ENGLISH
.factory
- value factoryvariables
- bind variablespublic javax.jcr.Value getValue(javax.jcr.query.qom.StaticOperand operand, int type) throws javax.jcr.RepositoryException
literal
or bind variable
)
casted to the given type.operand
- static operand to be evaluatedtype
- expected value typejavax.jcr.RepositoryException
- if a named bind variable is not found,
if the operand type is unknown, or
if the type conversion failspublic javax.jcr.Value getValue(javax.jcr.query.qom.StaticOperand operand) throws javax.jcr.RepositoryException
literal
or bind variable
).operand
- static operand to be evaluatedjavax.jcr.RepositoryException
- if a named bind variable is not found,
or if the operand type is unknownpublic javax.jcr.Value getValue(javax.jcr.query.qom.Operand operand, javax.jcr.query.Row row) throws javax.jcr.RepositoryException
getValues(Operand, Row)
method for more accurate results.operand
- operand to be evaluatedrow
- query result rowjavax.jcr.RepositoryException
- if the operand can't be evaluatedpublic javax.jcr.Value[] getValues(javax.jcr.query.qom.Operand operand, javax.jcr.query.Row row) throws javax.jcr.RepositoryException
operand
- operand to be evaluatedrow
- query result rowjavax.jcr.RepositoryException
- if the operand can't be evaluatedpublic javax.jcr.Value[] getValues(javax.jcr.query.qom.Operand operand, javax.jcr.Node node) throws javax.jcr.RepositoryException
operand
- operand to be evaluatednode
- nodejavax.jcr.RepositoryException
- if the operand can't be evaluatedCopyright © 2004-2020 The Apache Software Foundation. All Rights Reserved.