Package org.teiid.translator.mongodb
Class ExpressionEvaluator
- java.lang.Object
-
- org.teiid.language.visitor.AbstractLanguageVisitor
-
- org.teiid.language.visitor.HierarchyVisitor
-
- org.teiid.translator.mongodb.ExpressionEvaluator
-
- All Implemented Interfaces:
LanguageObjectVisitor
public class ExpressionEvaluator extends HierarchyVisitor
-
-
Field Summary
Fields Modifier and Type Field Description protected ArrayList<TranslatorException>
exceptions
protected Stack<Boolean>
match
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
append(List<? extends LanguageObject> items)
Simple utility to append a list of language objects to the current buffer by creating a comma-separated list.void
append(LanguageObject obj)
Appends the string form of the LanguageObject to the current buffer.protected void
append(LanguageObject[] items)
Simple utility to append an array of language objects to the current buffer by creating a comma-separated list.static boolean
matches(MongoDBExecutionFactory executionFactory, com.mongodb.DB mongoDB, Condition condition, com.mongodb.BasicDBObject row, org.teiid.translator.mongodb.MongoDBUpdateExecution.RowInfo rowInfo)
void
visit(AndOr obj)
void
visit(Comparison obj)
void
visit(In obj)
void
visit(IsNull obj)
void
visit(Like obj)
-
Methods inherited from class org.teiid.language.visitor.HierarchyVisitor
visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit
-
Methods inherited from class org.teiid.language.visitor.AbstractLanguageVisitor
visit, visit, visit, visit, visit, visit, visit, visitNode, visitNodes, visitNodes
-
-
-
-
Field Detail
-
exceptions
protected ArrayList<TranslatorException> exceptions
-
-
Method Detail
-
matches
public static boolean matches(MongoDBExecutionFactory executionFactory, com.mongodb.DB mongoDB, Condition condition, com.mongodb.BasicDBObject row, org.teiid.translator.mongodb.MongoDBUpdateExecution.RowInfo rowInfo) throws TranslatorException
- Throws:
TranslatorException
-
visit
public void visit(Comparison obj)
- Specified by:
visit
in interfaceLanguageObjectVisitor
- Overrides:
visit
in classHierarchyVisitor
-
visit
public void visit(AndOr obj)
- Specified by:
visit
in interfaceLanguageObjectVisitor
- Overrides:
visit
in classHierarchyVisitor
-
visit
public void visit(In obj)
- Specified by:
visit
in interfaceLanguageObjectVisitor
- Overrides:
visit
in classHierarchyVisitor
-
visit
public void visit(IsNull obj)
- Specified by:
visit
in interfaceLanguageObjectVisitor
- Overrides:
visit
in classHierarchyVisitor
-
visit
public void visit(Like obj)
- Specified by:
visit
in interfaceLanguageObjectVisitor
- Overrides:
visit
in classHierarchyVisitor
-
append
public void append(LanguageObject obj)
Appends the string form of the LanguageObject to the current buffer.- Parameters:
obj
- the language object instance
-
append
protected void append(List<? extends LanguageObject> items)
Simple utility to append a list of language objects to the current buffer by creating a comma-separated list.- Parameters:
items
- a list of LanguageObjects
-
append
protected void append(LanguageObject[] items)
Simple utility to append an array of language objects to the current buffer by creating a comma-separated list.- Parameters:
items
- an array of LanguageObjects
-
-