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