クラス SelectBuilderImpl
- java.lang.Object
-
- org.nkjmlab.sorm4j.sqlstatement.SelectBuilderImpl
-
- すべての実装されたインタフェース:
SelectBuilder
public class SelectBuilderImpl extends Object implements SelectBuilder
An builder of select SQL.- 作成者:
- nkjm
-
-
ネストされたクラスの概要
ネストされたクラス 修飾子とタイプ クラス 説明 static classSelectBuilderImpl.ConditionValue object represents conditions of where clause or having clause.static classSelectBuilderImpl.OrderByValue object for order by clause.
-
メソッドの概要
すべてのメソッド インスタンス・メソッド concreteメソッド 修飾子とタイプ メソッド 説明 StringbuildSql()Creates a select SQL statement from the objects.SelectBuilderdistinct()Add distinct keyword to SQL.SelectBuilderfrom(String table)Create from clause.SelectBuildergroupBy(String... columns)Create group by clause.SelectBuilderhaving(String expr)Create having clause.SelectBuilderhaving(SelectBuilderImpl.Condition condition)Create having clause with the givenSelectBuilderImpl.Condition.SelectBuilderlimit(int limit)Create limit clause.SelectBuilderlimit(int limit, int offset)Create limit clause with offset.SelectBuilderorderBy(String column, String ascOrDesc)SelectBuilderorderBy(SelectBuilderImpl.OrderBy... orderBys)SelectBuilderselect(String... columns)Create select clause.StringtoPrettyString()Create prettified string.StringtoPrettyString(boolean prettyPrint)Create prettified or plain string.StringtoString()SelectBuilderwhere(String expr)Create where clause.SelectBuilderwhere(SelectBuilderImpl.Condition condition)Create where clause.
-
-
-
メソッドの詳細
-
select
public SelectBuilder select(String... columns)
インタフェースからコピーされた説明:SelectBuilderCreate select clause.For example,
select("id","name","age") returns "select id, name, age"- 定義:
selectインタフェース内SelectBuilder- 戻り値:
-
distinct
public SelectBuilder distinct()
インタフェースからコピーされた説明:SelectBuilderAdd distinct keyword to SQL.- 定義:
distinctインタフェース内SelectBuilder
-
from
public SelectBuilder from(String table)
インタフェースからコピーされた説明:SelectBuilderCreate from clause.from("player") returns "from player"- 定義:
fromインタフェース内SelectBuilder- 戻り値:
-
groupBy
public SelectBuilder groupBy(String... columns)
インタフェースからコピーされた説明:SelectBuilderCreate group by clause.- 定義:
groupByインタフェース内SelectBuilder- 戻り値:
-
having
public SelectBuilder having(SelectBuilderImpl.Condition condition)
インタフェースからコピーされた説明:SelectBuilderCreate having clause with the givenSelectBuilderImpl.Condition.- 定義:
havingインタフェース内SelectBuilder- 戻り値:
-
having
public SelectBuilder having(String expr)
インタフェースからコピーされた説明:SelectBuilderCreate having clause.- 定義:
havingインタフェース内SelectBuilder- 戻り値:
-
limit
public SelectBuilder limit(int limit)
インタフェースからコピーされた説明:SelectBuilderCreate limit clause.- 定義:
limitインタフェース内SelectBuilder- 戻り値:
-
limit
public SelectBuilder limit(int limit, int offset)
インタフェースからコピーされた説明:SelectBuilderCreate limit clause with offset.- 定義:
limitインタフェース内SelectBuilder- 戻り値:
-
orderBy
public SelectBuilder orderBy(String column, String ascOrDesc)
- 定義:
orderByインタフェース内SelectBuilder
-
orderBy
public SelectBuilder orderBy(SelectBuilderImpl.OrderBy... orderBys)
- 定義:
orderByインタフェース内SelectBuilder
-
buildSql
public String buildSql()
インタフェースからコピーされた説明:SelectBuilderCreates a select SQL statement from the objects.- 定義:
buildSqlインタフェース内SelectBuilder- 戻り値:
-
toPrettyString
public String toPrettyString()
インタフェースからコピーされた説明:SelectBuilderCreate prettified string.- 定義:
toPrettyStringインタフェース内SelectBuilder- 戻り値:
-
toPrettyString
public String toPrettyString(boolean prettyPrint)
インタフェースからコピーされた説明:SelectBuilderCreate prettified or plain string.- 定義:
toPrettyStringインタフェース内SelectBuilder- 戻り値:
-
where
public SelectBuilder where(SelectBuilderImpl.Condition condition)
インタフェースからコピーされた説明:SelectBuilderCreate where clause.- 定義:
whereインタフェース内SelectBuilder- 戻り値:
-
where
public SelectBuilder where(String expr)
インタフェースからコピーされた説明:SelectBuilderCreate where clause.- 定義:
whereインタフェース内SelectBuilder- 戻り値:
-
-