public final class PipelineBuilder extends Object
Builder of a query execution plan in the pipeline manner.
Constructor and Description |
---|
PipelineBuilder(INodeReadTrx pRtx)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addAndExpression(INodeReadTrx mTransaction)
Adds a and expression to the pipeline.
|
void |
addCastableExpr(INodeReadTrx mTransaction,
SingleType mSingleType)
Adds a castable expression to the pipeline.
|
void |
addCompExpression(INodeReadTrx mTransaction,
String mComp)
Adds a comparison expression to the pipeline.
|
void |
addExpr()
Adds a new pipeline stack to the stack holding all expressions.
|
void |
addExpressionSingle()
Adds a new single expression to the pipeline.
|
void |
addForExpression(int mForConditionNum)
Adds a for expression to the pipeline.
|
void |
addFunction(INodeReadTrx mTransaction,
String mFuncName,
int mNum)
Adds a function to the pipeline.
|
void |
addIfExpression(INodeReadTrx mTransaction)
Adds a if expression to the pipeline.
|
void |
addInstanceOfExpr(INodeReadTrx mTransaction,
SequenceType mSequenceType)
Adds a instance of expression to the pipeline.
|
void |
addIntExcExpression(INodeReadTrx mTransaction,
boolean mIsIntersect)
Adds a intersect or a exception expression to the pipeline.
|
void |
addLiteral(INodeReadTrx pTrans,
AtomicValue pVal)
Adds a literal expression to the pipeline.
|
void |
addOperatorExpression(INodeReadTrx mTransaction,
String mOperator)
Adds an operator expression to the pipeline.
|
void |
addOrExpression(INodeReadTrx mTransaction)
Adds a or expression to the pipeline.
|
void |
addPredicate(INodeReadTrx mTransaction)
Adds a predicate to the pipeline.
|
void |
addQuantifierExpr(INodeReadTrx mTransaction,
boolean mIsSome,
int mVarNum)
Adds a SomeExpression or an EveryExpression to the pipeline, depending on
the parameter isSome.
|
void |
addRangeExpr(INodeReadTrx mTransaction)
Adds a range expression to the pipeline.
|
void |
addStep(AbsAxis axis)
Adds a step to the pipeline.
|
void |
addStep(AbsAxis axis,
AbsFilter mFilter)
Adds a step to the pipeline.
|
void |
addTreatExpr(INodeReadTrx mTransaction,
SequenceType mSequenceType)
Adds a treat as expression to the pipeline.
|
void |
addUnionExpression(INodeReadTrx mTransaction)
Adds a union expression to the pipeline.
|
void |
addVariableExpr(INodeReadTrx mTransaction,
String mVarName)
Adds a variable expression to the pipeline.
|
void |
addVarRefExpr(INodeReadTrx mTransaction,
String mVarName)
Adds a VarRefExpr to the pipeline.
|
void |
finishExpr(INodeReadTrx mTransaction,
int mNum)
Ends an expression.
|
ExpressionSingle |
getExpression()
Returns the current pipeline.
|
AbsAxis |
getPipeline()
Returns a queue of all pipelines build so far and empties the pipeline
stack.
|
Stack<ExpressionSingle> |
getPipeStack() |
String |
toString() |
public PipelineBuilder(INodeReadTrx pRtx)
public Stack<ExpressionSingle> getPipeStack()
public void addExpr()
public void finishExpr(INodeReadTrx mTransaction, int mNum)
mTransaction
- transaction to operate onmNum
- number of singleExpressions that will be added to the sequencepublic void addExpressionSingle()
public ExpressionSingle getExpression()
public void addForExpression(int mForConditionNum)
mForConditionNum
- Number of all for conditions of the expressionpublic void addIfExpression(INodeReadTrx mTransaction)
mTransaction
- Transaction to operate with.public void addCompExpression(INodeReadTrx mTransaction, String mComp)
mTransaction
- Transaction to operate with.mComp
- Comparator type.public void addOperatorExpression(INodeReadTrx mTransaction, String mOperator)
mTransaction
- Transaction to operate with.mOperator
- Operator type.public void addUnionExpression(INodeReadTrx mTransaction)
mTransaction
- Transaction to operate with.public void addAndExpression(INodeReadTrx mTransaction)
mTransaction
- Transaction to operate with.public void addOrExpression(INodeReadTrx mTransaction)
mTransaction
- Transaction to operate with.public void addIntExcExpression(INodeReadTrx mTransaction, boolean mIsIntersect)
mTransaction
- Transaction to operate with.mIsIntersect
- true, if expression is an intersectionpublic void addLiteral(INodeReadTrx pTrans, AtomicValue pVal)
pTrans
- Transaction to operate with.pVal
- key of the literal expression.public void addStep(AbsAxis axis)
axis
- the axis step to add to the pipeline.public void addStep(AbsAxis axis, AbsFilter mFilter)
axis
- the axis step to add to the pipeline.mFilter
- the node test to add to the pipeline.public AbsAxis getPipeline()
public void addPredicate(INodeReadTrx mTransaction)
mTransaction
- Transaction to operate with.public void addQuantifierExpr(INodeReadTrx mTransaction, boolean mIsSome, int mVarNum)
mTransaction
- Transaction to operate with.mIsSome
- defines whether a some- or an EveryExpression is used.mVarNum
- number of binding variablespublic void addCastableExpr(INodeReadTrx mTransaction, SingleType mSingleType)
mTransaction
- Transaction to operate with.mSingleType
- single type the context item will be casted to.public void addRangeExpr(INodeReadTrx mTransaction)
mTransaction
- Transaction to operate with.public void addInstanceOfExpr(INodeReadTrx mTransaction, SequenceType mSequenceType)
mTransaction
- Transaction to operate with.mSequenceType
- sequence type the context item should match.public void addTreatExpr(INodeReadTrx mTransaction, SequenceType mSequenceType)
mTransaction
- Transaction to operate with.mSequenceType
- sequence type the context item will be treated as.public void addVariableExpr(INodeReadTrx mTransaction, String mVarName)
mTransaction
- Transaction to operate with.mVarName
- name of the variablepublic void addFunction(INodeReadTrx mTransaction, String mFuncName, int mNum) throws TTXPathException
mTransaction
- Transaction to operate with.mFuncName
- The name of the functionmNum
- The number of arguments that are passed to the functionTTXPathException
- if function can't be addedpublic void addVarRefExpr(INodeReadTrx mTransaction, String mVarName)
mTransaction
- the transaction to operate on.mVarName
- the name of the variableCopyright © 2013. All Rights Reserved.