org.apache.camel.component.sql
Class DefaultSqlProcessingStrategy
java.lang.Object
org.apache.camel.component.sql.DefaultSqlProcessingStrategy
- All Implemented Interfaces:
- SqlProcessingStrategy
public class DefaultSqlProcessingStrategy
- extends Object
- implements SqlProcessingStrategy
Method Summary |
int |
commit(SqlEndpoint 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(SqlEndpoint endpoint,
org.springframework.jdbc.core.JdbcTemplate jdbcTemplate,
String query)
Commit callback when the batch is complete. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultSqlProcessingStrategy
public DefaultSqlProcessingStrategy(SqlPrepareStatementStrategy sqlPrepareStatementStrategy)
commit
public int commit(SqlEndpoint 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 endpointexchange
- The exchange after it has been processeddata
- The original data delivered to the routejdbcTemplate
- The 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
public int commitBatchComplete(SqlEndpoint 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 endpointjdbcTemplate
- The 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
Apache Camel