Package nablarch.core.db.dialect
Class DefaultDialect
java.lang.Object
nablarch.core.db.dialect.DefaultDialect
- All Implemented Interfaces:
Dialect
- Direct Known Subclasses:
DB2Dialect,H2Dialect,OracleDialect,PostgreSQLDialect,SqlServerDialect
デフォルトの
Dialect実装クラス。
本実装では、全ての方言が無効化される。- Author:
- hisaaki sioiri
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuildSequenceGeneratorSql(String sequenceName) シーケンスオブジェクトの次の値を取得するSQL文を構築する。convertCountSql(String sql) SQL文をレコード数取得用のSQL文に変換する。convertCountSql(String sqlId, Object condition, StatementFactory statementFactory) SQLIDからレコード数取得用のSQL文を取得する。convertPaginationSql(String sql, SelectOption selectOption) SQL文を変換せずに返す。ping用のSQL文を返す。ResultSetから値を取得するための変換クラスを返却する。booleanisDuplicateException(SQLException sqlException) SQL例外が一意制約違反による例外か否か。booleanisTransactionTimeoutError(SQLException sqlException) SQL例外がトランザクションタイムアウトと判断すべき例外か否か。booleanIDENTITY(オートインクリメントカラム)が使用できるか否か。booleanbatch insert時にIDENTITY(オートインクリメントカラム)が使用できるか否か。booleanSQL文でのオフセット指定が使用できるか否かbooleanSEQUENCEが使用できるか否か。
-
Constructor Details
-
DefaultDialect
public DefaultDialect()
-
-
Method Details
-
supportsIdentity
public boolean supportsIdentity()Description copied from interface:DialectIDENTITY(オートインクリメントカラム)が使用できるか否か。- Specified by:
supportsIdentityin interfaceDialect- Returns:
falseを返す。
-
supportsIdentityWithBatchInsert
public boolean supportsIdentityWithBatchInsert()Description copied from interface:Dialectbatch insert時にIDENTITY(オートインクリメントカラム)が使用できるか否か。- Specified by:
supportsIdentityWithBatchInsertin interfaceDialect- Returns:
falseを返す。
-
supportsSequence
public boolean supportsSequence()Description copied from interface:DialectSEQUENCEが使用できるか否か。- Specified by:
supportsSequencein interfaceDialect- Returns:
falseを返す。
-
supportsOffset
public boolean supportsOffset()Description copied from interface:DialectSQL文でのオフセット指定が使用できるか否か- Specified by:
supportsOffsetin interfaceDialect- Returns:
falseを返す。
-
isTransactionTimeoutError
Description copied from interface:DialectSQL例外がトランザクションタイムアウトと判断すべき例外か否か。- Specified by:
isTransactionTimeoutErrorin interfaceDialect- Parameters:
sqlException- SQL例外- Returns:
falseを返す。
-
isDuplicateException
Description copied from interface:DialectSQL例外が一意制約違反による例外か否か。- Specified by:
isDuplicateExceptionin interfaceDialect- Parameters:
sqlException- SQL例外- Returns:
falseを返す。
-
getResultSetConvertor
ResultSetから値を取得するための変換クラスを返却する。全てのカラムを
ResultSet.getObject(int)で取得するコンバータを返す。- Specified by:
getResultSetConvertorin interfaceDialect- Returns:
- 変換クラス。
-
buildSequenceGeneratorSql
シーケンスオブジェクトの次の値を取得するSQL文を構築する。 シーケンス採番はサポートしない。- Specified by:
buildSequenceGeneratorSqlin interfaceDialect- Parameters:
sequenceName- シーケンス名- Returns:
- シーケンスオブジェクトの次の値を取得するSQL文
- Throws:
UnsupportedOperationException- 呼び出された場合
-
convertPaginationSql
SQL文を変換せずに返す。- Specified by:
convertPaginationSqlin interfaceDialect- Parameters:
sql- SQL文selectOption- 検索時のオプション- Returns:
- 変換したSQL文
-
convertCountSql
SQL文をレコード数取得用のSQL文に変換する。 以下形式のCOUNT文取得用SQL文に変換する。
SELECT COUNT(*) COUNT_ FROM ('引数のSQL') SUB_- Specified by:
convertCountSqlin interfaceDialect- Parameters:
sql- SQL文- Returns:
- 変換したSQL文
-
convertCountSql
SQLIDからレコード数取得用のSQL文を取得する。 デフォルトでは、{@link this#convertCountSql(String)}を使用して、StatementFactoryから取得したSQLをレコード数取得用SQLに変換する。- Specified by:
convertCountSqlin interfaceDialect- Parameters:
sqlId- SQLIDcondition- 可変条件に設定される条件をもつオブジェクトstatementFactory- ステートメントファクトリ- Returns:
- レコード数取得用のSQL文
-
getPingSql
ping用のSQL文を返す。 データベースへの死活チェックを行うための、ping用SQL文を生成する。 デフォルト実装では、本メソッドはサポートしない。- Specified by:
getPingSqlin interfaceDialect- Returns:
- ping用のSQL文
-