public class IBatisComponent
extends org.apache.camel.impl.UriEndpointComponent
Ibatis Component used to read/write to a database. Requires one of the following: 1. A Sql Map config file either on the root of the classpath or explicitly set. OR 2. A SqlMapClient explicit set. Using Ibatis as a source of data (<from>) you can use this component to treat a database table as a logical queue. Details are available in theIBatisConsumer
Using Ibatis as a destination for data (<to>) you can use this component to run an insert statement either on a single message or if the delivered content contains a collection of messages it can iterate through the collection and run the insert on each element. Details are available in theIBatisProducer
IBatisProducer
,
IBatisConsumer
Constructor and Description |
---|
IBatisComponent() |
IBatisComponent(com.ibatis.sqlmap.client.SqlMapClient sqlMapClient) |
Modifier and Type | Method and Description |
---|---|
protected IBatisEndpoint |
createEndpoint(String uri,
String remaining,
Map<String,Object> parameters) |
protected com.ibatis.sqlmap.client.SqlMapClient |
createSqlMapClient() |
protected void |
doStart() |
protected void |
doStop() |
com.ibatis.sqlmap.client.SqlMapClient |
getSqlMapClient() |
String |
getSqlMapConfig() |
boolean |
isUseTransactions() |
void |
setSqlMapClient(com.ibatis.sqlmap.client.SqlMapClient sqlMapClient)
To use the given
SqlMapClient |
void |
setSqlMapConfig(String sqlMapConfig)
Location of iBatis xml configuration file.
|
void |
setUseTransactions(boolean useTransactions)
Whether to use transactions.
|
createComponentConfiguration, createParameterConfigurationMap, getEndpointClass, getParameterConfigurationMap, populateParameterConfigurationMap, setEndpointClass
afterConfiguration, createConfiguration, createEndpoint, getAndRemoveOrResolveReferenceParameter, getAndRemoveOrResolveReferenceParameter, getAndRemoveParameter, getAndRemoveParameter, getCamelContext, ifStartsWithReturnRemainder, preProcessUri, resolveAndRemoveReferenceListParameter, resolveAndRemoveReferenceListParameter, resolveAndRemoveReferenceParameter, resolveAndRemoveReferenceParameter, setCamelContext, setProperties, setProperties, useIntrospectionOnEndpoint, useRawUri, validateParameters, validateURI
public IBatisComponent()
public IBatisComponent(com.ibatis.sqlmap.client.SqlMapClient sqlMapClient)
protected IBatisEndpoint createEndpoint(String uri, String remaining, Map<String,Object> parameters) throws Exception
createEndpoint
in class org.apache.camel.impl.DefaultComponent
Exception
protected com.ibatis.sqlmap.client.SqlMapClient createSqlMapClient() throws IOException
IOException
public com.ibatis.sqlmap.client.SqlMapClient getSqlMapClient()
public void setSqlMapClient(com.ibatis.sqlmap.client.SqlMapClient sqlMapClient)
SqlMapClient
public String getSqlMapConfig()
public void setSqlMapConfig(String sqlMapConfig)
public boolean isUseTransactions()
public void setUseTransactions(boolean useTransactions)
protected void doStart() throws Exception
doStart
in class org.apache.camel.impl.DefaultComponent
Exception
Apache Camel