Class Select
- java.lang.Object
-
- net.sf.jsqlparser.parser.ASTNodeAccessImpl
-
- net.sf.jsqlparser.statement.select.Select
-
- All Implemented Interfaces:
java.io.Serializable
,Expression
,Model
,ASTNodeAccess
,Statement
- Direct Known Subclasses:
ParenthesedSelect
,PlainSelect
,SetOperationList
,TableStatement
,Values
public abstract class Select extends ASTNodeAccessImpl implements Statement, Expression
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description (package private) Fetch
fetch
(package private) ForClause
forClause
(package private) WithIsolation
isolation
(package private) Limit
limit
(package private) Limit
limitBy
(package private) Offset
offset
(package private) boolean
oracleSiblings
(package private) java.util.List<OrderByElement>
orderByElements
(package private) java.util.List<WithItem>
withItemsList
-
Constructor Summary
Constructors Constructor Description Select()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
accept(ExpressionVisitor expressionVisitor)
abstract void
accept(SelectVisitor selectVisitor)
void
accept(StatementVisitor statementVisitor)
Select
addOrderByElements(java.util.Collection<? extends OrderByElement> orderByElements)
Select
addOrderByElements(OrderByElement... orderByElements)
Select
addWithItemsList(java.util.Collection<? extends WithItem> withItemsList)
Select
addWithItemsList(WithItem... withItemsList)
abstract java.lang.StringBuilder
appendSelectBodyTo(java.lang.StringBuilder builder)
static java.lang.StringBuilder
appendStringListTo(java.lang.StringBuilder builder, java.util.List<?> list, boolean useComma, boolean useBrackets)
Append the toString out put of the objects in the List (that can be comma separated).java.lang.StringBuilder
appendTo(java.lang.StringBuilder builder)
<E extends Select>
Eas(java.lang.Class<E> type)
Fetch
getFetch()
ForClause
getForClause()
static java.lang.String
getFormattedList(java.util.List<?> list, java.lang.String expression)
static java.lang.String
getFormattedList(java.util.List<?> list, java.lang.String expression, boolean useComma, boolean useBrackets)
WithIsolation
getIsolation()
Limit
getLimit()
Limit
getLimitBy()
Offset
getOffset()
java.util.List<OrderByElement>
getOrderByElements()
PlainSelect
getPlainSelect()
Select
getSelectBody()
Deprecated.SetOperationList
getSetOperationList()
static java.lang.String
getStringList(java.util.List<?> list)
List the toString out put of the objects in the List comma separated.static java.lang.String
getStringList(java.util.List<?> list, boolean useComma, boolean useBrackets)
List the toString out put of the objects in the List that can be comma separated.Values
getValues()
java.util.List<WithItem>
getWithItemsList()
boolean
isOracleSiblings()
static java.lang.String
orderByToString(boolean oracleSiblings, java.util.List<OrderByElement> orderByElements)
static java.lang.String
orderByToString(java.util.List<OrderByElement> orderByElements)
void
setFetch(Fetch fetch)
Select
setForClause(ForClause forClause)
void
setIsolation(WithIsolation isolation)
void
setLimit(Limit limit)
void
setLimitBy(Limit limitBy)
void
setOffset(Offset offset)
void
setOracleSiblings(boolean oracleSiblings)
void
setOrderByElements(java.util.List<OrderByElement> orderByElements)
void
setWithItemsList(java.util.List<WithItem> withItemsList)
java.lang.String
toString()
Select
withFetch(Fetch fetch)
Select
withIsolation(WithIsolation isolation)
Select
withLimit(Limit limit)
<E extends Select>
EwithLimitBy(java.lang.Class<E> type, Limit limitBy)
Select
withOffset(Offset offset)
Select
withOracleSiblings(boolean oracleSiblings)
Select
withOrderByElements(java.util.List<OrderByElement> orderByElements)
Select
withWithItemsList(java.util.List<WithItem> withItemsList)
-
Methods inherited from class net.sf.jsqlparser.parser.ASTNodeAccessImpl
getASTNode, setASTNode
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.sf.jsqlparser.parser.ASTNodeAccess
getASTNode, setASTNode
-
-
-
-
Field Detail
-
withItemsList
java.util.List<WithItem> withItemsList
-
limitBy
Limit limitBy
-
limit
Limit limit
-
offset
Offset offset
-
fetch
Fetch fetch
-
isolation
WithIsolation isolation
-
oracleSiblings
boolean oracleSiblings
-
forClause
ForClause forClause
-
orderByElements
java.util.List<OrderByElement> orderByElements
-
-
Method Detail
-
orderByToString
public static java.lang.String orderByToString(java.util.List<OrderByElement> orderByElements)
-
orderByToString
public static java.lang.String orderByToString(boolean oracleSiblings, java.util.List<OrderByElement> orderByElements)
-
getFormattedList
public static java.lang.String getFormattedList(java.util.List<?> list, java.lang.String expression)
-
getFormattedList
public static java.lang.String getFormattedList(java.util.List<?> list, java.lang.String expression, boolean useComma, boolean useBrackets)
-
getStringList
public static java.lang.String getStringList(java.util.List<?> list)
List the toString out put of the objects in the List comma separated. If the List is null or empty an empty string is returned.The same as getStringList(list, true, false)
- Parameters:
list
- list of objects with toString methods- Returns:
- comma separated list of the elements in the list
- See Also:
getStringList(List, boolean, boolean)
-
getStringList
public static java.lang.String getStringList(java.util.List<?> list, boolean useComma, boolean useBrackets)
List the toString out put of the objects in the List that can be comma separated. If the List is null or empty an empty string is returned.- Parameters:
list
- list of objects with toString methodsuseComma
- true if the list has to be comma separateduseBrackets
- true if the list has to be enclosed in brackets- Returns:
- comma separated list of the elements in the list
-
appendStringListTo
public static java.lang.StringBuilder appendStringListTo(java.lang.StringBuilder builder, java.util.List<?> list, boolean useComma, boolean useBrackets)
Append the toString out put of the objects in the List (that can be comma separated). If the List is null or empty an empty string is returned.- Parameters:
list
- list of objects with toString methodsuseComma
- true if the list has to be comma separateduseBrackets
- true if the list has to be enclosed in brackets- Returns:
- comma separated list of the elements in the list
-
getWithItemsList
public java.util.List<WithItem> getWithItemsList()
-
setWithItemsList
public void setWithItemsList(java.util.List<WithItem> withItemsList)
-
addWithItemsList
public Select addWithItemsList(java.util.Collection<? extends WithItem> withItemsList)
-
isOracleSiblings
public boolean isOracleSiblings()
-
setOracleSiblings
public void setOracleSiblings(boolean oracleSiblings)
-
withOracleSiblings
public Select withOracleSiblings(boolean oracleSiblings)
-
getForClause
public ForClause getForClause()
-
getOrderByElements
public java.util.List<OrderByElement> getOrderByElements()
-
setOrderByElements
public void setOrderByElements(java.util.List<OrderByElement> orderByElements)
-
withOrderByElements
public Select withOrderByElements(java.util.List<OrderByElement> orderByElements)
-
addOrderByElements
public Select addOrderByElements(java.util.Collection<? extends OrderByElement> orderByElements)
-
addOrderByElements
public Select addOrderByElements(OrderByElement... orderByElements)
-
getLimit
public Limit getLimit()
-
setLimit
public void setLimit(Limit limit)
-
getLimitBy
public Limit getLimitBy()
-
setLimitBy
public void setLimitBy(Limit limitBy)
-
getOffset
public Offset getOffset()
-
setOffset
public void setOffset(Offset offset)
-
getFetch
public Fetch getFetch()
-
setFetch
public void setFetch(Fetch fetch)
-
getIsolation
public WithIsolation getIsolation()
-
setIsolation
public void setIsolation(WithIsolation isolation)
-
withIsolation
public Select withIsolation(WithIsolation isolation)
-
appendSelectBodyTo
public abstract java.lang.StringBuilder appendSelectBodyTo(java.lang.StringBuilder builder)
-
appendTo
public java.lang.StringBuilder appendTo(java.lang.StringBuilder builder)
- Overrides:
appendTo
in classASTNodeAccessImpl
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
accept
public abstract void accept(SelectVisitor selectVisitor)
-
accept
public void accept(StatementVisitor statementVisitor)
-
accept
public void accept(ExpressionVisitor expressionVisitor)
- Specified by:
accept
in interfaceExpression
-
getSelectBody
@Deprecated public Select getSelectBody()
Deprecated.
-
getValues
public Values getValues()
-
getPlainSelect
public PlainSelect getPlainSelect()
-
getSetOperationList
public SetOperationList getSetOperationList()
-
as
public <E extends Select> E as(java.lang.Class<E> type)
-
-