Class SqlEndpoint

java.lang.Object
org.apache.camel.support.service.BaseService
org.apache.camel.support.service.ServiceSupport
org.apache.camel.support.DefaultEndpoint
org.apache.camel.support.ScheduledPollEndpoint
org.apache.camel.support.DefaultPollingEndpoint
org.apache.camel.component.sql.DefaultSqlEndpoint
org.apache.camel.component.sql.SqlEndpoint
All Implemented Interfaces:
AutoCloseable, org.apache.camel.CamelContextAware, org.apache.camel.ComponentAware, org.apache.camel.Endpoint, org.apache.camel.IsSingleton, org.apache.camel.Service, org.apache.camel.ShutdownableService, org.apache.camel.spi.HasCamelContext, org.apache.camel.spi.HasId, org.apache.camel.StatefulService, org.apache.camel.SuspendableService

@UriEndpoint(firstVersion="1.4.0", scheme="sql", title="SQL", syntax="sql:query", category=DATABASE, headersClass=SqlConstants.class) public class SqlEndpoint extends DefaultSqlEndpoint
Perform SQL queries using Spring JDBC.
  • Constructor Details

    • SqlEndpoint

      public SqlEndpoint()
    • SqlEndpoint

      public SqlEndpoint(String endpointUri, org.apache.camel.Component component)
  • Method Details

    • createConsumer

      public org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor) throws Exception
      Specified by:
      createConsumer in interface org.apache.camel.Endpoint
      Overrides:
      createConsumer in class org.apache.camel.support.DefaultPollingEndpoint
      Throws:
      Exception
    • createProducer

      public org.apache.camel.Producer createProducer() throws Exception
      Throws:
      Exception
    • createEndpointUri

      protected String createEndpointUri()
      Overrides:
      createEndpointUri in class org.apache.camel.support.DefaultEndpoint
    • getQuery

      public String getQuery()
    • setQuery

      public void setQuery(String query)
      Sets the SQL query to perform. You can externalize the query by using file: or classpath: as prefix and specify the location of the file.