Class Select

java.lang.Object
net.sf.jsqlparser.parser.ASTNodeAccessImpl
net.sf.jsqlparser.statement.select.Select
All Implemented Interfaces:
Serializable, Expression, Model, ASTNodeAccess, Statement
Direct Known Subclasses:
ParenthesedSelect, PlainSelect, SetOperationList, TableStatement, Values

public abstract class Select extends ASTNodeAccessImpl implements Statement, Expression
See Also:
  • Field Details

  • Constructor Details

    • Select

      public Select()
  • Method Details

    • 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)
    • 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

      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 methods
      useComma - true if the list has to be comma separated
      useBrackets - 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 methods
      useComma - true if the list has to be comma separated
      useBrackets - true if the list has to be enclosed in brackets
      Returns:
      comma separated list of the elements in the list
    • getWithItemsList

      public List<WithItem> getWithItemsList()
    • setWithItemsList

      public void setWithItemsList(List<WithItem> withItemsList)
    • withWithItemsList

      public Select withWithItemsList(List<WithItem> withItemsList)
    • addWithItemsList

      public Select addWithItemsList(Collection<? extends WithItem> withItemsList)
    • addWithItemsList

      public Select addWithItemsList(WithItem... withItemsList)
    • isOracleSiblings

      public boolean isOracleSiblings()
    • setOracleSiblings

      public void setOracleSiblings(boolean oracleSiblings)
    • withOracleSiblings

      public Select withOracleSiblings(boolean oracleSiblings)
    • getForClause

      public ForClause getForClause()
    • setForClause

      public Select setForClause(ForClause forClause)
    • 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)
    • getLimit

      public Limit getLimit()
    • setLimit

      public void setLimit(Limit limit)
    • withLimit

      public Select withLimit(Limit limit)
    • getLimitBy

      public Limit getLimitBy()
    • setLimitBy

      public void setLimitBy(Limit limitBy)
    • withLimitBy

      public <E extends Select> E withLimitBy(Class<E> type, Limit limitBy)
    • getOffset

      public Offset getOffset()
    • setOffset

      public void setOffset(Offset offset)
    • withOffset

      public Select withOffset(Offset offset)
    • getFetch

      public Fetch getFetch()
    • setFetch

      public void setFetch(Fetch fetch)
    • withFetch

      public Select withFetch(Fetch fetch)
    • getIsolation

      public WithIsolation getIsolation()
    • setIsolation

      public void setIsolation(WithIsolation isolation)
    • withIsolation

      public Select withIsolation(WithIsolation isolation)
    • appendSelectBodyTo

      public abstract StringBuilder appendSelectBodyTo(StringBuilder builder)
    • appendTo

      public StringBuilder appendTo(StringBuilder builder)
      Overrides:
      appendTo in class ASTNodeAccessImpl
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • accept

      public abstract void accept(SelectVisitor selectVisitor)
    • accept

      public void accept(StatementVisitor statementVisitor)
      Specified by:
      accept in interface Statement
    • accept

      public void accept(ExpressionVisitor expressionVisitor)
      Specified by:
      accept in interface Expression
    • 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(Class<E> type)