|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.integration.jdbc.JdbcPollingChannelAdapter
public class JdbcPollingChannelAdapter
A polling channel adapter that creates messages from the payload returned by executing a select query Optionally an update can be executed after the select in order to update processed rows
Constructor Summary | |
---|---|
JdbcPollingChannelAdapter(javax.sql.DataSource dataSource,
java.lang.String selectQuery)
Constructor taking query to execute to retreive new rows and DataSource from which the DB Connection can be obtained |
|
JdbcPollingChannelAdapter(org.springframework.jdbc.core.simple.SimpleJdbcOperations jdbcOperations,
java.lang.String selectQuery)
Constructor taking query to execute on a poll and SimpleJdbcOperations instance to use for query execution |
Method Summary | |
---|---|
protected void |
executeUpdateQuery(java.lang.Object obj)
|
protected java.lang.Object |
pollAndUpdate()
Execute the select query and the update query if provided and rows are returned by the select query |
protected java.util.List |
pollWithRowMapper()
|
Message<java.lang.Object> |
receive()
Polls for new rows returning a message containing one or more rows where rows are found and null where no rows are returned by the select query |
void |
setRowMapper(org.springframework.jdbc.core.RowMapper<?> rowMapper)
|
void |
setSqlParameterSourceFactoryForUpdate(SqlParamterSourceFactory sqlParameterSourceFactoryForUpdate)
|
void |
setUpdatePerRow(boolean updatePerRow)
|
void |
setUpdateSql(java.lang.String updateSql)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JdbcPollingChannelAdapter(javax.sql.DataSource dataSource, java.lang.String selectQuery)
DataSource
from which the DB Connection can be obtained
dataSource
- used to create a SimpleJdbcTemplate
selectQuery
- query to executepublic JdbcPollingChannelAdapter(org.springframework.jdbc.core.simple.SimpleJdbcOperations jdbcOperations, java.lang.String selectQuery)
SimpleJdbcOperations
instance to use for query execution
jdbcOperations
- selectQuery
- query to executeMethod Detail |
---|
public void setRowMapper(org.springframework.jdbc.core.RowMapper<?> rowMapper)
public void setUpdateSql(java.lang.String updateSql)
public void setUpdatePerRow(boolean updatePerRow)
public void setSqlParameterSourceFactoryForUpdate(SqlParamterSourceFactory sqlParameterSourceFactoryForUpdate)
public Message<java.lang.Object> receive()
receive
in interface MessageSource<java.lang.Object>
protected java.lang.Object pollAndUpdate()
protected void executeUpdateQuery(java.lang.Object obj)
protected java.util.List pollWithRowMapper()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |