public class JdbcOutboundGateway extends AbstractReplyProducingMessageHandler
AbstractReplyProducingMessageHandler.RequestHandlerIntegrationManagement.ManagementOverridesmessagingTemplateEXPRESSION_PARSER, loggerHIGHEST_PRECEDENCE, LOWEST_PRECEDENCEMETER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAME| 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 auto-generated keys,
which will be logged at debug level.
|
void |
setMaxRows(Integer maxRows)
The maximum number of rows to query.
|
void |
setReplySqlParameterSourceFactory(SqlParameterSourceFactory sqlParameterSourceFactory) |
void |
setRequestPreparedStatementSetter(MessagePreparedStatementSetter requestPreparedStatementSetter) |
void |
setRequestSqlParameterSourceFactory(SqlParameterSourceFactory sqlParameterSourceFactory) |
void |
setRowMapper(RowMapper<?> rowMapper) |
doInvokeAdvisedRequestHandler, getBeanClassLoader, getIntegrationPatternType, getRequiresReply, handleMessageInternal, hasAdviceChain, onInit, setAdviceChain, setBeanClassLoader, setRequiresReplyaddNotPropagatedHeaders, createOutputMessage, getNotPropagatedHeaders, getOutputChannel, isAsync, messageBuilderForReply, produceOutput, resolveErrorChannel, sendErrorMessage, sendOutput, sendOutputs, setAsync, setNotPropagatedHeaders, setOutputChannel, setOutputChannelName, setSendTimeout, shouldCopyRequestHeaders, shouldSplitOutput, updateNotPropagatedHeadershandleMessage, onComplete, onError, onNext, onSubscribebuildSendTimer, destroy, getManagedName, getManagedType, getMetricsCaptor, getOrder, getOverrides, isLoggingEnabled, registerMetricsCaptor, sendTimer, setLoggingEnabled, setManagedName, setManagedType, setOrder, setShouldTrack, shouldTrackafterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanDescription, getBeanFactory, getBeanName, getChannelResolver, getComponentName, getConversionService, getExpression, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetThisAsgetBeanName, getComponentNamepublic 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 setMaxRows(Integer maxRows)
JdbcPollingChannelAdapter.
Also used to check before producing reply:
if result has only one item and maxRows is not set or configured to 1,
only that item is returned. Otherwise the whole list.
If not specified this value will default to 1.
This parameter is only applicable if a selectQuery was provided. Null values
are not permitted.maxRows - the number of rows to select. Must not be null.JdbcPollingChannelAdapter.setMaxRows(int)public void setKeysGenerated(boolean keysGenerated)
keysGenerated - the flag value to setpublic void setRequestSqlParameterSourceFactory(SqlParameterSourceFactory sqlParameterSourceFactory)
public void setRequestPreparedStatementSetter(MessagePreparedStatementSetter requestPreparedStatementSetter)
public void setReplySqlParameterSourceFactory(SqlParameterSourceFactory sqlParameterSourceFactory)
public void setRowMapper(RowMapper<?> rowMapper)
public String getComponentType()
IntegrationObjectSupportgetComponentType in interface NamedComponentgetComponentType in class MessageHandlerSupportprotected void doInit()
doInit in class AbstractReplyProducingMessageHandlerprotected Object handleRequestMessage(Message<?> requestMessage)
AbstractReplyProducingMessageHandlerhandleRequestMessage in class AbstractReplyProducingMessageHandlerrequestMessage - The request message.null.