public abstract class ExpNode extends Object implements Cloneable, SmartExternalizable
| Modifier and Type | Field and Description |
|---|---|
protected ExpNode |
leftChild |
protected ExpNode |
rightChild |
protected QueryTemplatePacket |
template |
| Constructor and Description |
|---|
ExpNode()
Empty constructor.
|
ExpNode(ExpNode leftChild,
ExpNode rightChild) |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(IQueryExecutor executor,
ISpaceProxy space,
Transaction txn,
int readModifier,
int max)
Accept the query executor
|
abstract void |
accept(QueryTemplateBuilder builder)
Accept the query builder Default implementation returns null - no QueryTemplatePacket is
defined
|
Object |
clone()
Override the clone method.
|
EntriesCursor |
createIndex(QueryTableData queryTableData,
IQueryResultSet<IEntryPacket> tableEntries) |
boolean |
createJoinIndex(QueryTableData tableData) |
void |
forEachChild(java.util.function.Consumer<ExpNode> consumer)
Applies the consumer on each non-null child.
|
ExpNode |
getLeftChild() |
ExpNode |
getRightChild() |
QueryTemplatePacket |
getTemplate() |
boolean |
isContainsItemNode() |
boolean |
isContainsItemsRootNode() |
boolean |
isInnerQuery()
Gets whether this node has a child which is an inner query node
|
boolean |
isJoined()
is there somewhere in the tree a join condition.
|
abstract boolean |
isValidCompare(Object ob1,
Object ob2)
Operator nodes implement this method to return whether two objects satisfy the given
condition.
|
abstract ExpNode |
newInstance()
Prototype method - Create new instance of the class
|
String |
prepareTemplateValues(TreeMap values,
String colName)
PreparedNodes will set their values through this methods.
|
void |
prepareValues(Object[] values)
PreparedNodes will set their values through this methods.
|
void |
readExternal(ObjectInput in) |
Collection<ExpNode> |
reverse()
Generates a reverse tree/stack ensuring each node's children are popped before the node.
|
void |
setLeftChild(ExpNode leftChild)
Set the left child.
|
void |
setRightChild(ExpNode rightChild)
Set the right child.
|
void |
setTemplate(QueryTemplatePacket template) |
String |
toString(String op) |
void |
traverse(java.util.function.Consumer<ExpNode> consumer)
Applies the consumer on this node and its children recursively
|
void |
traverseReverse(java.util.function.Consumer<ExpNode> consumer)
Applies the consumer on this node and its children recursively in reverse (children before parent)
|
void |
validateInnerQueryResult()
Validates inner query result size (this method is only called after executing the inner
query) Default validation only permits a single result from inner query.
|
void |
writeExternal(ObjectOutput out) |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitenabledSmartExternalizableWithReferenceprotected ExpNode leftChild
protected ExpNode rightChild
protected QueryTemplatePacket template
public void setLeftChild(ExpNode leftChild)
public void setRightChild(ExpNode rightChild)
public ExpNode getLeftChild()
public ExpNode getRightChild()
public void forEachChild(java.util.function.Consumer<ExpNode> consumer)
public void traverse(java.util.function.Consumer<ExpNode> consumer)
public void traverseReverse(java.util.function.Consumer<ExpNode> consumer)
public Collection<ExpNode> reverse()
public void prepareValues(Object[] values) throws SQLException
SQLExceptionpublic String prepareTemplateValues(TreeMap values, String colName) throws SQLException
SQLExceptionpublic abstract boolean isValidCompare(Object ob1, Object ob2)
public boolean isJoined()
public abstract ExpNode newInstance()
public abstract void accept(QueryTemplateBuilder builder) throws SQLException
SQLExceptionpublic void accept(IQueryExecutor executor, ISpaceProxy space, Transaction txn, int readModifier, int max) throws SQLException
SQLExceptionpublic QueryTemplatePacket getTemplate()
public void setTemplate(QueryTemplatePacket template)
public EntriesCursor createIndex(QueryTableData queryTableData, IQueryResultSet<IEntryPacket> tableEntries)
public boolean createJoinIndex(QueryTableData tableData)
public boolean isInnerQuery()
public boolean isContainsItemNode()
public boolean isContainsItemsRootNode()
public void validateInnerQueryResult()
throws SQLException
SQLExceptionpublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundExceptionCopyright © GigaSpaces.