public class JdbcOutboundGateway extends AbstractReplyProducingMessageHandler implements InitializingBean
AbstractReplyProducingMessageHandler.RequestHandler
logger
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
Constructor and Description |
---|
JdbcOutboundGateway(DataSource dataSource,
String updateQuery) |
JdbcOutboundGateway(DataSource dataSource,
String updateQuery,
String selectQuery) |
JdbcOutboundGateway(JdbcOperations jdbcOperations,
String updateQuery) |
JdbcOutboundGateway(JdbcOperations jdbcOperations,
String updateQuery,
String selectQuery) |
Modifier and Type | Method and Description |
---|---|
protected void |
doInit() |
String |
getComponentType()
Subclasses may implement this method to provide component type information.
|
protected 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(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(RowMapper<?> rowMapper) |
doInvokeAdvisedRequestHandler, getMessagingTemplate, handleMessageInternal, hasAdviceChain, onInit, setAdviceChain, setBeanClassLoader, setChannelResolver, setOutputChannel, setOutputChannelName, setRequiresReply, setSendTimeout, shouldCopyRequestHeaders
getOrder, handleMessage, setOrder, setShouldTrack
afterPropertiesSet, 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
afterPropertiesSet
getComponentName
public JdbcOutboundGateway(DataSource dataSource, String updateQuery)
public JdbcOutboundGateway(DataSource dataSource, String updateQuery, String selectQuery)
public JdbcOutboundGateway(JdbcOperations jdbcOperations, String updateQuery)
public JdbcOutboundGateway(JdbcOperations jdbcOperations, String updateQuery, String selectQuery)
public void setMaxRowsPerPoll(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 String getComponentType()
IntegrationObjectSupport
getComponentType
in interface NamedComponent
getComponentType
in class AbstractMessageHandler
protected void doInit()
doInit
in class AbstractReplyProducingMessageHandler
protected Object handleRequestMessage(Message<?> requestMessage)
AbstractReplyProducingMessageHandler
handleRequestMessage
in class AbstractReplyProducingMessageHandler
requestMessage
- The request message.null
.public void setKeysGenerated(boolean keysGenerated)
keysGenerated
- the flag value to setpublic void setRequestSqlParameterSourceFactory(SqlParameterSourceFactory sqlParameterSourceFactory)
public void setReplySqlParameterSourceFactory(SqlParameterSourceFactory sqlParameterSourceFactory)
public void setRowMapper(RowMapper<?> rowMapper)