public class JdbcOutboundGateway
extends org.springframework.integration.handler.AbstractReplyProducingMessageHandler
implements org.springframework.beans.factory.InitializingBean
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() |
java.lang.String |
getComponentType() |
protected java.lang.Object |
handleRequestMessage(org.springframework.messaging.Message<?> requestMessage) |
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, handleMessageInternal, hasAdviceChain, onInit, produceReply, setAdviceChain, setBeanClassLoader, setChannelResolver, setRequiresReply, shouldCopyRequestHeaders
getOutputChannel, setOutputChannel, setOutputChannelName, setSendTimeout
getOrder, handleMessage, setOrder, setShouldTrack
afterPropertiesSet, getApplicationContext, getApplicationContextId, getBeanFactory, getComponentName, getConversionService, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, setApplicationContext, setBeanFactory, setBeanName, setComponentName, setConversionService, setMessageBuilderFactory, setTaskScheduler, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
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.public java.lang.String getComponentType()
getComponentType
in interface org.springframework.integration.support.context.NamedComponent
getComponentType
in class org.springframework.integration.handler.AbstractMessageHandler
protected void doInit()
doInit
in class org.springframework.integration.handler.AbstractReplyProducingMessageHandler
protected java.lang.Object handleRequestMessage(org.springframework.messaging.Message<?> requestMessage)
handleRequestMessage
in class org.springframework.integration.handler.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)