public class Select extends Object implements LanguageObject
LanguageObject.Util
Constructor and Description |
---|
Select()
Constructs a default instance of this class.
|
Select(List<? extends Expression> symbols)
Constructs an instance of this class from an ordered set of symbols.
|
Modifier and Type | Method and Description |
---|---|
void |
acceptVisitor(LanguageVisitor visitor)
Method for accepting a visitor.
|
void |
addSymbol(Expression symbol) |
void |
addSymbols(Collection<? extends Expression> toAdd) |
void |
clearSymbols()
Remove all current symbols
|
Select |
clone()
Return a deep copy of this Select.
|
boolean |
containsSymbol(Expression symbol)
Checks if a symbol is in the Select.
|
boolean |
equals(Object obj)
Compare two Selects for equality.
|
int |
getCount()
Returns the number of symbols in select.
|
List<Expression> |
getProjectedSymbols()
Get the ordered list of all elements returned by this select.
|
Expression |
getSymbol(int index)
Returns the select symbol at the specified index.
|
List<Expression> |
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 |
isStar()
Checks for a Select * clause
|
void |
setDistinct(boolean isDistinct)
Set whether select is distinct.
|
void |
setSymbols(Collection<? extends Expression> symbols)
Sets an ordered list of the symbols in the select.
|
String |
toString()
Returns a string representation of an instance of this class.
|
public Select()
public Select(List<? extends Expression> symbols)
symbols
- The ordered list of symbolspublic int getCount()
public boolean isStar()
public List<Expression> getSymbols()
Get
- list of SelectSymbol in SELECTpublic void setSymbols(Collection<? extends Expression> symbols)
symbols
- list of SelectSymbol in SELECTpublic Expression getSymbol(int index)
index
- Index to getpublic void addSymbol(Expression symbol)
symbol
- New symbolpublic void addSymbols(Collection<? extends Expression> toAdd)
public void clearSymbols()
public boolean containsSymbol(Expression symbol)
symbol
- Symbol to check forpublic 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 List<Expression> getProjectedSymbols()
public Select clone()
clone
in interface LanguageObject
clone
in class Object
public boolean equals(Object obj)
public int hashCode()
Copyright © 2019. All rights reserved.