public class JdbcPollingChannelAdapter
extends org.springframework.integration.endpoint.AbstractMessageSource<java.lang.Object>
| Constructor and Description |
|---|
JdbcPollingChannelAdapter(javax.sql.DataSource dataSource,
java.lang.String selectQuery)
Constructor taking
DataSource from which the DB Connection can be
obtained and the select query to execute to retrieve new rows. |
JdbcPollingChannelAdapter(org.springframework.jdbc.core.JdbcOperations jdbcOperations,
java.lang.String selectQuery)
Constructor taking
JdbcOperations instance to use for query
execution and the select query to execute to retrieve new rows. |
| Modifier and Type | Method and Description |
|---|---|
protected java.util.List<?> |
doPoll(org.springframework.jdbc.core.namedparam.SqlParameterSource sqlQueryParameterSource) |
protected java.lang.Object |
doReceive()
Execute the select query and the update query if provided.
|
java.lang.String |
getComponentType() |
protected void |
onInit() |
void |
setMaxRows(int maxRows)
The maximum number of rows to query.
|
void |
setRowMapper(org.springframework.jdbc.core.RowMapper<?> rowMapper) |
void |
setSelectQuery(java.lang.String selectQuery)
Set the select query.
|
void |
setSelectSqlParameterSource(org.springframework.jdbc.core.namedparam.SqlParameterSource sqlQueryParameterSource)
A source of parameters for the select query used for polling.
|
void |
setUpdatePerRow(boolean updatePerRow) |
void |
setUpdateSql(java.lang.String updateSql) |
void |
setUpdateSqlParameterSourceFactory(SqlParameterSourceFactory sqlParameterSourceFactory) |
buildMessage, destroy, getBeanName, getComponentName, getManagedName, getManagedType, getOverrides, isLoggingEnabled, receive, registerMetricsCaptor, setBeanName, setHeaderExpressions, setLoggingEnabled, setManagedName, setManagedTypeafterPropertiesSet, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, getBeanFactory, getEvaluationContext, getEvaluationContext, getMessageBuilderFactory, setBeanFactory, setConversionServiceclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic JdbcPollingChannelAdapter(javax.sql.DataSource dataSource,
java.lang.String selectQuery)
DataSource from which the DB Connection can be
obtained and the select query to execute to retrieve new rows.dataSource - Must not be nullselectQuery - query to executepublic JdbcPollingChannelAdapter(org.springframework.jdbc.core.JdbcOperations jdbcOperations,
java.lang.String selectQuery)
JdbcOperations instance to use for query
execution and the select query to execute to retrieve new rows.jdbcOperations - instance to use for query executionselectQuery - query to executepublic void setRowMapper(@Nullable
org.springframework.jdbc.core.RowMapper<?> rowMapper)
public final void setSelectQuery(java.lang.String selectQuery)
selectQuery - the query.public void setUpdateSql(java.lang.String updateSql)
public void setUpdatePerRow(boolean updatePerRow)
public void setUpdateSqlParameterSourceFactory(SqlParameterSourceFactory sqlParameterSourceFactory)
public void setSelectSqlParameterSource(@Nullable
org.springframework.jdbc.core.namedparam.SqlParameterSource sqlQueryParameterSource)
sqlQueryParameterSource - the sql query parameter source to setpublic void setMaxRows(int maxRows)
maxRows - the max rows to setprotected void onInit()
onInit in class org.springframework.integration.util.AbstractExpressionEvaluatorpublic java.lang.String getComponentType()
protected java.lang.Object doReceive()
doReceive in class org.springframework.integration.endpoint.AbstractMessageSource<java.lang.Object>protected java.util.List<?> doPoll(@Nullable
org.springframework.jdbc.core.namedparam.SqlParameterSource sqlQueryParameterSource)