Class DefaultSqlProcessingStrategy

java.lang.Object
org.apache.camel.component.sql.DefaultSqlProcessingStrategy
All Implemented Interfaces:
SqlProcessingStrategy

public class DefaultSqlProcessingStrategy extends Object implements SqlProcessingStrategy
  • Constructor Details

  • Method Details

    • commit

      public int commit(DefaultSqlEndpoint endpoint, org.apache.camel.Exchange exchange, Object data, org.springframework.jdbc.core.JdbcTemplate jdbcTemplate, String query) throws Exception
      Description copied from interface: SqlProcessingStrategy
      Commit callback if there are a query to be run after processing.
      Specified by:
      commit in interface SqlProcessingStrategy
      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

      public int commitBatchComplete(DefaultSqlEndpoint endpoint, org.springframework.jdbc.core.JdbcTemplate jdbcTemplate, String query) throws Exception
      Description copied from interface: SqlProcessingStrategy
      Commit callback when the batch is complete. This allows you to do one extra query after all rows has been processed in the batch.
      Specified by:
      commitBatchComplete in interface SqlProcessingStrategy
      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