Class SymbolTable
java.lang.Object
org.datanucleus.store.query.compiler.SymbolTable
- All Implemented Interfaces:
Serializable
Table of symbols in a query.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) SymbolTable
SymbolTable for the parent query (when this is a subquery), otherwise null.(package private) SymbolResolver
Resolver for symbols.private static final long
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
Accessor for the parent symbol table (if any).Return the Symbol for the specified name if known.getSymbolIgnoreCase
(String name) Return the Symbol for the specified name if known, treating the name as case-insensitive.Accessor for the names of the symbols in this table.boolean
Accessor for whether this symbol table has a particular symbol name.void
removeSymbol
(Symbol symbol) void
Set the symbol table for any parent query, so that if this query refers to an expression from the parent query then it is resolvable.void
setSymbolResolver
(SymbolResolver resolver) toString()
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
parentSymbolTable
SymbolTable parentSymbolTableSymbolTable for the parent query (when this is a subquery), otherwise null. -
symbols
-
resolver
Resolver for symbols. Note that this is not serialisable, but is set when compile() is called.
-
-
Constructor Details
-
SymbolTable
public SymbolTable()
-
-
Method Details
-
setSymbolResolver
-
getSymbolResolver
-
setParentSymbolTable
Set the symbol table for any parent query, so that if this query refers to an expression from the parent query then it is resolvable.- Parameters:
tbl
- The parent symbol table
-
getParentSymbolTable
Accessor for the parent symbol table (if any).- Returns:
- The parent symbol table
-
getSymbolNames
Accessor for the names of the symbols in this table.- Returns:
- Names of the symbols
-
getSymbol
Return the Symbol for the specified name if known. If there is a parent symbol table then looks up in that after if not found here (unless the name is "this").- Parameters:
name
- The name to look up- Returns:
- The symbol for this name
-
getSymbolIgnoreCase
Return the Symbol for the specified name if known, treating the name as case-insensitive. If there is a parent symbol table then looks up in that after if not found here (unless the name is "this").- Parameters:
name
- The name to look up- Returns:
- The symbol for this name
-
hasSymbol
Accessor for whether this symbol table has a particular symbol name. Does not make any use of parent symbol table(s).- Parameters:
name
- The name of the symbol we require- Returns:
- Whether it is present here
-
addSymbol
-
removeSymbol
-
toString
-