public class JdbcOutboundGateway extends AbstractReplyProducingMessageHandler implements org.springframework.beans.factory.InitializingBean
AbstractReplyProducingMessageHandler.RequestHandler
logger
Constructor and Description |
---|
JdbcOutboundGateway(javax.sql.DataSource dataSource,
java.lang.String updateQuery) |
JdbcOutboundGateway(javax.sql.DataSource dataSource,
java.lang.String updateQuery,
java.lang.String selectQuery) |
JdbcOutboundGateway(org.springframework.jdbc.core.JdbcOperations jdbcOperations,
java.lang.String updateQuery) |
JdbcOutboundGateway(org.springframework.jdbc.core.JdbcOperations jdbcOperations,
java.lang.String updateQuery,
java.lang.String selectQuery) |
Modifier and Type | Method and Description |
---|---|
protected void |
doInit() |
protected java.lang.Object |
handleRequestMessage(Message<?> requestMessage)
Subclasses must implement this method to handle the request Message.
|
void |
setKeysGenerated(boolean keysGenerated)
Flag to indicate that the update query is an insert with autogenerated keys, which will be logged at debug level.
|
void |
setMaxRowsPerPoll(java.lang.Integer maxRowsPerPoll)
The maximum number of rows to pull out of the query results per poll (if
greater than zero, otherwise all rows will be packed into the outgoing
message).
|
void |
setReplySqlParameterSourceFactory(SqlParameterSourceFactory sqlParameterSourceFactory) |
void |
setRequestSqlParameterSourceFactory(SqlParameterSourceFactory sqlParameterSourceFactory) |
void |
setRowMapper(org.springframework.jdbc.core.RowMapper<?> rowMapper) |
doInvokeAdvisedRequestHandler, getMessagingTemplate, handleMessageInternal, hasAdviceChain, onInit, setAdviceChain, setBeanClassLoader, setChannelResolver, setOutputChannel, setRequiresReply, setSendTimeout, shouldCopyRequestHeaders
getComponentType, getOrder, handleMessage, setOrder, setShouldTrack
afterPropertiesSet, getApplicationContextId, getBeanFactory, getComponentName, getConversionService, getIntegrationProperties, getIntegrationProperty, getTaskScheduler, setApplicationContext, setBeanFactory, setBeanName, setComponentName, setConversionService, setTaskScheduler, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
afterPropertiesSet
getComponentName
public JdbcOutboundGateway(javax.sql.DataSource dataSource, java.lang.String updateQuery)
public JdbcOutboundGateway(javax.sql.DataSource dataSource, java.lang.String updateQuery, java.lang.String selectQuery)
public JdbcOutboundGateway(org.springframework.jdbc.core.JdbcOperations jdbcOperations, java.lang.String updateQuery)
public JdbcOutboundGateway(org.springframework.jdbc.core.JdbcOperations jdbcOperations, java.lang.String updateQuery, java.lang.String selectQuery)
public void setMaxRowsPerPoll(java.lang.Integer maxRowsPerPoll)
JdbcPollingChannelAdapter
.
If not specified this value will default to zero
.
This parameter is only applicable if a selectQuery was provided. Null values
are not permitted.maxRowsPerPoll
- Must not be null.protected void doInit()
doInit
in class AbstractReplyProducingMessageHandler
protected java.lang.Object handleRequestMessage(Message<?> requestMessage)
AbstractReplyProducingMessageHandler
handleRequestMessage
in class AbstractReplyProducingMessageHandler
public void setKeysGenerated(boolean keysGenerated)
keysGenerated
- the flag value to setpublic void setRequestSqlParameterSourceFactory(SqlParameterSourceFactory sqlParameterSourceFactory)
public void setReplySqlParameterSourceFactory(SqlParameterSourceFactory sqlParameterSourceFactory)
public void setRowMapper(org.springframework.jdbc.core.RowMapper<?> rowMapper)