@UriEndpoint(firstVersion="2.7.0", scheme="mybatis", title="MyBatis", syntax="mybatis:statement", consumerClass=MyBatisConsumer.class, label="database,sql") public class MyBatisEndpoint extends BaseMyBatisEndpoint
Constructor and Description |
---|
MyBatisEndpoint() |
MyBatisEndpoint(String endpointUri,
org.apache.camel.Component component,
String statement) |
Modifier and Type | Method and Description |
---|---|
org.apache.camel.Consumer |
createConsumer(org.apache.camel.Processor processor) |
org.apache.camel.Producer |
createProducer() |
int |
getMaxMessagesPerPoll() |
String |
getOnConsume() |
MyBatisProcessingStrategy |
getProcessingStrategy() |
String |
getStatement() |
StatementType |
getStatementType() |
boolean |
isRouteEmptyResultSet() |
boolean |
isTransacted() |
boolean |
isUseIterator() |
void |
setMaxMessagesPerPoll(int maxMessagesPerPoll)
This option is intended to split results returned by the database pool into the batches and deliver them in multiple exchanges.
|
void |
setOnConsume(String onConsume)
Statement to run after data has been processed in the route
|
void |
setProcessingStrategy(MyBatisProcessingStrategy processingStrategy)
To use a custom MyBatisProcessingStrategy
|
void |
setRouteEmptyResultSet(boolean routeEmptyResultSet)
Whether allow empty resultset to be routed to the next hop
|
void |
setStatement(String statement)
The statement name in the MyBatis XML mapping file which maps to the query, insert, update or delete operation you wish to evaluate.
|
void |
setStatementType(StatementType statementType)
Mandatory to specify for the producer to control which kind of operation to invoke.
|
void |
setTransacted(boolean transacted)
Enables or disables transaction.
|
void |
setUseIterator(boolean useIterator)
Process resultset individually or as a list
|
getComponent, getExecutorType, getInputHeader, getOutputHeader, getSqlSessionFactory, isSingleton, setExecutorType, setExecutorType, setInputHeader, setOutputHeader
configurePollingConsumer, configureProperties, configureScheduledPollConsumerProperties, doStart, doStop, getBackoffErrorThreshold, getBackoffIdleThreshold, getBackoffMultiplier, getDelay, getInitialDelay, getPollStrategy, getRunLoggingLevel, getScheduledExecutorService, getScheduler, getSchedulerProperties, getTimeUnit, initConsumerProperties, isGreedy, isSendEmptyMessageWhenIdle, isStartScheduler, isUseFixedDelay, setBackoffErrorThreshold, setBackoffIdleThreshold, setBackoffMultiplier, setDelay, setGreedy, setInitialDelay, setPollStrategy, setRunLoggingLevel, setScheduledExecutorService, setScheduler, setScheduler, setSchedulerProperties, setSendEmptyMessageWhenIdle, setStartScheduler, setTimeUnit, setUseFixedDelay
configureConsumer, createEndpointConfiguration, createEndpointUri, createExchange, createExchange, createExchange, createPollingConsumer, equals, getCamelContext, getConsumerProperties, getEndpointConfiguration, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isBridgeErrorHandler, isLenientProperties, isPollingConsumerBlockWhenFull, isSynchronous, setBridgeErrorHandler, setCamelContext, setConsumerProperties, setEndpointConfiguration, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerQueueSize, setProperties, setSynchronous, toString
doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
public org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor) throws Exception
createConsumer
in interface org.apache.camel.Endpoint
createConsumer
in class org.apache.camel.impl.DefaultPollingEndpoint
Exception
public String getStatement()
public void setStatement(String statement)
public StatementType getStatementType()
public void setStatementType(StatementType statementType)
public boolean isTransacted()
public void setTransacted(boolean transacted)
public MyBatisProcessingStrategy getProcessingStrategy()
public void setProcessingStrategy(MyBatisProcessingStrategy processingStrategy)
public int getMaxMessagesPerPoll()
public void setMaxMessagesPerPoll(int maxMessagesPerPoll)
public String getOnConsume()
public void setOnConsume(String onConsume)
public boolean isUseIterator()
public void setUseIterator(boolean useIterator)
public boolean isRouteEmptyResultSet()
public void setRouteEmptyResultSet(boolean routeEmptyResultSet)
Apache Camel