Interface SqlEndpointBuilderFactory.AdvancedSqlEndpointBuilder
- All Superinterfaces:
org.apache.camel.builder.EndpointConsumerBuilder,org.apache.camel.EndpointConsumerResolver,org.apache.camel.builder.EndpointProducerBuilder,org.apache.camel.EndpointProducerResolver,SqlEndpointBuilderFactory.AdvancedSqlEndpointConsumerBuilder,SqlEndpointBuilderFactory.AdvancedSqlEndpointProducerBuilder
- Enclosing interface:
SqlEndpointBuilderFactory
public static interface SqlEndpointBuilderFactory.AdvancedSqlEndpointBuilder
extends SqlEndpointBuilderFactory.AdvancedSqlEndpointConsumerBuilder, SqlEndpointBuilderFactory.AdvancedSqlEndpointProducerBuilder
Advanced builder for endpoint for the SQL component.
-
Method Summary
Modifier and TypeMethodDescriptionalwaysPopulateStatement(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.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.basic()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.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.placeholder(String placeholder) Specifies a character that will be replaced to in SQL query.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.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.rowMapperFactory(String rowMapperFactory) Factory for creating RowMapper.rowMapperFactory(org.apache.camel.component.sql.RowMapperFactory rowMapperFactory) Factory for creating RowMapper.templateOptions(String key, Object value) Configures the Spring JdbcTemplate with the key/values from the Map.templateOptions(Map values) Configures the Spring JdbcTemplate with the key/values from the Map.usePlaceholder(boolean usePlaceholder) Sets whether to use placeholder and replace all placeholder characters with sign in the SQL queries.usePlaceholder(String usePlaceholder) Sets whether to use placeholder and replace all placeholder characters with sign in the SQL queries.Methods inherited from interface org.apache.camel.builder.EndpointConsumerBuilder
doSetMultiValueProperties, doSetMultiValueProperty, doSetProperty, expr, getRawUri, getUriMethods inherited from interface org.apache.camel.EndpointConsumerResolver
resolve, resolveMethods inherited from interface org.apache.camel.builder.EndpointProducerBuilder
doSetMultiValueProperties, doSetMultiValueProperty, doSetProperty, expr, getRawUri, getUriMethods inherited from interface org.apache.camel.EndpointProducerResolver
resolve, resolveMethods inherited from interface org.apache.camel.builder.endpoint.dsl.SqlEndpointBuilderFactory.AdvancedSqlEndpointConsumerBuilder
bridgeErrorHandler, bridgeErrorHandler, exceptionHandler, exceptionHandler, exchangePattern, exchangePattern, pollStrategy, pollStrategy, processingStrategy, processingStrategyMethods inherited from interface org.apache.camel.builder.endpoint.dsl.SqlEndpointBuilderFactory.AdvancedSqlEndpointProducerBuilder
lazyStartProducer, lazyStartProducer
-
Method Details
-
basic
- Specified by:
basicin interfaceSqlEndpointBuilderFactory.AdvancedSqlEndpointConsumerBuilder- Specified by:
basicin interfaceSqlEndpointBuilderFactory.AdvancedSqlEndpointProducerBuilder
-
alwaysPopulateStatement
default SqlEndpointBuilderFactory.AdvancedSqlEndpointBuilder 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- Specified by:
alwaysPopulateStatementin interfaceSqlEndpointBuilderFactory.AdvancedSqlEndpointConsumerBuilder- Specified by:
alwaysPopulateStatementin interfaceSqlEndpointBuilderFactory.AdvancedSqlEndpointProducerBuilder- Parameters:
alwaysPopulateStatement- the value to set- Returns:
- the dsl builder
-
alwaysPopulateStatement
default SqlEndpointBuilderFactory.AdvancedSqlEndpointBuilder 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- Specified by:
alwaysPopulateStatementin interfaceSqlEndpointBuilderFactory.AdvancedSqlEndpointConsumerBuilder- Specified by:
alwaysPopulateStatementin interfaceSqlEndpointBuilderFactory.AdvancedSqlEndpointProducerBuilder- Parameters:
alwaysPopulateStatement- the value to set- Returns:
- the dsl builder
-
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- Specified by:
parametersCountin interfaceSqlEndpointBuilderFactory.AdvancedSqlEndpointConsumerBuilder- Specified by:
parametersCountin interfaceSqlEndpointBuilderFactory.AdvancedSqlEndpointProducerBuilder- Parameters:
parametersCount- the value to set- Returns:
- the dsl builder
-
parametersCount
default SqlEndpointBuilderFactory.AdvancedSqlEndpointBuilder 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- Specified by:
parametersCountin interfaceSqlEndpointBuilderFactory.AdvancedSqlEndpointConsumerBuilder- Specified by:
parametersCountin interfaceSqlEndpointBuilderFactory.AdvancedSqlEndpointProducerBuilder- Parameters:
parametersCount- the value to set- Returns:
- the dsl builder
-
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- Specified by:
placeholderin interfaceSqlEndpointBuilderFactory.AdvancedSqlEndpointConsumerBuilder- Specified by:
placeholderin interfaceSqlEndpointBuilderFactory.AdvancedSqlEndpointProducerBuilder- Parameters:
placeholder- the value to set- Returns:
- the dsl builder
-
prepareStatementStrategy
default SqlEndpointBuilderFactory.AdvancedSqlEndpointBuilder 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- Specified by:
prepareStatementStrategyin interfaceSqlEndpointBuilderFactory.AdvancedSqlEndpointConsumerBuilder- Specified by:
prepareStatementStrategyin interfaceSqlEndpointBuilderFactory.AdvancedSqlEndpointProducerBuilder- Parameters:
prepareStatementStrategy- the value to set- Returns:
- the dsl builder
-
prepareStatementStrategy
default SqlEndpointBuilderFactory.AdvancedSqlEndpointBuilder 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- Specified by:
prepareStatementStrategyin interfaceSqlEndpointBuilderFactory.AdvancedSqlEndpointConsumerBuilder- Specified by:
prepareStatementStrategyin interfaceSqlEndpointBuilderFactory.AdvancedSqlEndpointProducerBuilder- Parameters:
prepareStatementStrategy- the value to set- Returns:
- the dsl builder
-
rowMapperFactory
default SqlEndpointBuilderFactory.AdvancedSqlEndpointBuilder rowMapperFactory(org.apache.camel.component.sql.RowMapperFactory rowMapperFactory) Factory for creating RowMapper. The option is a: <code>org.apache.camel.component.sql.RowMapperFactory</code> type. Group: advanced- Specified by:
rowMapperFactoryin interfaceSqlEndpointBuilderFactory.AdvancedSqlEndpointConsumerBuilder- Specified by:
rowMapperFactoryin interfaceSqlEndpointBuilderFactory.AdvancedSqlEndpointProducerBuilder- Parameters:
rowMapperFactory- the value to set- Returns:
- the dsl builder
-
rowMapperFactory
default SqlEndpointBuilderFactory.AdvancedSqlEndpointBuilder rowMapperFactory(String rowMapperFactory) Factory for creating RowMapper. The option will be converted to a <code>org.apache.camel.component.sql.RowMapperFactory</code> type. Group: advanced- Specified by:
rowMapperFactoryin interfaceSqlEndpointBuilderFactory.AdvancedSqlEndpointConsumerBuilder- Specified by:
rowMapperFactoryin interfaceSqlEndpointBuilderFactory.AdvancedSqlEndpointProducerBuilder- Parameters:
rowMapperFactory- the value to set- Returns:
- the dsl builder
-
templateOptions
default SqlEndpointBuilderFactory.AdvancedSqlEndpointBuilder templateOptions(String key, Object value) Configures the Spring JdbcTemplate with the key/values from the Map. The option is a: <code>java.util.Map<java.lang.String, java.lang.Object></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- Specified by:
templateOptionsin interfaceSqlEndpointBuilderFactory.AdvancedSqlEndpointConsumerBuilder- Specified by:
templateOptionsin interfaceSqlEndpointBuilderFactory.AdvancedSqlEndpointProducerBuilder- Parameters:
key- the option keyvalue- the option value- Returns:
- the dsl builder
-
templateOptions
Configures the Spring JdbcTemplate with the key/values from the Map. The option is a: <code>java.util.Map<java.lang.String, java.lang.Object></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- Specified by:
templateOptionsin interfaceSqlEndpointBuilderFactory.AdvancedSqlEndpointConsumerBuilder- Specified by:
templateOptionsin interfaceSqlEndpointBuilderFactory.AdvancedSqlEndpointProducerBuilder- Parameters:
values- the values- Returns:
- the dsl builder
-
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- Specified by:
usePlaceholderin interfaceSqlEndpointBuilderFactory.AdvancedSqlEndpointConsumerBuilder- Specified by:
usePlaceholderin interfaceSqlEndpointBuilderFactory.AdvancedSqlEndpointProducerBuilder- Parameters:
usePlaceholder- the value to set- Returns:
- the dsl builder
-
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- Specified by:
usePlaceholderin interfaceSqlEndpointBuilderFactory.AdvancedSqlEndpointConsumerBuilder- Specified by:
usePlaceholderin interfaceSqlEndpointBuilderFactory.AdvancedSqlEndpointProducerBuilder- Parameters:
usePlaceholder- the value to set- Returns:
- the dsl builder
-