public class HsqlMaxValueIncrementer extends AbstractIdentityColumnMaxValueIncrementer
DataFieldMaxValueIncrementer
。注: このクラスを使用する場合、シーケンステーブルが機能するため、HSQL キー列は自動インクリメントであってはなりません。シーケンスはテーブルに保持されます。自動生成キーを必要とするテーブルごとに 1 つのシーケンステーブルが必要です。
例:
create table tab (id int not null primary key, text varchar(100)); create table tab_sequence (value identity); insert into tab_sequence values(0);"cacheSize" が設定されている場合、データベースを照会せずに中間値が提供されます。サーバーまたはアプリケーションが停止またはクラッシュしたり、トランザクションがロールバックされたりすると、未使用の値は提供されません。番号付けの最大ホールサイズは cacheSize の値になります。
注意 : HSQL はシーケンスをサポートするようになりました。代わりにシーケンスの使用を検討する必要があります: HsqlSequenceMaxValueIncrementer
HsqlSequenceMaxValueIncrementer
paddingLength
コンストラクターと説明 |
---|
HsqlMaxValueIncrementer() Bean プロパティスタイルの使用のデフォルトコンストラクター。 |
HsqlMaxValueIncrementer(DataSourceSE dataSource, StringSE incrementerName, StringSE columnName) 便利なコンストラクター。 |
修飾子と型 | メソッドと説明 |
---|---|
protected StringSE | getIdentityStatement() 現在の ID 値を取得するために使用するステートメント。 |
protected StringSE | getIncrementStatement() 「シーケンス」値をインクリメントするために使用するステートメント。 |
getDeleteStatement, getNextKey, isDeleteSpecificValues, setDeleteSpecificValues
afterPropertiesSet, getCacheSize, getColumnName, setCacheSize, setColumnName
getDataSource, getIncrementerName, getPaddingLength, nextIntValue, nextLongValue, nextStringValue, setDataSource, setIncrementerName, setPaddingLength
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSE
public HsqlMaxValueIncrementer()
public HsqlMaxValueIncrementer(DataSourceSE dataSource, StringSE incrementerName, StringSE columnName)
dataSource
- 使用する DataSourceincrementerName
- 使用するシーケンス / テーブルの名前 columnName
- 使用するシーケンステーブルの列の名前 protected StringSE getIncrementStatement()
AbstractIdentityColumnMaxValueIncrementer
AbstractIdentityColumnMaxValueIncrementer
の getIncrementStatement
protected StringSE getIdentityStatement()
AbstractIdentityColumnMaxValueIncrementer
AbstractIdentityColumnMaxValueIncrementer
の getIdentityStatement