- java.lang.Object
-
- net.sf.jsqlparser.parser.ASTNodeAccessImpl
-
- net.sf.jsqlparser.statement.select.Select
-
- All Implemented Interfaces:
java.io.Serializable
,Expression
,Model
,ASTNodeAccess
,FromItem
,Statement
- Direct Known Subclasses:
ParenthesedSelect
,PlainSelect
,SetOperationList
,TableStatement
,Values
public abstract class Select extends ASTNodeAccessImpl implements Statement, Expression, FromItem
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description (package private) Alias
alias
(package private) Fetch
fetch
(package private) ForClause
forClause
(package private) ForMode
forMode
protected Table
forUpdateTable
(package private) WithIsolation
isolation
(package private) Limit
limit
(package private) Limit
limitBy
private boolean
noWait
(package private) Offset
offset
(package private) boolean
oracleSiblings
(package private) java.util.List<OrderByElement>
orderByElements
(package private) Pivot
pivot
private boolean
skipLocked
(package private) UnPivot
unPivot
private Wait
wait
(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 <T,S>
Taccept(ExpressionVisitor<T> expressionVisitor, S context)
abstract <T,S>
Taccept(SelectVisitor<T> selectVisitor, S context)
<T,S>
Taccept(StatementVisitor<T> statementVisitor, S context)
Select
addOrderByElements(java.util.Collection<? extends OrderByElement> orderByElements)
Select
addOrderByElements(Expression... orderByExpressions)
Select
addOrderByElements(OrderByElement... orderByElements)
Select
addOrderByExpressions(java.util.Collection<Expression> orderByExpressions)
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)
Alias
getAlias()
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)
ForMode
getForMode()
Table
getForUpdateTable()
WithIsolation
getIsolation()
Limit
getLimit()
Limit
getLimitBy()
Offset
getOffset()
java.util.List<OrderByElement>
getOrderByElements()
Pivot
getPivot()
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.UnPivot
getUnPivot()
Values
getValues()
Wait
getWait()
Returns the value of theWait
set for this SELECTjava.util.List<WithItem<?>>
getWithItemsList()
boolean
isNoWait()
boolean
isOracleSiblings()
boolean
isSkipLocked()
static java.lang.String
orderByToString(boolean oracleSiblings, java.util.List<OrderByElement> orderByElements)
static java.lang.String
orderByToString(java.util.List<OrderByElement> orderByElements)
void
setAlias(Alias alias)
void
setFetch(Fetch fetch)
Select
setForClause(ForClause forClause)
void
setForMode(ForMode forMode)
void
setForUpdateTable(Table forUpdateTable)
void
setIsolation(WithIsolation isolation)
void
setLimit(Limit limit)
void
setLimitBy(Limit limitBy)
void
setNoWait(boolean noWait)
void
setOffset(Offset offset)
void
setOracleSiblings(boolean oracleSiblings)
void
setOrderByElements(java.util.List<OrderByElement> orderByElements)
void
setPivot(Pivot pivot)
void
setSkipLocked(boolean skipLocked)
void
setUnPivot(UnPivot unPivot)
void
setWait(Wait wait)
Sets theWait
for this SELECTvoid
setWithItemsList(java.util.List<WithItem<?>> withItemsList)
java.lang.String
toString()
Select
withAlias(Alias alias)
Select
withFetch(Fetch fetch)
Select
withForMode(ForMode forMode)
Select
withForUpdateTable(Table forUpdateTable)
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
withSkipLocked(boolean skipLocked)
Select
withWait(Wait wait)
Select
withWithItemsList(java.util.List<WithItem<?>> withItemsList)
-
Methods inherited from class net.sf.jsqlparser.parser.ASTNodeAccessImpl
getASTNode, getParent, getParent, 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
-
Methods inherited from interface net.sf.jsqlparser.expression.Expression
accept
-
-
-
-
Field Detail
-
forUpdateTable
protected Table forUpdateTable
-
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
-
forMode
ForMode forMode
-
skipLocked
private boolean skipLocked
-
wait
private Wait wait
-
noWait
private boolean noWait
-
alias
Alias alias
-
pivot
Pivot pivot
-
unPivot
UnPivot unPivot
-
-
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)
-
isNoWait
public boolean isNoWait()
-
setNoWait
public void setNoWait(boolean noWait)
-
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)
-
addOrderByExpressions
public Select addOrderByExpressions(java.util.Collection<Expression> orderByExpressions)
-
addOrderByElements
public Select addOrderByElements(Expression... orderByExpressions)
-
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)
-
getForMode
public ForMode getForMode()
-
setForMode
public void setForMode(ForMode forMode)
-
getForUpdateTable
public Table getForUpdateTable()
-
setForUpdateTable
public void setForUpdateTable(Table forUpdateTable)
-
getWait
public Wait getWait()
Returns the value of theWait
set for this SELECT- Returns:
- the value of the
Wait
set for this SELECT
-
setWait
public void setWait(Wait wait)
Sets theWait
for this SELECT- Parameters:
wait
- theWait
for this SELECT
-
isSkipLocked
public boolean isSkipLocked()
-
setSkipLocked
public void setSkipLocked(boolean skipLocked)
-
getUnPivot
public UnPivot getUnPivot()
- Specified by:
getUnPivot
in interfaceFromItem
-
setUnPivot
public void setUnPivot(UnPivot unPivot)
- Specified by:
setUnPivot
in interfaceFromItem
-
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 <T,S> T accept(SelectVisitor<T> selectVisitor, S context)
-
accept
public <T,S> T accept(StatementVisitor<T> statementVisitor, S context)
-
accept
public <T,S> T accept(ExpressionVisitor<T> expressionVisitor, S context)
- 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)
-
withSkipLocked
public Select withSkipLocked(boolean skipLocked)
-
-