public class GroupSymbol extends Symbol implements Comparable<GroupSymbol>
This is the server's representation of a metadata group symbol. The group symbol has a name, an optional definition, and a reference to a real metadata ID. Typically, a GroupSymbol will be created only from a name and possibly a definition if the group has an alias. The metadata ID is discovered only when resolving the query.
For example, if the original string contained a FROM clause such as "FROM Group1 AS G, Group2", there would be two GroupSymbols created. The first would have name=G, definition=Group1 and the second would have name=Group2, definition=null.
LanguageObject.Util
Modifier and Type | Field and Description |
---|---|
static String |
TEMP_GROUP_PREFIX |
outputName, SEPARATOR
Constructor and Description |
---|
GroupSymbol(String name)
Construct a symbol with a name.
|
GroupSymbol(String name,
String definition)
Construct a symbol with a name.
|
Modifier and Type | Method and Description |
---|---|
void |
acceptVisitor(LanguageVisitor visitor)
Method for accepting a visitor.
|
GroupSymbol |
clone()
Return a deep copy of this object.
|
int |
compareTo(GroupSymbol o)
Compare two groups and give an ordering.
|
boolean |
equals(Object obj)
Compare group symbols
|
Object |
getCheckMatViewStatus() |
String |
getDefinition()
Get the definition for the group symbol, which may be null
|
Object |
getMetadataID()
Get the metadata ID that this group symbol resolves to.
|
Object |
getModelMetadataId() |
String |
getName()
Get the name of the symbol
|
String |
getNonCorrelationName() |
String |
getOutputDefinition() |
boolean |
hasAlias() |
int |
hashCode()
Return a hash code for this symbol.
|
boolean |
isGlobalTable() |
boolean |
isImplicitTempGroupSymbol() |
boolean |
isProcedure() |
boolean |
isPushedCommonTable()
Returns if this is a pushed Common Table
Set after resolving and initial common table planning
|
boolean |
isResolved()
Returns true if this symbol has been completely resolved with respect
to actual runtime metadata.
|
static boolean |
isTempGroupName(String name) |
boolean |
isTempGroupSymbol()
Returns true if this is a symbol for a temporary (implicit or explicit) group
May return false for explicit temp tables prior to resolving.
|
boolean |
isTempTable()
Returns if this is a Temp Table
Set after resolving.
|
void |
setCheckMatStatus(Object viewMatadataId) |
void |
setDefinition(String definition)
Set the definition for the group symbol, which may be null
|
void |
setGlobalTable(boolean isGlobalTable) |
void |
setIsTempTable(boolean isTempTable) |
void |
setMetadataID(Object metadataID)
Set the metadata ID that this group symbol resolves to.
|
void |
setName(String name) |
void |
setOutputDefinition(String outputDefinition) |
void |
setProcedure(boolean isProcedure) |
getName, getOutputName, getOutputName, getShortName, getShortName, getShortName, setOutputName, setShortName, toString
public static final String TEMP_GROUP_PREFIX
public GroupSymbol(String name)
name
- Name of the symbolIllegalArgumentException
- If name is nullpublic GroupSymbol(String name, String definition)
name
- Name of the symbolname
- Definition of the symbol, may be nullIllegalArgumentException
- If name is nullpublic Object getModelMetadataId()
public String getNonCorrelationName()
public String getDefinition()
public void setDefinition(String definition)
definition
- Definitionpublic Object getMetadataID()
public void acceptVisitor(LanguageVisitor visitor)
LanguageObject
acceptVisitor
in interface LanguageObject
visitor
- Visitor being usedpublic void setMetadataID(Object metadataID)
meatdataID
- Metadata ID objectIllegalArgumentException
- If metadataID is nullpublic boolean isResolved()
public boolean isTempGroupSymbol()
isTempTable()
public boolean isImplicitTempGroupSymbol()
public int compareTo(GroupSymbol o)
compareTo
in interface Comparable<GroupSymbol>
other
- Other grouppublic GroupSymbol clone()
clone
in interface LanguageObject
clone
in class Symbol
public boolean equals(Object obj)
public boolean hasAlias()
public void setIsTempTable(boolean isTempTable)
public static boolean isTempGroupName(String name)
public boolean isTempTable()
public boolean isPushedCommonTable()
public boolean isProcedure()
public void setProcedure(boolean isProcedure)
public String getOutputDefinition()
public void setOutputDefinition(String outputDefinition)
public boolean isGlobalTable()
public void setGlobalTable(boolean isGlobalTable)
public int hashCode()
Symbol
public void setCheckMatStatus(Object viewMatadataId)
public Object getCheckMatViewStatus()
Copyright © 2018 JBoss by Red Hat. All rights reserved.