クラス JdbcPollingChannelAdapter
java.lang.ObjectSE
org.springframework.integration.util.AbstractExpressionEvaluator
org.springframework.integration.endpoint.AbstractMessageSource<ObjectSE>
org.springframework.integration.jdbc.JdbcPollingChannelAdapter
- 実装されているすべてのインターフェース:
Aware
、BeanFactoryAware
、BeanNameAware
、DisposableBean
、InitializingBean
、MessageSource<ObjectSE>
、IntegrationPattern
、NamedComponent
、IntegrationInboundManagement
、IntegrationManagement
選択クエリを実行して返されたペイロードからメッセージを作成するポーリングチャネルアダプター。オプションで、処理された行を更新するために、選択後に更新を実行できます。
- 導入:
- 2.0
- 作成者:
- Jonas Partner, Dave Syer, Artem Bilan
ネストされたクラスのサマリー
インターフェース org.springframework.integration.support.management.IntegrationManagement から継承されたネストクラス / インターフェース
IntegrationManagement.ManagementOverrides
フィールドのサマリー
クラス org.springframework.integration.util.AbstractExpressionEvaluator から継承されたフィールド
EXPRESSION_PARSER, logger
インターフェース org.springframework.integration.support.management.IntegrationManagement から継承されたフィールド
METER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAME
コンストラクターの概要
コンストラクターコンストラクター説明JdbcPollingChannelAdapter
(DataSourceSE dataSource, StringSE selectQuery) DB 接続を取得できるDataSource
SE と、新しい行を取得するために実行する選択クエリを取得するコンストラクター。JdbcPollingChannelAdapter
(JdbcOperations jdbcOperations, StringSE selectQuery) クエリの実行に使用するJdbcOperations
インスタンスと、新しい行を取得するために実行する選択クエリを取得するコンストラクター。メソッドのサマリー
修飾子と型メソッド説明protected ListSE
<?> doPoll
(SqlParameterSource sqlQueryParameterSource) 提供されたSqlParameterSource
に対して選択を実行します。protected ObjectSE
提供されている場合は、選択クエリと更新クエリを実行します。protected void
onInit()
void
setMaxRows
(int maxRows) クエリする行の最大数。void
setRowMapper
(RowMapper<?> rowMapper) RowMapper
を設定します。final void
setSelectQuery
(StringSE selectQuery) 選択クエリを設定します。void
setSelectSqlParameterSource
(SqlParameterSource sqlQueryParameterSource) ポーリングに使用される選択クエリのパラメーターのソース。void
setUpdatePerRow
(boolean updatePerRow) レコードごとに更新するかどうかのフラグを設定します。void
setUpdateSql
(StringSE updateSql) 更新クエリを設定します。void
setUpdateSqlParameterSourceFactory
(SqlParameterSourceFactory sqlParameterSourceFactory) 更新クエリのSqlParameterSourceFactory
を設定します。クラス org.springframework.integration.endpoint.AbstractMessageSource から継承されたメソッド
buildMessage, destroy, getBeanName, getComponentName, getManagedName, getManagedType, getOverrides, isLoggingEnabled, receive, registerMetricsCaptor, setBeanName, setHeaderExpressions, setLoggingEnabled, setManagedName, setManagedType
クラス org.springframework.integration.util.AbstractExpressionEvaluator から継承されたメソッド
afterPropertiesSet, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, getBeanFactory, getEvaluationContext, getEvaluationContext, getMessageBuilderFactory, setBeanFactory, setConversionService, setSimpleEvaluationContext
クラス java.lang.ObjectSE から継承されたメソッド
clone, equalsSE, finalize, getClass, hashCode, notify, notifyAll, toString, wait, waitSE, waitSE
インターフェース org.springframework.integration.support.management.IntegrationManagement から継承されたメソッド
getThisAs, isObserved, registerObservationRegistry
インターフェース org.springframework.integration.core.MessageSource から継承されたメソッド
getIntegrationPatternType
コンストラクターの詳細
JdbcPollingChannelAdapter
DB 接続を取得できるDataSource
SE と、新しい行を取得するために実行する選択クエリを取得するコンストラクター。- パラメーター:
dataSource
- null であってはなりませんselectQuery
- 実行するクエリ
JdbcPollingChannelAdapter
クエリの実行に使用するJdbcOperations
インスタンスと、新しい行を取得するために実行する選択クエリを取得するコンストラクター。- パラメーター:
jdbcOperations
- クエリの実行に使用するインスタンスselectQuery
- 実行するクエリ
メソッドの詳細
setRowMapper
setSelectQuery
選択クエリを設定します。- パラメーター:
selectQuery
- クエリ。- 導入:
- 5.2.1
setUpdateSql
setUpdatePerRow
public void setUpdatePerRow(boolean updatePerRow) レコードごとに更新するかどうかのフラグを設定します。デフォルトは false です。- パラメーター:
updatePerRow
- レコードごとまたはバッチ全体の更新を制御するフラグ。
setUpdateSqlParameterSourceFactory
更新クエリのSqlParameterSourceFactory
を設定します。- パラメーター:
sqlParameterSourceFactory
- 使用するSqlParameterSourceFactory
。
setSelectSqlParameterSource
ポーリングに使用される選択クエリのパラメーターのソース。- パラメーター:
sqlQueryParameterSource
- 設定する SQL クエリパラメーターソース
setMaxRows
public void setMaxRows(int maxRows) クエリする行の最大数。デフォルトはゼロです - すべてのレコードを選択します。- パラメーター:
maxRows
- 設定する最大行- 導入:
- 5.1
onInit
protected void onInit()- オーバーライド:
- クラス
AbstractExpressionEvaluator
のonInit
getComponentType
doReceive
提供されている場合は、選択クエリと更新クエリを実行します。選択クエリによって返された行を返します。RowMapper が指定されている場合、マップされた結果が返されます。- 次で指定:
- クラス
AbstractMessageSource<ObjectSE>
のdoReceive
- 戻り値:
- 返された値。
doPoll
提供されたSqlParameterSource
に対して選択を実行します。- パラメーター:
sqlQueryParameterSource
- 使用するSqlParameterSource
。オプション。- 戻り値:
- クエリの結果。