@UriEndpoint(scheme="mybatis", title="MyBatis", syntax="mybatis:statement", consumerClass=MyBatisConsumer.class, label="database,sql") public class MyBatisEndpoint extends org.apache.camel.impl.DefaultPollingEndpoint
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() |
MyBatisComponent |
getComponent() |
org.apache.ibatis.session.ExecutorType |
getExecutorType() |
String |
getInputHeader() |
int |
getMaxMessagesPerPoll() |
String |
getOnConsume() |
String |
getOutputHeader() |
MyBatisProcessingStrategy |
getProcessingStrategy() |
org.apache.ibatis.session.SqlSessionFactory |
getSqlSessionFactory() |
String |
getStatement() |
StatementType |
getStatementType() |
boolean |
isRouteEmptyResultSet() |
boolean |
isSingleton() |
boolean |
isTransacted() |
boolean |
isUseIterator() |
void |
setExecutorType(org.apache.ibatis.session.ExecutorType executorType)
The executor type to be used while executing statements.
|
void |
setExecutorType(String executorType) |
void |
setInputHeader(String inputHeader)
User the header value for input parameters instead of the message body.
|
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 |
setOutputHeader(String outputHeader)
Store the query result in a header instead of the message body.
|
void |
setProcessingStrategy(MyBatisProcessingStrategy processingStrategy) |
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
|
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 boolean isSingleton()
public MyBatisComponent getComponent()
getComponent
in class org.apache.camel.impl.DefaultEndpoint
public org.apache.ibatis.session.SqlSessionFactory getSqlSessionFactory() throws IOException
IOException
public String getStatement()
public void setStatement(String statement)
public StatementType getStatementType()
public void setStatementType(StatementType statementType)
public org.apache.ibatis.session.ExecutorType getExecutorType()
public void setExecutorType(org.apache.ibatis.session.ExecutorType executorType)
public void setExecutorType(String executorType)
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 getOutputHeader()
public void setOutputHeader(String outputHeader)
public String getInputHeader()
public void setInputHeader(String inputHeader)
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