public class CompositeDatabasePopulator extends ObjectSE implements DatabasePopulator
DatabasePopulator 実装のリストに委譲し、すべてのスクリプトを実行する複合 DatabasePopulator。| コンストラクターと説明 |
|---|
CompositeDatabasePopulator() 空の CompositeDatabasePopulator を作成します。 |
CompositeDatabasePopulator(CollectionSE<DatabasePopulator> populators) 指定されたポピュレータを使用して CompositeDatabasePopulator を作成します。 |
CompositeDatabasePopulator(DatabasePopulator... populators) 指定されたポピュレータを使用して CompositeDatabasePopulator を作成します。 |
| 修飾子と型 | メソッドと説明 |
|---|---|
void | addPopulators(DatabasePopulator... populators) デリゲートのリストに 1 つ以上のポピュレーターを追加します。 |
void | populate(ConnectionSE connection) 提供された JDBC 接続を使用して、データベースにデータを入力、初期化、クリーンアップします。 |
void | setPopulators(DatabasePopulator... populators) 委譲する 1 つ以上のポピュレータを指定します。 |
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSEpublic CompositeDatabasePopulator()
CompositeDatabasePopulator を作成します。public CompositeDatabasePopulator(CollectionSE<DatabasePopulator> populators)
CompositeDatabasePopulator を作成します。populators - 委譲する 1 つ以上のポピュレータ public CompositeDatabasePopulator(DatabasePopulator... populators)
CompositeDatabasePopulator を作成します。populators - 委譲する 1 つ以上のポピュレータ public void setPopulators(DatabasePopulator... populators)
public void addPopulators(DatabasePopulator... populators)
public void populate(ConnectionSE connection) throws SQLExceptionSE, ScriptException
DatabasePopulator 警告 : 具体的な実装では、提供されている ConnectionSE を閉じないでください。
具体的な実装では、エラーが発生した場合に SQLExceptionSE をスローすることがありますが、代わりに特定の ScriptException をスローすることを強くお勧めします。例: Spring の ResourceDatabasePopulator および DatabasePopulatorUtils は、すべての SQLExceptions を ScriptExceptions にラップします。
DatabasePopulator の populate connection - 使用する JDBC 接続。すでに構成され、使用する準備ができています。非 nullSQLExceptionSE - データベースとの対話中に回復不能なデータアクセス例外が発生した場合 ScriptException - 他のすべてのエラーの場合 DatabasePopulatorUtils.execute(org.springframework.jdbc.datasource.init.DatabasePopulator, javax.sql.DataSource)