クラス JdbcPollingChannelAdapter
java.lang.ObjectSE
org.springframework.integration.util.AbstractExpressionEvaluator
org.springframework.integration.endpoint.AbstractMessageSource<ObjectSE>
org.springframework.integration.jdbc.inbound.JdbcPollingChannelAdapter
- 実装されているすべてのインターフェース:
Aware、BeanFactoryAware、BeanNameAware、DisposableBean、InitializingBean、MessageSource<ObjectSE>、IntegrationPattern、NamedComponent、IntegrationInboundManagement、IntegrationManagement
- 既知の直属サブクラス
JdbcPollingChannelAdapter
選択クエリを実行して返されたペイロードからメッセージを作成するポーリングチャネルアダプター。オプションで、処理された行を更新するために、選択後に更新を実行できます。
- 導入:
- 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 接続を取得できるDataSourceSE と、新しい行を取得するために実行する選択クエリを取得するコンストラクター。JdbcPollingChannelAdapter(JdbcOperations jdbcOperations, StringSE selectQuery) クエリの実行に使用するJdbcOperationsインスタンスと、新しい行を取得するために実行する選択クエリを取得するコンストラクター。方法の概要
修飾子と型メソッド説明ListSE<?> doPoll(@Nullable SqlParameterSource sqlQueryParameterSource) 提供されたSqlParameterSourceに対して選択を実行します。protected @Nullable ObjectSE提供されている場合は、選択クエリと更新クエリを実行します。protected voidonInit()voidsetMaxRows(int maxRows) クエリする行の最大数。voidsetRowMapper(@Nullable RowMapper<?> rowMapper) RowMapperを設定します。final voidsetSelectQuery(StringSE selectQuery) 選択クエリを設定します。voidsetSelectSqlParameterSource(@Nullable SqlParameterSource sqlQueryParameterSource) ポーリングに使用される選択クエリのパラメーターのソース。voidsetUpdatePerRow(boolean updatePerRow) レコードごとに更新するかどうかのフラグを設定します。voidsetUpdateSql(StringSE updateSql) 更新クエリを設定します。voidsetUpdateSqlParameterSourceFactory(SqlParameterSourceFactory sqlParameterSourceFactory) 更新クエリのSqlParameterSourceFactoryを設定します。クラス org.springframework.integration.endpoint.AbstractMessageSource から継承されたメソッド
buildMessage, destroy, 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インターフェース org.springframework.integration.support.context.NamedComponent から継承されたメソッド
getBeanName
コンストラクターの詳細
JdbcPollingChannelAdapter
DB 接続を取得できるDataSourceSE と、新しい行を取得するために実行する選択クエリを取得するコンストラクター。- パラメーター:
dataSource- null であってはなりませんselectQuery- 実行するクエリ
JdbcPollingChannelAdapter
クエリの実行に使用するJdbcOperationsインスタンスと、新しい行を取得するために実行する選択クエリを取得するコンストラクター。- パラメーター:
jdbcOperations- クエリの実行に使用するインスタンスselectQuery- 実行するクエリ
メソッドの詳細
setRowMapper
setSelectQuery
setUpdateSql
setUpdatePerRow
public void setUpdatePerRow(boolean updatePerRow) レコードごとに更新するかどうかのフラグを設定します。デフォルトは false です。- パラメーター:
updatePerRow- レコードごとまたはバッチ全体の更新を制御するフラグ。
setUpdateSqlParameterSourceFactory
更新クエリのSqlParameterSourceFactoryを設定します。- パラメーター:
sqlParameterSourceFactory- 使用するSqlParameterSourceFactory。
setSelectSqlParameterSource
ポーリングに使用される選択クエリのパラメーターのソース。- パラメーター:
sqlQueryParameterSource- 設定する SQL クエリパラメーターソース
setMaxRows
public void setMaxRows(int maxRows) クエリする行の最大数。デフォルトはゼロです - すべてのレコードを選択します。- パラメーター:
maxRows- 設定する最大行
onInit
protected void onInit()- オーバーライド:
- クラス
AbstractExpressionEvaluatorのonInit
getComponentType
doReceive
提供されている場合は、選択クエリと更新クエリを実行します。選択クエリによって返された行を返します。RowMapper が指定されている場合、マップされた結果が返されます。- 次で指定:
- クラス
AbstractMessageSource<ObjectSE>のdoReceive - 戻り値:
- 返された値。
doPoll
提供されたSqlParameterSourceに対して選択を実行します。- パラメーター:
sqlQueryParameterSource- 使用するSqlParameterSource。オプション。- 戻り値:
- クエリの結果。