Package org.apache.camel.component.sql
Interface SqlNamedProcessingStrategy
-
- All Superinterfaces:
SqlProcessingStrategy
public interface SqlNamedProcessingStrategy extends SqlProcessingStrategy
Extended processing strategy for dealing with SQL when consuming, which uses aNamedParameterJdbcTemplateinstead of plainJdbcTemplate.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intcommit(DefaultSqlEndpoint endpoint, org.apache.camel.Exchange exchange, Object data, org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate namedJdbcTemplate, org.springframework.jdbc.core.namedparam.SqlParameterSource parameterSource, String query)Commit callback if there are a query to be run after processing.intcommitBatchComplete(DefaultSqlEndpoint endpoint, org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate namedJdbcTemplate, org.springframework.jdbc.core.namedparam.SqlParameterSource parameterSource, String query)Commit callback when the batch is complete.-
Methods inherited from interface org.apache.camel.component.sql.SqlProcessingStrategy
commit, commitBatchComplete
-
-
-
-
Method Detail
-
commit
int commit(DefaultSqlEndpoint endpoint, org.apache.camel.Exchange exchange, Object data, org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate namedJdbcTemplate, org.springframework.jdbc.core.namedparam.SqlParameterSource parameterSource, String query) throws Exception
Commit callback if there are a query to be run after processing.- Parameters:
endpoint- the endpointexchange- The exchange after it has been processeddata- The original data delivered to the routenamedJdbcTemplate- The JDBC templateparameterSource- Parameter sources for the named JDBC templatequery- The SQL query to execute- Returns:
- the update count if the query returned an update count
- Throws:
Exception- can be thrown in case of error
-
commitBatchComplete
int commitBatchComplete(DefaultSqlEndpoint endpoint, org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate namedJdbcTemplate, org.springframework.jdbc.core.namedparam.SqlParameterSource parameterSource, String query) throws Exception
Commit callback when the batch is complete. This allows you to do one extra query after all rows has been processed in the batch.- Parameters:
endpoint- the endpointnamedJdbcTemplate- The JDBC templateparameterSource- Parameter sources for the named JDBC templatequery- The SQL query to execute- Returns:
- the update count if the query returned an update count
- Throws:
Exception- can be thrown in case of error
-
-