Class SpreadsheetCriteriaVisitor
- java.lang.Object
-
- org.teiid.language.visitor.AbstractLanguageVisitor
-
- org.teiid.language.visitor.SQLStringVisitor
-
- org.teiid.translator.google.visitor.SpreadsheetCriteriaVisitor
-
- All Implemented Interfaces:
LanguageObjectVisitor
- Direct Known Subclasses:
SpreadsheetDeleteVisitor
,SpreadsheetInsertVisitor
,SpreadsheetSQLVisitor
,SpreadsheetUpdateVisitor
public class SpreadsheetCriteriaVisitor extends SQLStringVisitor
Base visitor for criteria- Author:
- felias
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.teiid.language.visitor.SQLStringVisitor
SQLStringVisitor.Substitutor
-
-
Field Summary
Fields Modifier and Type Field Description protected String
criteriaQuery
protected SpreadsheetInfo
info
protected Worksheet
worksheet
-
Fields inherited from class org.teiid.language.visitor.SQLStringVisitor
buffer, shortNameOnly, TEIID_NATIVE_QUERY, UNDEFINED, UNDEFINED_PARAM
-
-
Constructor Summary
Constructors Constructor Description SpreadsheetCriteriaVisitor(SpreadsheetInfo info)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getCriteriaQuery()
Worksheet
getWorksheet()
protected boolean
isUpdate()
protected String
replaceElementName(String group, String element)
Take the specified derived group and element short names and determine a replacement element name to use instead.void
setCriteriaQuery(String criteriaQuery)
void
setWorksheetByName(String name)
void
translateWhere(Condition condition)
void
visit(Comparison obj)
void
visit(Function obj)
void
visit(Like obj)
void
visit(Literal obj)
-
Methods inherited from class org.teiid.language.visitor.SQLStringVisitor
append, append, append, appendBaseName, appendCallStart, appendLateralKeyword, appendLiteral, appendNestedCondition, appendQuantifier, appendRightComparison, appendSetOperation, appendSetQuery, appendWithKeyword, escapeString, getInsertKeyword, getLikeRegexString, getName, getRecordName, getShortName, getSourceComment, getSQLString, getUpsertKeyword, isInfixFunction, parseNativeQueryParts, shouldNestSetChild, toString, useAsInGroupAlias, useParensForJoins, useParensForLHSJoins, useParensForSetQueries, useSelectLimit, 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, visit, visit, visit, visit, visit, visit, visit
-
Methods inherited from class org.teiid.language.visitor.AbstractLanguageVisitor
visit, visitNode, visitNodes, visitNodes
-
-
-
-
Field Detail
-
criteriaQuery
protected String criteriaQuery
-
info
protected SpreadsheetInfo info
-
worksheet
protected Worksheet worksheet
-
-
Constructor Detail
-
SpreadsheetCriteriaVisitor
public SpreadsheetCriteriaVisitor(SpreadsheetInfo info)
-
-
Method Detail
-
visit
public void visit(Literal obj)
- Specified by:
visit
in interfaceLanguageObjectVisitor
- Overrides:
visit
in classSQLStringVisitor
-
visit
public void visit(Like obj)
- Specified by:
visit
in interfaceLanguageObjectVisitor
- Overrides:
visit
in classSQLStringVisitor
-
visit
public void visit(Function obj)
- Specified by:
visit
in interfaceLanguageObjectVisitor
- Overrides:
visit
in classSQLStringVisitor
-
replaceElementName
protected String replaceElementName(String group, String element)
Description copied from class:SQLStringVisitor
Take the specified derived group and element short names and determine a replacement element name to use instead. Most commonly, this is used to strip the group name if the group is a pseudo-group (DUAL) or the element is a pseudo-group (ROWNUM). It may also be used to strip special information out of the name in source value in some specialized cases. By default, this method returns null, indicating that the normal group and element name logic should be used (group + "." + element). Subclasses should override and implement this method if desired.- Overrides:
replaceElementName
in classSQLStringVisitor
- Parameters:
group
- Group name, may be nullelement
- Element name, never null- Returns:
- Replacement element name to be used as is (no modification will occur)
-
getCriteriaQuery
public String getCriteriaQuery()
-
setCriteriaQuery
public void setCriteriaQuery(String criteriaQuery)
-
setWorksheetByName
public void setWorksheetByName(String name)
-
getWorksheet
public Worksheet getWorksheet()
-
translateWhere
public void translateWhere(Condition condition)
-
visit
public void visit(Comparison obj)
- Specified by:
visit
in interfaceLanguageObjectVisitor
- Overrides:
visit
in classSQLStringVisitor
-
isUpdate
protected boolean isUpdate()
-
-