Interface SqlEndpointBuilderFactory.AdvancedSqlEndpointConsumerBuilder

  • All Superinterfaces:
    org.apache.camel.builder.EndpointConsumerBuilder, org.apache.camel.EndpointConsumerResolver
    All Known Subinterfaces:
    SqlEndpointBuilderFactory.AdvancedSqlEndpointBuilder
    Enclosing interface:
    SqlEndpointBuilderFactory

    public static interface SqlEndpointBuilderFactory.AdvancedSqlEndpointConsumerBuilder
    extends org.apache.camel.builder.EndpointConsumerBuilder
    Advanced builder for endpoint consumers for the SQL component.
    • Method Detail

      • bridgeErrorHandler

        default SqlEndpointBuilderFactory.AdvancedSqlEndpointConsumerBuilder bridgeErrorHandler​(boolean bridgeErrorHandler)
        Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored. The option is a: <code>boolean</code> type. Default: false Group: consumer (advanced)
        Parameters:
        bridgeErrorHandler - the value to set
        Returns:
        the dsl builder
      • bridgeErrorHandler

        default SqlEndpointBuilderFactory.AdvancedSqlEndpointConsumerBuilder bridgeErrorHandler​(String bridgeErrorHandler)
        Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored. The option will be converted to a <code>boolean</code> type. Default: false Group: consumer (advanced)
        Parameters:
        bridgeErrorHandler - the value to set
        Returns:
        the dsl builder
      • exceptionHandler

        default SqlEndpointBuilderFactory.AdvancedSqlEndpointConsumerBuilder exceptionHandler​(org.apache.camel.spi.ExceptionHandler exceptionHandler)
        To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By default the consumer will deal with exceptions, that will be logged at WARN or ERROR level and ignored. The option is a: <code>org.apache.camel.spi.ExceptionHandler</code> type. Group: consumer (advanced)
        Parameters:
        exceptionHandler - the value to set
        Returns:
        the dsl builder
      • exceptionHandler

        default SqlEndpointBuilderFactory.AdvancedSqlEndpointConsumerBuilder exceptionHandler​(String exceptionHandler)
        To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By default the consumer will deal with exceptions, that will be logged at WARN or ERROR level and ignored. The option will be converted to a <code>org.apache.camel.spi.ExceptionHandler</code> type. Group: consumer (advanced)
        Parameters:
        exceptionHandler - the value to set
        Returns:
        the dsl builder
      • exchangePattern

        default SqlEndpointBuilderFactory.AdvancedSqlEndpointConsumerBuilder exchangePattern​(org.apache.camel.ExchangePattern exchangePattern)
        Sets the exchange pattern when the consumer creates an exchange. The option is a: <code>org.apache.camel.ExchangePattern</code> type. Group: consumer (advanced)
        Parameters:
        exchangePattern - the value to set
        Returns:
        the dsl builder
      • exchangePattern

        default SqlEndpointBuilderFactory.AdvancedSqlEndpointConsumerBuilder exchangePattern​(String exchangePattern)
        Sets the exchange pattern when the consumer creates an exchange. The option will be converted to a <code>org.apache.camel.ExchangePattern</code> type. Group: consumer (advanced)
        Parameters:
        exchangePattern - the value to set
        Returns:
        the dsl builder
      • pollStrategy

        default SqlEndpointBuilderFactory.AdvancedSqlEndpointConsumerBuilder pollStrategy​(org.apache.camel.spi.PollingConsumerPollStrategy pollStrategy)
        A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom implementation to control error handling usually occurred during the poll operation before an Exchange have been created and being routed in Camel. The option is a: <code>org.apache.camel.spi.PollingConsumerPollStrategy</code> type. Group: consumer (advanced)
        Parameters:
        pollStrategy - the value to set
        Returns:
        the dsl builder
      • pollStrategy

        default SqlEndpointBuilderFactory.AdvancedSqlEndpointConsumerBuilder pollStrategy​(String pollStrategy)
        A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom implementation to control error handling usually occurred during the poll operation before an Exchange have been created and being routed in Camel. The option will be converted to a <code>org.apache.camel.spi.PollingConsumerPollStrategy</code> type. Group: consumer (advanced)
        Parameters:
        pollStrategy - the value to set
        Returns:
        the dsl builder
      • processingStrategy

        default SqlEndpointBuilderFactory.AdvancedSqlEndpointConsumerBuilder processingStrategy​(org.apache.camel.component.sql.SqlProcessingStrategy processingStrategy)
        Allows to plugin to use a custom org.apache.camel.component.sql.SqlProcessingStrategy to execute queries when the consumer has processed the rows/batch. The option is a: <code>org.apache.camel.component.sql.SqlProcessingStrategy</code> type. Group: consumer (advanced)
        Parameters:
        processingStrategy - the value to set
        Returns:
        the dsl builder
      • processingStrategy

        default SqlEndpointBuilderFactory.AdvancedSqlEndpointConsumerBuilder processingStrategy​(String processingStrategy)
        Allows to plugin to use a custom org.apache.camel.component.sql.SqlProcessingStrategy to execute queries when the consumer has processed the rows/batch. The option will be converted to a <code>org.apache.camel.component.sql.SqlProcessingStrategy</code> type. Group: consumer (advanced)
        Parameters:
        processingStrategy - the value to set
        Returns:
        the dsl builder
      • alwaysPopulateStatement

        default SqlEndpointBuilderFactory.AdvancedSqlEndpointConsumerBuilder alwaysPopulateStatement​(boolean alwaysPopulateStatement)
        If enabled then the populateStatement method from org.apache.camel.component.sql.SqlPrepareStatementStrategy is always invoked, also if there is no expected parameters to be prepared. When this is false then the populateStatement is only invoked if there is 1 or more expected parameters to be set; for example this avoids reading the message body/headers for SQL queries with no parameters. The option is a: <code>boolean</code> type. Default: false Group: advanced
        Parameters:
        alwaysPopulateStatement - the value to set
        Returns:
        the dsl builder
      • alwaysPopulateStatement

        default SqlEndpointBuilderFactory.AdvancedSqlEndpointConsumerBuilder alwaysPopulateStatement​(String alwaysPopulateStatement)
        If enabled then the populateStatement method from org.apache.camel.component.sql.SqlPrepareStatementStrategy is always invoked, also if there is no expected parameters to be prepared. When this is false then the populateStatement is only invoked if there is 1 or more expected parameters to be set; for example this avoids reading the message body/headers for SQL queries with no parameters. The option will be converted to a <code>boolean</code> type. Default: false Group: advanced
        Parameters:
        alwaysPopulateStatement - the value to set
        Returns:
        the dsl builder
      • parametersCount

        default SqlEndpointBuilderFactory.AdvancedSqlEndpointConsumerBuilder parametersCount​(int parametersCount)
        If set greater than zero, then Camel will use this count value of parameters to replace instead of querying via JDBC metadata API. This is useful if the JDBC vendor could not return correct parameters count, then user may override instead. The option is a: <code>int</code> type. Group: advanced
        Parameters:
        parametersCount - the value to set
        Returns:
        the dsl builder
      • parametersCount

        default SqlEndpointBuilderFactory.AdvancedSqlEndpointConsumerBuilder parametersCount​(String parametersCount)
        If set greater than zero, then Camel will use this count value of parameters to replace instead of querying via JDBC metadata API. This is useful if the JDBC vendor could not return correct parameters count, then user may override instead. The option will be converted to a <code>int</code> type. Group: advanced
        Parameters:
        parametersCount - the value to set
        Returns:
        the dsl builder
      • placeholder

        default SqlEndpointBuilderFactory.AdvancedSqlEndpointConsumerBuilder placeholder​(String placeholder)
        Specifies a character that will be replaced to in SQL query. Notice, that it is simple String.replaceAll() operation and no SQL parsing is involved (quoted strings will also change). The option is a: <code>java.lang.String</code> type. Default: # Group: advanced
        Parameters:
        placeholder - the value to set
        Returns:
        the dsl builder
      • prepareStatementStrategy

        default SqlEndpointBuilderFactory.AdvancedSqlEndpointConsumerBuilder prepareStatementStrategy​(org.apache.camel.component.sql.SqlPrepareStatementStrategy prepareStatementStrategy)
        Allows to plugin to use a custom org.apache.camel.component.sql.SqlPrepareStatementStrategy to control preparation of the query and prepared statement. The option is a: <code>org.apache.camel.component.sql.SqlPrepareStatementStrategy</code> type. Group: advanced
        Parameters:
        prepareStatementStrategy - the value to set
        Returns:
        the dsl builder
      • prepareStatementStrategy

        default SqlEndpointBuilderFactory.AdvancedSqlEndpointConsumerBuilder prepareStatementStrategy​(String prepareStatementStrategy)
        Allows to plugin to use a custom org.apache.camel.component.sql.SqlPrepareStatementStrategy to control preparation of the query and prepared statement. The option will be converted to a <code>org.apache.camel.component.sql.SqlPrepareStatementStrategy</code> type. Group: advanced
        Parameters:
        prepareStatementStrategy - the value to set
        Returns:
        the dsl builder
      • templateOptions

        default SqlEndpointBuilderFactory.AdvancedSqlEndpointConsumerBuilder templateOptions​(String key,
                                                                                             Object value)
        Configures the Spring JdbcTemplate with the key/values from the Map. The option is a: <code>java.util.Map&lt;java.lang.String, java.lang.Object&gt;</code> type. The option is multivalued, and you can use the templateOptions(String, Object) method to add a value (call the method multiple times to set more values). Group: advanced
        Parameters:
        key - the option key
        value - the option value
        Returns:
        the dsl builder
      • templateOptions

        default SqlEndpointBuilderFactory.AdvancedSqlEndpointConsumerBuilder templateOptions​(Map values)
        Configures the Spring JdbcTemplate with the key/values from the Map. The option is a: <code>java.util.Map&lt;java.lang.String, java.lang.Object&gt;</code> type. The option is multivalued, and you can use the templateOptions(String, Object) method to add a value (call the method multiple times to set more values). Group: advanced
        Parameters:
        values - the values
        Returns:
        the dsl builder
      • usePlaceholder

        default SqlEndpointBuilderFactory.AdvancedSqlEndpointConsumerBuilder usePlaceholder​(boolean usePlaceholder)
        Sets whether to use placeholder and replace all placeholder characters with sign in the SQL queries. The option is a: <code>boolean</code> type. Default: true Group: advanced
        Parameters:
        usePlaceholder - the value to set
        Returns:
        the dsl builder
      • usePlaceholder

        default SqlEndpointBuilderFactory.AdvancedSqlEndpointConsumerBuilder usePlaceholder​(String usePlaceholder)
        Sets whether to use placeholder and replace all placeholder characters with sign in the SQL queries. The option will be converted to a <code>boolean</code> type. Default: true Group: advanced
        Parameters:
        usePlaceholder - the value to set
        Returns:
        the dsl builder