Class AbstractSQL<T>

  • Direct Known Subclasses:
    SQL

    public abstract class AbstractSQL<T>
    extends Object
    Author:
    Clinton Begin, Jeff Butler, Adam Gent, Kazuki Shimizu
    • Constructor Detail

      • AbstractSQL

        public AbstractSQL()
    • Method Detail

      • getSelf

        public abstract T getSelf()
      • UPDATE

        public T UPDATE​(String table)
      • SET

        public T SET​(String sets)
      • SET

        public T SET​(String... sets)
        Sets the.
        Parameters:
        sets - the sets
        Returns:
        the t
        Since:
        3.4.2
      • INSERT_INTO

        public T INSERT_INTO​(String tableName)
      • INTO_COLUMNS

        public T INTO_COLUMNS​(String... columns)
        Into columns.
        Parameters:
        columns - the columns
        Returns:
        the t
        Since:
        3.4.2
      • INTO_VALUES

        public T INTO_VALUES​(String... values)
        Into values.
        Parameters:
        values - the values
        Returns:
        the t
        Since:
        3.4.2
      • SELECT

        public T SELECT​(String columns)
      • SELECT

        public T SELECT​(String... columns)
        Select.
        Parameters:
        columns - the columns
        Returns:
        the t
        Since:
        3.4.2
      • SELECT_DISTINCT

        public T SELECT_DISTINCT​(String columns)
      • SELECT_DISTINCT

        public T SELECT_DISTINCT​(String... columns)
        Select distinct.
        Parameters:
        columns - the columns
        Returns:
        the t
        Since:
        3.4.2
      • DELETE_FROM

        public T DELETE_FROM​(String table)
      • FROM

        public T FROM​(String table)
      • FROM

        public T FROM​(String... tables)
        From.
        Parameters:
        tables - the tables
        Returns:
        the t
        Since:
        3.4.2
      • JOIN

        public T JOIN​(String join)
      • JOIN

        public T JOIN​(String... joins)
        Join.
        Parameters:
        joins - the joins
        Returns:
        the t
        Since:
        3.4.2
      • INNER_JOIN

        public T INNER_JOIN​(String join)
      • INNER_JOIN

        public T INNER_JOIN​(String... joins)
        Inner join.
        Parameters:
        joins - the joins
        Returns:
        the t
        Since:
        3.4.2
      • LEFT_OUTER_JOIN

        public T LEFT_OUTER_JOIN​(String join)
      • LEFT_OUTER_JOIN

        public T LEFT_OUTER_JOIN​(String... joins)
        Left outer join.
        Parameters:
        joins - the joins
        Returns:
        the t
        Since:
        3.4.2
      • RIGHT_OUTER_JOIN

        public T RIGHT_OUTER_JOIN​(String join)
      • RIGHT_OUTER_JOIN

        public T RIGHT_OUTER_JOIN​(String... joins)
        Right outer join.
        Parameters:
        joins - the joins
        Returns:
        the t
        Since:
        3.4.2
      • OUTER_JOIN

        public T OUTER_JOIN​(String join)
      • OUTER_JOIN

        public T OUTER_JOIN​(String... joins)
        Outer join.
        Parameters:
        joins - the joins
        Returns:
        the t
        Since:
        3.4.2
      • WHERE

        public T WHERE​(String conditions)
      • WHERE

        public T WHERE​(String... conditions)
        Where.
        Parameters:
        conditions - the conditions
        Returns:
        the t
        Since:
        3.4.2
      • OR

        public T OR()
      • AND

        public T AND()
      • GROUP_BY

        public T GROUP_BY​(String columns)
      • GROUP_BY

        public T GROUP_BY​(String... columns)
        Group by.
        Parameters:
        columns - the columns
        Returns:
        the t
        Since:
        3.4.2
      • HAVING

        public T HAVING​(String conditions)
      • HAVING

        public T HAVING​(String... conditions)
        Having.
        Parameters:
        conditions - the conditions
        Returns:
        the t
        Since:
        3.4.2
      • ORDER_BY

        public T ORDER_BY​(String columns)
      • ORDER_BY

        public T ORDER_BY​(String... columns)
        Order by.
        Parameters:
        columns - the columns
        Returns:
        the t
        Since:
        3.4.2
      • LIMIT

        public T LIMIT​(String variable)
        Set the limit variable string(e.g. "#{limit}").
        Parameters:
        variable - a limit variable string
        Returns:
        a self instance
        Since:
        3.5.2
        See Also:
        OFFSET(String)
      • LIMIT

        public T LIMIT​(int value)
        Set the limit value.
        Parameters:
        value - an offset value
        Returns:
        a self instance
        Since:
        3.5.2
        See Also:
        OFFSET(long)
      • OFFSET

        public T OFFSET​(String variable)
        Set the offset variable string(e.g. "#{offset}").
        Parameters:
        variable - a offset variable string
        Returns:
        a self instance
        Since:
        3.5.2
        See Also:
        LIMIT(String)
      • OFFSET

        public T OFFSET​(long value)
        Set the offset value.
        Parameters:
        value - an offset value
        Returns:
        a self instance
        Since:
        3.5.2
        See Also:
        LIMIT(int)
      • FETCH_FIRST_ROWS_ONLY

        public T FETCH_FIRST_ROWS_ONLY​(String variable)
        Set the fetch first rows variable string(e.g. "#{fetchFirstRows}").
        Parameters:
        variable - a fetch first rows variable string
        Returns:
        a self instance
        Since:
        3.5.2
        See Also:
        OFFSET_ROWS(String)
      • FETCH_FIRST_ROWS_ONLY

        public T FETCH_FIRST_ROWS_ONLY​(int value)
        Set the fetch first rows value.
        Parameters:
        value - a fetch first rows value
        Returns:
        a self instance
        Since:
        3.5.2
        See Also:
        OFFSET_ROWS(long)
      • OFFSET_ROWS

        public T OFFSET_ROWS​(String variable)
        Set the offset rows variable string(e.g. "#{offset}").
        Parameters:
        variable - a offset rows variable string
        Returns:
        a self instance
        Since:
        3.5.2
        See Also:
        FETCH_FIRST_ROWS_ONLY(String)
      • OFFSET_ROWS

        public T OFFSET_ROWS​(long value)
        Set the offset rows value.
        Parameters:
        value - an offset rows value
        Returns:
        a self instance
        Since:
        3.5.2
        See Also:
        FETCH_FIRST_ROWS_ONLY(int)
      • ADD_ROW

        public T ADD_ROW()
        used to add a new inserted row while do multi-row insert.
        Returns:
        the t
        Since:
        3.5.2
      • usingAppender

        public <A extends Appendable> A usingAppender​(A a)