public class RowPredicateVisitor extends PredicateVisitor
GraphRowKeyExpressionFactory and HBase RegexStringComparator. Processes visitor events for query model elements
specific to assembly of HBase row filters, such as properties, wildcards,
literals, logical operators, relational operators, within the context of
HBase filter hierarchy assembly. Maintains various context information useful
to subclasses.
HBase filters may be collected into lists using FilterList each with a MUST_PASS_ALL or MUST_PASS_ONE (logical) operator. Lists may then be assembled into hierarchies used to represent complex expression trees filtering either rows or columns in HBase.
GraphRowKeyExpressionFactory| Modifier and Type | Field and Description |
|---|---|
protected String |
contextPropertyPath |
protected GraphRowKeyExpressionFactory |
rowKeyFac |
contextHBaseCompareOp, contextOpWildcard, contextProperty, contextType, contextWildcardOperatorfilterStack, params, rootFilter, rootType| Constructor and Description |
|---|
RowPredicateVisitor(org.plasma.sdo.PlasmaType rootType) |
| Modifier and Type | Method and Description |
|---|---|
void |
end(org.plasma.query.model.Expression expression)
Process the traversal end event for a query
expression removing the current
(top) HBase filter list
from the stack. |
void |
start(org.plasma.query.model.Expression expression)
Process the traversal start event for a query
expression creating a new HBase
filter list with a default MUST_PASS_ALL operator and pushes it onto the stack. |
void |
start(org.plasma.query.model.Literal literal)
Process the traversal start event for a query
literal within an
expression creating an HBase
row filter and adding it
to the filter hierarchy. |
void |
start(org.plasma.query.model.LogicalOperator operator)
Process a
logical operator
query traversal start event. |
void |
start(org.plasma.query.model.NullLiteral nullLiteral)
(non-Javadoc)
|
void |
start(org.plasma.query.model.PredicateOperator operator) |
void |
start(org.plasma.query.model.Property property)
Process the traversal start event for a query
property within an
expression just traversing the
property path if exists and capturing context information for the current
expression. |
clear, start, startfilterTokens, getFilter, getParams, log, popFilter, pushFilter, pushFiltergetChildExpressionCount, getChildExpressions, getLogicalOperatorCount, hasChildExpressions, hasWildcardend, end, end, end, end, end, end, end, end, end, end, end, end, end, end, end, end, end, end, end, end, end, end, end, getContext, start, start, start, start, start, start, start, start, start, start, start, start, start, start, start, start, startprotected String contextPropertyPath
protected GraphRowKeyExpressionFactory rowKeyFac
public RowPredicateVisitor(org.plasma.sdo.PlasmaType rootType)
public void start(org.plasma.query.model.Expression expression)
expression creating a new HBase
filter list with a default MUST_PASS_ALL operator and pushes it onto the stack. Any subsequent
literals encountered then cause a
new row filter to be created and added to this new filter list which is on
the top of the stack.start in interface org.plasma.query.visitor.QueryVisitorstart in class org.plasma.query.visitor.DefaultQueryVisitorexpression - the expressionpublic void end(org.plasma.query.model.Expression expression)
expression removing the current
(top) HBase filter list
from the stack.end in interface org.plasma.query.visitor.QueryVisitorend in class org.plasma.query.visitor.DefaultQueryVisitorexpression - the expressionpublic void start(org.plasma.query.model.Property property)
property within an
expression just traversing the
property path if exists and capturing context information for the current
expression.start in interface org.plasma.query.visitor.QueryVisitorstart in class org.plasma.query.visitor.DefaultQueryVisitorDefaultQueryVisitor.start(org.plasma.query.model.Property)public void start(org.plasma.query.model.PredicateOperator operator)
start in interface org.plasma.query.visitor.QueryVisitorstart in class org.plasma.query.visitor.DefaultQueryVisitorpublic void start(org.plasma.query.model.Literal literal)
literal within an
expression creating an HBase
row filter and adding it
to the filter hierarchy. Looks at the context under which the literal is
encountered and if a user defined row key token configuration is found,
creates a regular expression based HBase row filter.start in interface org.plasma.query.visitor.QueryVisitorstart in class org.plasma.query.visitor.DefaultQueryVisitorliteral - the expression literalGraphFilterException - if no user defined row-key token is configured for the current
literal context.public void start(org.plasma.query.model.NullLiteral nullLiteral)
start in interface org.plasma.query.visitor.QueryVisitorstart in class org.plasma.query.visitor.DefaultQueryVisitorDefaultQueryVisitor.start(org.plasma.query.model.NullLiteral)public void start(org.plasma.query.model.LogicalOperator operator)
logical operator
query traversal start event. If the filter list on the
top of the filter stack is not an 'OR' filter, since it's immutable and we
cannot modify its operator, create an 'OR' filter and swaps out the
existing filters into the new 'OR' filter list.start in interface org.plasma.query.visitor.QueryVisitorstart in class org.plasma.query.visitor.DefaultQueryVisitorCopyright © 2021. All Rights Reserved.