public class QueryTemplateBuilder extends Object implements Externalizable
ExpNode The builder converts the expression tree to ranges.
The ranges are optimized , merged and attached to the expression node.| Constructor and Description |
|---|
QueryTemplateBuilder() |
QueryTemplateBuilder(AbstractDMLQuery query) |
| Modifier and Type | Method and Description |
|---|---|
void |
build(AndNode node)
Build QueryTemplatePacket from
AndNode |
void |
build(ColumnNode node)
Build QueryTemplatePacket from
AndNode |
void |
build(ExpNode node,
short op)
Build QueryTemplatePacket from
ExpNode |
void |
build(ExpNode node,
short op,
short nullOp)
Build QueryTemplatePacket from
ExpNode |
void |
build(InNode node)
Build QueryTemplatePacket from
InNode (special conversion) |
void |
build(LikeNode node,
short op)
Build QueryTemplatePacket from
LikeNode (special conversion) |
void |
build(NotInNode node)
Build QueryTemplatePacket from
NotInNode (special conversion) |
void |
build(NotLikeNode node)
Special build for not like - since it can't be translated to a space template.
|
void |
build(OrNode node)
Build QueryTemplatePacket from
OrNode |
void |
build(RelationNode node) |
void |
buildContainsItemsRootTemplate(ContainsItemsRootNode rn) |
void |
buildContainsTemplate(ContainsNode containsNode)
Build QueryTemplatePacket for contains.
|
static QueryTemplatePacket |
buildTemplate(InNode node,
AbstractDMLQuery query) |
QueryTemplatePacket |
buildTemplate(LiteralNode node,
QueryColumnData queryColumnData,
short op,
short nullOp,
FunctionCallDescription functionCallDescription,
ExpNode father)
Build space template
|
static QueryTemplatePacket |
buildTemplate(NotInNode node,
AbstractDMLQuery query) |
void |
readExternal(ObjectInput in) |
static Range |
toRange(String colName,
FunctionCallDescription functionCallDescription,
Object value,
short matchCode)
Converts single external entry expression to a range
|
static Range |
toRange(String colName,
FunctionCallDescription functionCallDescription,
Object value,
short matchCode,
ExpNode node,
AbstractDMLQuery query) |
void |
traverseExpressionTree(ExpNode root)
Traverse the binary expression tree non-recursively using a custom stack The tree has to be
traversed in postorder - the parent is traversed after its children.
|
void |
writeExternal(ObjectOutput out) |
public QueryTemplateBuilder()
public QueryTemplateBuilder(AbstractDMLQuery query)
query - public void buildContainsTemplate(ContainsNode containsNode) throws SQLException
SQLExceptionpublic void buildContainsItemsRootTemplate(ContainsItemsRootNode rn) throws SQLException
SQLExceptionpublic void build(ExpNode node, short op, short nullOp) throws SQLException
ExpNodeSQLExceptionpublic void build(RelationNode node) throws SQLException
SQLExceptionpublic void build(ExpNode node, short op) throws SQLException
ExpNodeSQLExceptionpublic void build(LikeNode node, short op) throws SQLException
LikeNode (special conversion)SQLExceptionpublic void build(InNode node) throws SQLException
InNode (special conversion)SQLExceptionpublic void build(NotInNode node) throws SQLException
NotInNode (special conversion)SQLExceptionpublic static QueryTemplatePacket buildTemplate(NotInNode node, AbstractDMLQuery query) throws SQLException
SQLExceptionpublic static QueryTemplatePacket buildTemplate(InNode node, AbstractDMLQuery query) throws SQLException
SQLExceptionpublic QueryTemplatePacket buildTemplate(LiteralNode node, QueryColumnData queryColumnData, short op, short nullOp, FunctionCallDescription functionCallDescription, ExpNode father) throws SQLException
SQLExceptionpublic static Range toRange(String colName, FunctionCallDescription functionCallDescription, Object value, short matchCode)
public static Range toRange(String colName, FunctionCallDescription functionCallDescription, Object value, short matchCode, ExpNode node, AbstractDMLQuery query)
public void build(AndNode node) throws SQLException
AndNodeSQLExceptionpublic void build(OrNode node) throws SQLException
OrNodeSQLExceptionpublic void traverseExpressionTree(ExpNode root) throws SQLException
SQLExceptionpublic void build(NotLikeNode node) throws SQLException
SQLExceptionpublic void build(ColumnNode node) throws SQLException
AndNodeSQLExceptionpublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundExceptionCopyright © GigaSpaces.