|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.modeshape.graph.query.process.ProcessingComponent org.modeshape.graph.query.process.DelegatingComponent org.modeshape.graph.query.process.SelectComponent
public class SelectComponent
Nested Class Summary | |
---|---|
static interface |
SelectComponent.Analyzer
Inteface for criteria evaluation operations that cannot be defined efficiently, correctly, or completely using only the tuple values. |
protected static interface |
SelectComponent.CompareOperation
Interface defining the Comparison functionality for a specific Operator . |
static interface |
SelectComponent.ConstraintChecker
Interface used to determine whether a tuple satisfies all of the constraints applied to the SELECT node. |
Nested classes/interfaces inherited from class org.modeshape.graph.query.process.ProcessingComponent |
---|
ProcessingComponent.DynamicOperation |
Constructor Summary | |
---|---|
SelectComponent(ProcessingComponent delegate,
Constraint constraint,
Map<String,Object> variables)
Create a SELECT processing component that pass those tuples that satisfy the supplied constraint. |
|
SelectComponent(ProcessingComponent delegate,
Constraint constraint,
Map<String,Object> variables,
SelectComponent.Analyzer analyzer)
Create a SELECT processing component that pass those tuples that satisfy the supplied constraint, using the supplied SelectComponent.Analyzer for the verification of the more complex/arduous constraints. |
Method Summary | |
---|---|
protected SelectComponent.ConstraintChecker |
createChecker(TypeSystem types,
Schemata schemata,
QueryResults.Columns columns,
Constraint constraint,
Map<String,Object> variables,
SelectComponent.Analyzer analyzer)
Create the constraint evaluator that is used by the SelectComponent to evaluate the supplied criteria . |
protected SelectComponent.ConstraintChecker |
createChecker(TypeSystem types,
Schemata schemata,
QueryResults.Columns columns,
ProcessingComponent.DynamicOperation dynamicOperation,
Operator operator,
StaticOperand staticOperand)
|
protected static Pattern |
createRegexFromLikeExpression(String likeExpression)
|
List<Object[]> |
execute()
Execute this stage of processing and return the resulting tuples that each conform to the columns . |
Methods inherited from class org.modeshape.graph.query.process.DelegatingComponent |
---|
close, delegate |
Methods inherited from class org.modeshape.graph.query.process.ProcessingComponent |
---|
createDynamicOperation, createSortComparator, emptyTuples, getColumns, getContext, problems |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SelectComponent(ProcessingComponent delegate, Constraint constraint, Map<String,Object> variables)
FullTextSearch
, SameNode
and PropertyExistence
) are evaluated in a fairly limited
fashion, essentially operating upon the tuple values themselves.
For example, the SameNode
constraint is satisfied when the selected node has the same path as the constraint's
path
. And the PropertyExistence
constraint is satisfied when the
property
is represented in the tuple with a non-null value. Similarly,
FullTextSearch
always evaluates to true. Obviously these implementations will likely not be sufficient for many
purposes. But in cases where these particular constraints are handled in other ways (and thus not expected to be seen by
this processor), this form may be sufficient.
For more control over the behavior, use the constructor that takes an SelectComponent.Analyzer
implementation (see
SelectComponent(ProcessingComponent, Constraint, Map, Analyzer)
).
delegate
- the delegate processing component that this component should use to obtain the input tuples; may not be
nullconstraint
- the query constraint; may not be nullvariables
- the map of variables keyed by their name (as used in BindVariableName
constraints); may be nullpublic SelectComponent(ProcessingComponent delegate, Constraint constraint, Map<String,Object> variables, SelectComponent.Analyzer analyzer)
SelectComponent.Analyzer
for the verification of the more complex/arduous constraints.
delegate
- the delegate processing component that this component should use to obtain the input tuples; may not be
nullconstraint
- the query constraint; may not be nullvariables
- the map of variables keyed by their name (as used in BindVariableName
constraints); may be nullanalyzer
- the analyzer; may be nullMethod Detail |
---|
public List<Object[]> execute()
columns
.
execute
in class ProcessingComponent
columns
; never nullProcessingComponent.execute()
protected SelectComponent.ConstraintChecker createChecker(TypeSystem types, Schemata schemata, QueryResults.Columns columns, Constraint constraint, Map<String,Object> variables, SelectComponent.Analyzer analyzer)
SelectComponent
to evaluate the supplied criteria
. For the most correct behavior, specify an SelectComponent.Analyzer
implementation.
types
- the type system; may not be nullschemata
- the schemata; may not be nullcolumns
- the definition of the result columns and the tuples; may not be nullconstraint
- the criteria that this SelectComponent
is to evaluatevariables
- the variables that are to be substituted for the various BindVariableName
operands
; may not be nullanalyzer
- the analyzer that should be used to evalulate the operations that cannot be defined efficiently, correctly,
or completely using only the tuple values; may be null if the tuple values should be used to perform the evaluation
in perhaps an non-ideal manner
protected SelectComponent.ConstraintChecker createChecker(TypeSystem types, Schemata schemata, QueryResults.Columns columns, ProcessingComponent.DynamicOperation dynamicOperation, Operator operator, StaticOperand staticOperand)
protected static Pattern createRegexFromLikeExpression(String likeExpression)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |