クラス 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 接続を取得できるDataSourceSE と、新しい行を取得するために実行する選択クエリを取得するコンストラクター。JdbcPollingChannelAdapter(JdbcOperations jdbcOperations, StringSE selectQuery) クエリの実行に使用するJdbcOperationsインスタンスと、新しい行を取得するために実行する選択クエリを取得するコンストラクター。方法の概要
修飾子と型メソッド説明protected ListSE<?>doPoll(SqlParameterSource sqlQueryParameterSource) 提供されたSqlParameterSourceに対して選択を実行します。protected ObjectSE提供されている場合は、選択クエリと更新クエリを実行します。protected voidonInit()voidsetMaxRows(int maxRows) クエリする行の最大数。voidsetRowMapper(RowMapper<?> rowMapper) RowMapperを設定します。final voidsetSelectQuery(StringSE selectQuery) 選択クエリを設定します。voidsetSelectSqlParameterSource(SqlParameterSource sqlQueryParameterSource) ポーリングに使用される選択クエリのパラメーターのソース。voidsetUpdatePerRow(boolean updatePerRow) レコードごとに更新するかどうかのフラグを設定します。voidsetUpdateSql(StringSE updateSql) 更新クエリを設定します。voidsetUpdateSqlParameterSourceFactory(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 接続を取得できるDataSourceSE と、新しい行を取得するために実行する選択クエリを取得するコンストラクター。- パラメーター:
dataSource- null であってはなりませんselectQuery- 実行するクエリ
JdbcPollingChannelAdapter
クエリの実行に使用するJdbcOperationsインスタンスと、新しい行を取得するために実行する選択クエリを取得するコンストラクター。- パラメーター:
jdbcOperations- クエリの実行に使用するインスタンスselectQuery- 実行するクエリ
方法の詳細
setRowMapper
RowMapperを設定します。- パラメーター:
rowMapper- 使用するRowMapper。
setSelectQuery
選択クエリを設定します。- パラメーター:
selectQuery- クエリ。- 導入:
- 5.2.1
setUpdateSql
更新クエリを設定します。- パラメーター:
updateSql- 使用する更新クエリ。
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。オプション。- 戻り値:
- クエリの結果。