org.apache.camel.component.jdbc
Class JdbcEndpoint
java.lang.Object
org.apache.camel.support.ServiceSupport
org.apache.camel.impl.DefaultEndpoint
org.apache.camel.component.jdbc.JdbcEndpoint
- All Implemented Interfaces:
- org.apache.camel.CamelContextAware, org.apache.camel.Endpoint, org.apache.camel.IsSingleton, org.apache.camel.Service, org.apache.camel.ShutdownableService, org.apache.camel.spi.HasId, org.apache.camel.StatefulService, org.apache.camel.SuspendableService
public class JdbcEndpoint
- extends org.apache.camel.impl.DefaultEndpoint
- Version:
| Fields inherited from class org.apache.camel.support.ServiceSupport |
shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending |
| Methods inherited from class org.apache.camel.impl.DefaultEndpoint |
configureConsumer, configureProperties, createEndpointConfiguration, createExchange, createExchange, createExchange, createPollingConsumer, doStart, doStop, equals, getCamelContext, getComponent, getConsumerProperties, getEndpointConfiguration, getEndpointKey, getEndpointUri, getExchangePattern, getId, hashCode, isLenientProperties, isSynchronous, setCamelContext, setConsumerProperties, setEndpointConfiguration, setEndpointUri, setEndpointUriIfNotSpecified, setExchangePattern, setSynchronous, toString |
| Methods inherited from class org.apache.camel.support.ServiceSupport |
doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, resume, shutdown, start, stop, suspend |
| Methods inherited from interface org.apache.camel.Service |
start, stop |
JdbcEndpoint
public JdbcEndpoint()
JdbcEndpoint
public JdbcEndpoint(String endpointUri,
org.apache.camel.Component component,
DataSource dataSource)
isSingleton
public boolean isSingleton()
createConsumer
public org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor)
throws Exception
- Throws:
Exception
createProducer
public org.apache.camel.Producer createProducer()
throws Exception
- Throws:
Exception
getReadSize
public int getReadSize()
setReadSize
public void setReadSize(int readSize)
isTransacted
public boolean isTransacted()
setTransacted
public void setTransacted(boolean transacted)
isResetAutoCommit
public boolean isResetAutoCommit()
setResetAutoCommit
public void setResetAutoCommit(boolean resetAutoCommit)
getDataSource
public DataSource getDataSource()
setDataSource
public void setDataSource(DataSource dataSource)
getParameters
public Map<String,Object> getParameters()
setParameters
public void setParameters(Map<String,Object> parameters)
- Optional parameters to the
Statement.
For example to set maxRows, fetchSize etc.
- Parameters:
parameters - parameters which will be set using reflection
isUseJDBC4ColumnNameAndLabelSemantics
public boolean isUseJDBC4ColumnNameAndLabelSemantics()
setUseJDBC4ColumnNameAndLabelSemantics
public void setUseJDBC4ColumnNameAndLabelSemantics(boolean useJDBC4ColumnNameAndLabelSemantics)
- Sets whether to use JDBC 4 or JDBC 3.0 or older semantic when retrieving column name.
JDBC 4.0 uses columnLabel to get the column name where as JDBC 3.0 uses both columnName or columnLabel.
Unfortunately JDBC drivers behave differently so you can use this option to work out issues around your
JDBC driver if you get problem using this component
This option is default true.
- Parameters:
useJDBC4ColumnNameAndLabelSemantics - true to use JDBC 4.0 semantics, false to use JDBC 3.0.
getPrepareStatementStrategy
public JdbcPrepareStatementStrategy getPrepareStatementStrategy()
setPrepareStatementStrategy
public void setPrepareStatementStrategy(JdbcPrepareStatementStrategy prepareStatementStrategy)
isAllowNamedParameters
public boolean isAllowNamedParameters()
setAllowNamedParameters
public void setAllowNamedParameters(boolean allowNamedParameters)
isUseHeadersAsParameters
public boolean isUseHeadersAsParameters()
setUseHeadersAsParameters
public void setUseHeadersAsParameters(boolean useHeadersAsParameters)
createEndpointUri
protected String createEndpointUri()
- Overrides:
createEndpointUri in class org.apache.camel.impl.DefaultEndpoint
Apache Camel