public class StatementVariableRefImpl extends Object implements StatementVariableRef
Constructor and Description |
---|
StatementVariableRefImpl(VariableService variableService,
TableService tableService,
NamedWindowMgmtService namedWindowMgmtService)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
void |
addConfiguredVariable(String variableName)
Add a preconfigured variable.
|
void |
addReferences(String statementName,
Set<String> variablesReferenced,
ExprTableAccessNode[] tableNodes)
Add a reference from a statement name to a set of variables.
|
void |
addReferences(String statementName,
String variableReferenced)
Add a reference from a statement name to a single variable.
|
Set<String> |
getStatementNamesForVar(String variableName)
Returns the set of statement names that use a given variable.
|
protected HashMap<String,Set<String>> |
getStmtToVariable()
For testing, returns the mapping of statement names to variable names.
|
protected HashMap<String,Set<String>> |
getVariableToStmt()
For testing, returns the mapping of variable name to statement names.
|
boolean |
isInUse(String variable)
Returns true if the variable is listed as in-use by any statement, or false if not
|
void |
removeConfiguredVariable(String variableName)
Remove a preconfigured variable.
|
void |
removeReferencesStatement(String statementName)
Remove all references for a given statement.
|
void |
removeReferencesVariable(String name)
Remove all references for a given event type.
|
public StatementVariableRefImpl(VariableService variableService, TableService tableService, NamedWindowMgmtService namedWindowMgmtService)
variableService
- variablestableService
- table servicenamedWindowMgmtService
- named window servicepublic void addConfiguredVariable(String variableName)
StatementVariableRef
addConfiguredVariable
in interface StatementVariableRef
variableName
- namepublic void removeConfiguredVariable(String variableName)
StatementVariableRef
removeConfiguredVariable
in interface StatementVariableRef
variableName
- varpublic void addReferences(String statementName, Set<String> variablesReferenced, ExprTableAccessNode[] tableNodes)
StatementVariableRef
addReferences
in interface StatementVariableRef
statementName
- name of statementvariablesReferenced
- typestableNodes
- table nodes, if anypublic void addReferences(String statementName, String variableReferenced)
StatementVariableRef
addReferences
in interface StatementVariableRef
statementName
- name of statementvariableReferenced
- variablepublic void removeReferencesStatement(String statementName)
StatementVariableRef
removeReferencesStatement
in interface StatementVariableRef
statementName
- statement namepublic void removeReferencesVariable(String name)
StatementVariableRef
removeReferencesVariable
in interface StatementVariableRef
name
- variable namepublic boolean isInUse(String variable)
StatementVariableRef
isInUse
in interface StatementVariableRef
variable
- namepublic Set<String> getStatementNamesForVar(String variableName)
StatementVariableRef
getStatementNamesForVar
in interface StatementVariableRef
variableName
- nameprotected HashMap<String,Set<String>> getVariableToStmt()