org.apache.camel.component.jdbc
Class JdbcEndpoint

java.lang.Object
  extended by org.apache.camel.support.ServiceSupport
      extended by org.apache.camel.impl.DefaultEndpoint
          extended by 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:

Field Summary
 
Fields inherited from class org.apache.camel.support.ServiceSupport
shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending
 
Constructor Summary
JdbcEndpoint()
           
JdbcEndpoint(String endpointUri, org.apache.camel.Component component, DataSource dataSource)
           
 
Method Summary
 org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor)
           
protected  String createEndpointUri()
           
 org.apache.camel.Producer createProducer()
           
 DataSource getDataSource()
           
 Map<String,Object> getParameters()
           
 int getReadSize()
           
 boolean isResetAutoCommit()
           
 boolean isSingleton()
           
 boolean isTransacted()
           
 boolean isUseJDBC4ColumnNameAndLabelSemantics()
           
 void setDataSource(DataSource dataSource)
           
 void setParameters(Map<String,Object> parameters)
          Optional parameters to the Statement.
 void setReadSize(int readSize)
           
 void setResetAutoCommit(boolean resetAutoCommit)
           
 void setTransacted(boolean transacted)
           
 void setUseJDBC4ColumnNameAndLabelSemantics(boolean useJDBC4ColumnNameAndLabelSemantics)
          Sets whether to use JDBC 4 or JDBC 3.0 or older semantic when retrieving column name.
 
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, isSuspended, isSuspending, resume, shutdown, start, stop, suspend
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.camel.Service
start, stop
 

Constructor Detail

JdbcEndpoint

public JdbcEndpoint()

JdbcEndpoint

public JdbcEndpoint(String endpointUri,
                    org.apache.camel.Component component,
                    DataSource dataSource)
Method Detail

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.

createEndpointUri

protected String createEndpointUri()
Overrides:
createEndpointUri in class org.apache.camel.impl.DefaultEndpoint


Apache CAMEL