public abstract class AbstractDataFieldMaxValueIncrementer extends ObjectSE implements DataFieldMaxValueIncrementer, InitializingBean
long
を返す単一の getNextKey()
テンプレートメソッドに委譲する DataFieldMaxValueIncrementer
の基本実装。文字列値に long を使用し、必要に応じてゼロを埋め込みます。修飾子と型 | フィールドと説明 |
---|---|
protected int | paddingLength 文字列結果の先頭にゼロを追加する長さ。 |
コンストラクターと説明 |
---|
AbstractDataFieldMaxValueIncrementer() Bean プロパティスタイルの使用のデフォルトコンストラクター。 |
AbstractDataFieldMaxValueIncrementer(DataSourceSE dataSource, StringSE incrementerName) 便利なコンストラクター。 |
修飾子と型 | メソッドと説明 |
---|---|
void | afterPropertiesSet() |
DataSourceSE | getDataSource() 値を取得するデータソースを返します。 |
StringSE | getIncrementerName() シーケンス / テーブルの名前を返します。 |
protected abstract long | getNextKey() long として、次に使用するキーを決定します。 |
int | getPaddingLength() 文字列値のパディング長を返します。 |
int | nextIntValue() データストアフィールドの最大値を int としてインクリメントします。 |
long | nextLongValue() データストアフィールドの最大値を長くします。 |
StringSE | nextStringValue() データストアフィールドの最大値を文字列としてインクリメントします。 |
void | setDataSource(DataSourceSE dataSource) 値を取得するデータソースを設定します。 |
void | setIncrementerName(StringSE incrementerName) シーケンス / テーブルの名前を設定します。 |
void | setPaddingLength(int paddingLength) パディングの長さを設定します。 |
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSE
public AbstractDataFieldMaxValueIncrementer()
public AbstractDataFieldMaxValueIncrementer(DataSourceSE dataSource, StringSE incrementerName)
dataSource
- 使用する DataSourceincrementerName
- 使用するシーケンス / テーブルの名前 public void setDataSource(DataSourceSE dataSource)
public DataSourceSE getDataSource()
public void setIncrementerName(StringSE incrementerName)
public StringSE getIncrementerName()
public void setPaddingLength(int paddingLength)
public int getPaddingLength()
public void afterPropertiesSet()
InitializingBean
BeanFactoryAware
、ApplicationContextAware
などを満たした後、包含 BeanFactory
によって呼び出されます。このメソッドにより、Bean インスタンスは、すべての Bean プロパティが設定されたときに、その全体的な構成の検証と最終的な初期化を実行できます。
InitializingBean
の afterPropertiesSet
public int nextIntValue() throws DataAccessException
DataFieldMaxValueIncrementer
DataFieldMaxValueIncrementer
の nextIntValue
DataAccessException
- エラーの場合 public long nextLongValue() throws DataAccessException
DataFieldMaxValueIncrementer
DataFieldMaxValueIncrementer
の nextLongValue
DataAccessException
- エラーの場合 public StringSE nextStringValue() throws DataAccessException
DataFieldMaxValueIncrementer
DataFieldMaxValueIncrementer
の nextStringValue
DataAccessException
- エラーの場合 protected abstract long getNextKey()