|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.metamatrix.query.sql.lang.Select
public class Select
This class represents the SELECT clause of a query, which defines what elements or expressions are returned from the query.
Constructor Summary | |
---|---|
Select()
Constructs a default instance of this class. |
|
Select(java.util.List symbols)
Constructs an instance of this class from an ordered set of symbols. |
Method Summary | |
---|---|
void |
acceptVisitor(LanguageVisitor visitor)
Method for accepting a visitor. |
void |
addSymbol(SelectSymbol symbol)
Adds a new symbol to the list of symbols. |
void |
addSymbols(java.util.Collection symbols)
Adds a new collection of symbols to the list of symbols. |
void |
clearSymbols()
Remove all current symbols |
java.lang.Object |
clone()
Return a deep copy of this Select. |
boolean |
containsSymbol(SelectSymbol symbol)
Checks if a symbol is in the Select. |
boolean |
equals(java.lang.Object obj)
Compare two Selects for equality. |
int |
getCount()
Returns the number of symbols in select. |
java.util.List |
getProjectedSymbols()
Get the ordered list of all elements returned by this select. |
SelectSymbol |
getSymbol(int index)
Returns the select symbol at the specified index. |
java.util.List |
getSymbols()
Returns an ordered list of the symbols in the select. |
int |
hashCode()
Get hashcode for Select. |
boolean |
isDistinct()
Checks whether the select is distinct |
boolean |
isElementBeingSelected(ElementSymbol elementSymbol)
Check is the element symbol is being selected by this select clause. |
boolean |
isStar()
Checks for a Select * clause |
void |
setDistinct(boolean isDistinct)
Set whether select is distinct. |
void |
setSymbols(java.util.List symbols)
Sets an ordered list of the symbols in the select. |
java.lang.String |
toString()
Returns a string representation of an instance of this class. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Select()
public Select(java.util.List symbols)
symbols
- The ordered list of symbolsMethod Detail |
---|
public int getCount()
public boolean isStar()
public java.util.List getSymbols()
Get
- list of SelectSymbol in SELECTpublic void setSymbols(java.util.List symbols)
symbols
- list of SelectSymbol in SELECTpublic SelectSymbol getSymbol(int index)
index
- Index to get
public void addSymbol(SelectSymbol symbol)
symbol
- New symbolpublic void addSymbols(java.util.Collection symbols)
symbols
- Collection of SelectSymbolspublic void clearSymbols()
public boolean containsSymbol(SelectSymbol symbol)
symbol
- Symbol to check for
public boolean isElementBeingSelected(ElementSymbol elementSymbol)
elementSymbol
- fully resolved ElementSymbol
public void setDistinct(boolean isDistinct)
isDistinct
- True if SELECT is distinctpublic boolean isDistinct()
public void acceptVisitor(LanguageVisitor visitor)
LanguageObject
acceptVisitor
in interface LanguageObject
visitor
- Visitor being usedpublic java.util.List getProjectedSymbols()
public java.lang.Object clone()
clone
in interface LanguageObject
clone
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- Other object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |