Interface SqlProcessingStrategy

All Known Subinterfaces:
SqlNamedProcessingStrategy
All Known Implementing Classes:
DefaultSqlProcessingStrategy

public interface SqlProcessingStrategy
Processing strategy for dealing with SQL when consuming.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    commit(DefaultSqlEndpoint endpoint, org.apache.camel.Exchange exchange, Object data, org.springframework.jdbc.core.JdbcTemplate jdbcTemplate, String query)
    Commit callback if there are a query to be run after processing.
    int
    commitBatchComplete(DefaultSqlEndpoint endpoint, org.springframework.jdbc.core.JdbcTemplate jdbcTemplate, String query)
    Commit callback when the batch is complete.
  • Method Details

    • commit

      int commit(DefaultSqlEndpoint endpoint, org.apache.camel.Exchange exchange, Object data, org.springframework.jdbc.core.JdbcTemplate jdbcTemplate, String query) throws Exception
      Commit callback if there are a query to be run after processing.
      Parameters:
      endpoint - the endpoint
      exchange - The exchange after it has been processed
      data - The original data delivered to the route
      jdbcTemplate - The JDBC template
      query - 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.JdbcTemplate jdbcTemplate, 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 endpoint
      jdbcTemplate - The JDBC template
      query - 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