org.apache.camel.component.jdbc
Class JdbcEndpoint

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

public class JdbcEndpoint
extends org.apache.camel.impl.DefaultEndpoint

Version:

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 isSingleton()
           
 boolean isUseJDBC4ColumnNameAndLabelSemantics()
           
 void setDataSource(DataSource dataSource)
           
 void setParameters(Map<String,Object> parameters)
          Optional parameters to the Statement.
 void setReadSize(int readSize)
           
 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
configureProperties, createExchange, createExchange, createExchange, createPollingConsumer, doStart, doStop, equals, getCamelContext, getComponent, getEndpointKey, getEndpointUri, getExchangePattern, getExchangeType, getId, hashCode, isLenientProperties, isSynchronous, sanitizeUri, setCamelContext, setEndpointUri, setEndpointUriIfNotSpecified, setExchangePattern, setSynchronous, toString
 
Methods inherited from class org.apache.camel.impl.ServiceSupport
addChildService, doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspended, isSuspending, removeChildService, resume, shutdown, start, 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)

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