Interface SqlEndpointBuilderFactory.SqlEndpointProducerBuilder
- All Superinterfaces:
org.apache.camel.builder.EndpointProducerBuilder
,org.apache.camel.EndpointProducerResolver
- All Known Subinterfaces:
SqlEndpointBuilderFactory.SqlEndpointBuilder
- Enclosing interface:
- SqlEndpointBuilderFactory
public static interface SqlEndpointBuilderFactory.SqlEndpointProducerBuilder
extends org.apache.camel.builder.EndpointProducerBuilder
Builder for endpoint producers for the SQL component.
-
Method Summary
Modifier and TypeMethodDescriptionadvanced()
allowNamedParameters
(boolean allowNamedParameters) Whether to allow using named parameters in the queries.allowNamedParameters
(String allowNamedParameters) Whether to allow using named parameters in the queries.batch
(boolean batch) Enables or disables batch mode.Enables or disables batch mode.dataSource
(String dataSource) Sets the DataSource to use to communicate with the database at endpoint level.dataSource
(DataSource dataSource) Sets the DataSource to use to communicate with the database at endpoint level.noop
(boolean noop) If set, will ignore the results of the SQL query and use the existing IN message as the OUT message for the continuation of processing.If set, will ignore the results of the SQL query and use the existing IN message as the OUT message for the continuation of processing.outputClass
(String outputClass) Specify the full package and class name to use as conversion when outputType=SelectOne.outputHeader
(String outputHeader) Store the query result in a header instead of the message body.outputType
(String outputType) Make the output of consumer or producer to SelectList as List of Map, or SelectOne as single Java object in the following way: a) If the query has only single column, then that JDBC Column object is returned.outputType
(org.apache.camel.component.sql.SqlOutputType outputType) Make the output of consumer or producer to SelectList as List of Map, or SelectOne as single Java object in the following way: a) If the query has only single column, then that JDBC Column object is returned.separator
(char separator) The separator to use when parameter values is taken from message body (if the body is a String type), to be inserted at # placeholders.The separator to use when parameter values is taken from message body (if the body is a String type), to be inserted at # placeholders.useMessageBodyForSql
(boolean useMessageBodyForSql) Whether to use the message body as the SQL and then headers for parameters.useMessageBodyForSql
(String useMessageBodyForSql) Whether to use the message body as the SQL and then headers for parameters.Methods inherited from interface org.apache.camel.builder.EndpointProducerBuilder
doSetMultiValueProperties, doSetMultiValueProperty, doSetProperty, expr, getRawUri, getUri
Methods inherited from interface org.apache.camel.EndpointProducerResolver
resolve, resolve
-
Method Details
-
advanced
-
allowNamedParameters
default SqlEndpointBuilderFactory.SqlEndpointProducerBuilder allowNamedParameters(boolean allowNamedParameters) Whether to allow using named parameters in the queries. The option is a: <code>boolean</code> type. Default: true Group: common- Parameters:
allowNamedParameters
- the value to set- Returns:
- the dsl builder
-
allowNamedParameters
default SqlEndpointBuilderFactory.SqlEndpointProducerBuilder allowNamedParameters(String allowNamedParameters) Whether to allow using named parameters in the queries. The option will be converted to a <code>boolean</code> type. Default: true Group: common- Parameters:
allowNamedParameters
- the value to set- Returns:
- the dsl builder
-
dataSource
Sets the DataSource to use to communicate with the database at endpoint level. The option is a: <code>javax.sql.DataSource</code> type. Group: common- Parameters:
dataSource
- the value to set- Returns:
- the dsl builder
-
dataSource
Sets the DataSource to use to communicate with the database at endpoint level. The option will be converted to a <code>javax.sql.DataSource</code> type. Group: common- Parameters:
dataSource
- the value to set- Returns:
- the dsl builder
-
outputClass
Specify the full package and class name to use as conversion when outputType=SelectOne. The option is a: <code>java.lang.String</code> type. Group: common- Parameters:
outputClass
- the value to set- Returns:
- the dsl builder
-
outputHeader
Store the query result in a header instead of the message body. By default, outputHeader == null and the query result is stored in the message body, any existing content in the message body is discarded. If outputHeader is set, the value is used as the name of the header to store the query result and the original message body is preserved. The option is a: <code>java.lang.String</code> type. Group: common- Parameters:
outputHeader
- the value to set- Returns:
- the dsl builder
-
outputType
default SqlEndpointBuilderFactory.SqlEndpointProducerBuilder outputType(org.apache.camel.component.sql.SqlOutputType outputType) Make the output of consumer or producer to SelectList as List of Map, or SelectOne as single Java object in the following way: a) If the query has only single column, then that JDBC Column object is returned. (such as SELECT COUNT( ) FROM PROJECT will return a Long object. b) If the query has more than one column, then it will return a Map of that result. c) If the outputClass is set, then it will convert the query result into an Java bean object by calling all the setters that match the column names. It will assume your class has a default constructor to create instance with. d) If the query resulted in more than one rows, it throws an non-unique result exception. StreamList streams the result of the query using an Iterator. This can be used with the Splitter EIP in streaming mode to process the ResultSet in streaming fashion. The option is a: <code>org.apache.camel.component.sql.SqlOutputType</code> type. Default: SelectList Group: common- Parameters:
outputType
- the value to set- Returns:
- the dsl builder
-
outputType
Make the output of consumer or producer to SelectList as List of Map, or SelectOne as single Java object in the following way: a) If the query has only single column, then that JDBC Column object is returned. (such as SELECT COUNT( ) FROM PROJECT will return a Long object. b) If the query has more than one column, then it will return a Map of that result. c) If the outputClass is set, then it will convert the query result into an Java bean object by calling all the setters that match the column names. It will assume your class has a default constructor to create instance with. d) If the query resulted in more than one rows, it throws an non-unique result exception. StreamList streams the result of the query using an Iterator. This can be used with the Splitter EIP in streaming mode to process the ResultSet in streaming fashion. The option will be converted to a <code>org.apache.camel.component.sql.SqlOutputType</code> type. Default: SelectList Group: common- Parameters:
outputType
- the value to set- Returns:
- the dsl builder
-
separator
The separator to use when parameter values is taken from message body (if the body is a String type), to be inserted at # placeholders. Notice if you use named parameters, then a Map type is used instead. The default value is comma. The option is a: <code>char</code> type. Default: , Group: common- Parameters:
separator
- the value to set- Returns:
- the dsl builder
-
separator
The separator to use when parameter values is taken from message body (if the body is a String type), to be inserted at # placeholders. Notice if you use named parameters, then a Map type is used instead. The default value is comma. The option will be converted to a <code>char</code> type. Default: , Group: common- Parameters:
separator
- the value to set- Returns:
- the dsl builder
-
batch
Enables or disables batch mode. The option is a: <code>boolean</code> type. Default: false Group: producer- Parameters:
batch
- the value to set- Returns:
- the dsl builder
-
batch
Enables or disables batch mode. The option will be converted to a <code>boolean</code> type. Default: false Group: producer- Parameters:
batch
- the value to set- Returns:
- the dsl builder
-
noop
If set, will ignore the results of the SQL query and use the existing IN message as the OUT message for the continuation of processing. The option is a: <code>boolean</code> type. Default: false Group: producer- Parameters:
noop
- the value to set- Returns:
- the dsl builder
-
noop
If set, will ignore the results of the SQL query and use the existing IN message as the OUT message for the continuation of processing. The option will be converted to a <code>boolean</code> type. Default: false Group: producer- Parameters:
noop
- the value to set- Returns:
- the dsl builder
-
useMessageBodyForSql
default SqlEndpointBuilderFactory.SqlEndpointProducerBuilder useMessageBodyForSql(boolean useMessageBodyForSql) Whether to use the message body as the SQL and then headers for parameters. If this option is enabled then the SQL in the uri is not used. Note that query parameters in the message body are represented by a question mark instead of a # symbol. The option is a: <code>boolean</code> type. Default: false Group: producer- Parameters:
useMessageBodyForSql
- the value to set- Returns:
- the dsl builder
-
useMessageBodyForSql
default SqlEndpointBuilderFactory.SqlEndpointProducerBuilder useMessageBodyForSql(String useMessageBodyForSql) Whether to use the message body as the SQL and then headers for parameters. If this option is enabled then the SQL in the uri is not used. Note that query parameters in the message body are represented by a question mark instead of a # symbol. The option will be converted to a <code>boolean</code> type. Default: false Group: producer- Parameters:
useMessageBodyForSql
- the value to set- Returns:
- the dsl builder
-