クラス OracleDialect
- java.lang.Object
-
- com.github.mygreen.sqlmapper.core.dialect.DialectBase
-
- com.github.mygreen.sqlmapper.core.dialect.OracleDialect
-
- すべての実装されたインタフェース:
Dialect
- 直系の既知のサブクラス:
OracleLegacyDialect
public class OracleDialect extends DialectBase
Oracle v12+用の方言の定義。- 作成者:
- T.TSUCHIE
-
-
コンストラクタの概要
コンストラクタ コンストラクタ 説明 OracleDialect()
-
メソッドの概要
すべてのメソッド インスタンス・メソッド concreteメソッド 修飾子とタイプ メソッド 説明 StringgetForUpdateSql(SelectForUpdateType type, int waitSeconds)SELECT文に付加するFOR UPDATE NOWAIT相当のSQLを返します。StringgetHintComment(String hint)ヒントコメントを返します。StringgetName()方言の名称を取得します。org.springframework.jdbc.support.incrementer.DataFieldMaxValueIncrementergetSequenceIncrementer(DataSource dataSource, String sequenceName)シーケンスをインクリメントする処理を取得します。booleanisSupportedGenerationType(GeneratedValue.GenerationType generationType)サポートする主キーの生成戦略を判定します。booleanisSupportedSelectForUpdate(SelectForUpdateType type)SELECT文でFOR UPDATEをサポートしていればtrueを返します。-
クラスから継承されたメソッド com.github.mygreen.sqlmapper.core.dialect.DialectBase
convertLimitSql, getCountSql, getDefaultGenerationType, getValueType
-
-
-
-
メソッドの詳細
-
getName
public String getName()
方言の名称を取得します。この値は、
SqlTemplateEngine.setSuffixName(String)にも使用されます。- 戻り値:
- "oracle"を返します。
-
isSupportedGenerationType
public boolean isSupportedGenerationType(GeneratedValue.GenerationType generationType)
サポートする主キーの生成戦略を判定します。- パラメータ:
generationType- 主キーの生成戦略。- 戻り値:
GeneratedValue.GenerationType.IDENTITY: trueGeneratedValue.GenerationType.SEQUENCE: trueGeneratedValue.GenerationType.TABLE: true- その他 : false
-
getSequenceIncrementer
public org.springframework.jdbc.support.incrementer.DataFieldMaxValueIncrementer getSequenceIncrementer(DataSource dataSource, String sequenceName)
シーケンスをインクリメントする処理を取得します。- パラメータ:
dataSource- データソースsequenceName- シーケンス名- 戻り値:
OracleSequenceMaxValueIncrementerのインスタンスを返す。
-
getHintComment
public String getHintComment(String hint)
ヒントコメントを返します。ヒント句をサポートしていないDBの場合は空文字を返します。
- 定義:
getHintCommentインタフェース内Dialect- オーバーライド:
getHintCommentクラス内DialectBase- パラメータ:
hint- ヒント- 戻り値:
- コメントの形式 /*+ヒント*/ の形式で返します。
-
isSupportedSelectForUpdate
public boolean isSupportedSelectForUpdate(SelectForUpdateType type)
SELECT文でFOR UPDATEをサポートしていればtrueを返します。- 定義:
isSupportedSelectForUpdateインタフェース内Dialect- オーバーライド:
isSupportedSelectForUpdateクラス内DialectBase- パラメータ:
type- SELECT ~ FOR UPDATEのタイプ- 戻り値:
- 必ずtrue を返します。
-
getForUpdateSql
public String getForUpdateSql(SelectForUpdateType type, int waitSeconds)
SELECT文に付加するFOR UPDATE NOWAIT相当のSQLを返します。- 定義:
getForUpdateSqlインタフェース内Dialect- オーバーライド:
getForUpdateSqlクラス内DialectBase- パラメータ:
type- SELECT ~ FOR UPDATEのタイプwaitSeconds-typeにSelectForUpdateType.WAITが指定された場合の待機時間(秒単位)- 戻り値:
SelectForUpdateType.NORMAL: for updateSelectForUpdateType.NOWAIT: for update nowaitSelectForUpdateType.WAIT: for update wait <waitSeconds>
-
-