Class SqlEndpoint

  • All Implemented Interfaces:
    AutoCloseable, 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

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

      • SqlEndpoint

        public SqlEndpoint()
      • SqlEndpoint

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

      • 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.