- java.lang.Object
-
- net.sf.jsqlparser.parser.ASTNodeAccessImpl
-
- net.sf.jsqlparser.statement.select.Select
-
- All Implemented Interfaces:
Serializable,Expression,Model,net.sf.jsqlparser.parser.ASTNodeAccess,Statement
- Direct Known Subclasses:
ParenthesedSelect,PlainSelect,SetOperationList,TableStatement,Values
public abstract class Select extends net.sf.jsqlparser.parser.ASTNodeAccessImpl implements Statement, Expression
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected TableforUpdateTable
-
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)SelectaddOrderByElements(Collection<? extends OrderByElement> orderByElements)SelectaddOrderByElements(Expression... orderByExpressions)SelectaddOrderByElements(OrderByElement... orderByElements)SelectaddOrderByExpressions(Collection<Expression> orderByExpressions)SelectaddWithItemsList(Collection<? extends WithItem> withItemsList)SelectaddWithItemsList(WithItem... withItemsList)abstract StringBuilderappendSelectBodyTo(StringBuilder builder)static StringBuilderappendStringListTo(StringBuilder builder, List<?> list, boolean useComma, boolean useBrackets)Append the toString out put of the objects in the List (that can be comma separated).StringBuilderappendTo(StringBuilder builder)<E extends Select>
Eas(Class<E> type)FetchgetFetch()ForClausegetForClause()static StringgetFormattedList(List<?> list, String expression)static StringgetFormattedList(List<?> list, String expression, boolean useComma, boolean useBrackets)ForModegetForMode()TablegetForUpdateTable()WithIsolationgetIsolation()LimitgetLimit()LimitgetLimitBy()OffsetgetOffset()List<OrderByElement>getOrderByElements()PlainSelectgetPlainSelect()SelectgetSelectBody()Deprecated.SetOperationListgetSetOperationList()static StringgetStringList(List<?> list)List the toString out put of the objects in the List comma separated.static StringgetStringList(List<?> list, boolean useComma, boolean useBrackets)List the toString out put of the objects in the List that can be comma separated.ValuesgetValues()WaitgetWait()Returns the value of theWaitset for this SELECTList<WithItem>getWithItemsList()booleanisNoWait()booleanisOracleSiblings()booleanisSkipLocked()static StringorderByToString(boolean oracleSiblings, List<OrderByElement> orderByElements)static StringorderByToString(List<OrderByElement> orderByElements)voidsetFetch(Fetch fetch)SelectsetForClause(ForClause forClause)voidsetForMode(ForMode forMode)voidsetForUpdateTable(Table forUpdateTable)voidsetIsolation(WithIsolation isolation)voidsetLimit(Limit limit)voidsetLimitBy(Limit limitBy)voidsetNoWait(boolean noWait)voidsetOffset(Offset offset)voidsetOracleSiblings(boolean oracleSiblings)voidsetOrderByElements(List<OrderByElement> orderByElements)voidsetSkipLocked(boolean skipLocked)voidsetWait(Wait wait)Sets theWaitfor this SELECTvoidsetWithItemsList(List<WithItem> withItemsList)StringtoString()SelectwithFetch(Fetch fetch)SelectwithForMode(ForMode forMode)SelectwithForUpdateTable(Table forUpdateTable)SelectwithIsolation(WithIsolation isolation)SelectwithLimit(Limit limit)<E extends Select>
EwithLimitBy(Class<E> type, Limit limitBy)SelectwithOffset(Offset offset)SelectwithOracleSiblings(boolean oracleSiblings)SelectwithOrderByElements(List<OrderByElement> orderByElements)SelectwithSkipLocked(boolean skipLocked)SelectwithWait(Wait wait)SelectwithWithItemsList(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.expression.Expression
accept
-
-
-
-
Field Detail
-
forUpdateTable
protected Table forUpdateTable
-
-
Method Detail
-
orderByToString
public static String orderByToString(List<OrderByElement> orderByElements)
-
orderByToString
public static String orderByToString(boolean oracleSiblings, List<OrderByElement> orderByElements)
-
getFormattedList
public static String getFormattedList(List<?> list, String expression, boolean useComma, boolean useBrackets)
-
getStringList
public static String getStringList(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 String getStringList(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 StringBuilder appendStringListTo(StringBuilder builder, 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
-
addWithItemsList
public Select addWithItemsList(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 List<OrderByElement> getOrderByElements()
-
setOrderByElements
public void setOrderByElements(List<OrderByElement> orderByElements)
-
withOrderByElements
public Select withOrderByElements(List<OrderByElement> orderByElements)
-
addOrderByElements
public Select addOrderByElements(Collection<? extends OrderByElement> orderByElements)
-
addOrderByElements
public Select addOrderByElements(OrderByElement... orderByElements)
-
addOrderByExpressions
public Select addOrderByExpressions(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 theWaitset for this SELECT- Returns:
- the value of the
Waitset for this SELECT
-
setWait
public void setWait(Wait wait)
Sets theWaitfor this SELECT- Parameters:
wait- theWaitfor this SELECT
-
isSkipLocked
public boolean isSkipLocked()
-
setSkipLocked
public void setSkipLocked(boolean skipLocked)
-
appendSelectBodyTo
public abstract StringBuilder appendSelectBodyTo(StringBuilder builder)
-
appendTo
public StringBuilder appendTo(StringBuilder builder)
- Overrides:
appendToin classnet.sf.jsqlparser.parser.ASTNodeAccessImpl
-
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:
acceptin interfaceExpression
-
getSelectBody
@Deprecated public Select getSelectBody()
Deprecated.
-
getValues
public Values getValues()
-
getPlainSelect
public PlainSelect getPlainSelect()
-
getSetOperationList
public SetOperationList getSetOperationList()
-
withSkipLocked
public Select withSkipLocked(boolean skipLocked)
-
-