You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2015/10/05 11:50:28 UTC
[03/10] camel git commit: CAMEL-9162: camel-elsql component
CAMEL-9162: camel-elsql component
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/3dd80567
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/3dd80567
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/3dd80567
Branch: refs/heads/master
Commit: 3dd805678d6ef0c15b3c6739e0f2af24d1356e35
Parents: 0b71c42
Author: Claus Ibsen <da...@apache.org>
Authored: Mon Oct 5 08:25:42 2015 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Mon Oct 5 10:54:54 2015 +0200
----------------------------------------------------------------------
.../camel/component/elsql/ElsqlSqlProcessingStrategy.java | 6 +++---
.../camel/component/sql/DefaultSqlProcessingStrategy.java | 4 ++--
.../main/java/org/apache/camel/component/sql/SqlConsumer.java | 4 ++--
.../org/apache/camel/component/sql/SqlProcessingStrategy.java | 4 ++--
4 files changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/3dd80567/components/camel-elsql/src/main/java/org/apache/camel/component/elsql/ElsqlSqlProcessingStrategy.java
----------------------------------------------------------------------
diff --git a/components/camel-elsql/src/main/java/org/apache/camel/component/elsql/ElsqlSqlProcessingStrategy.java b/components/camel-elsql/src/main/java/org/apache/camel/component/elsql/ElsqlSqlProcessingStrategy.java
index 1134088..ea933d8 100644
--- a/components/camel-elsql/src/main/java/org/apache/camel/component/elsql/ElsqlSqlProcessingStrategy.java
+++ b/components/camel-elsql/src/main/java/org/apache/camel/component/elsql/ElsqlSqlProcessingStrategy.java
@@ -22,7 +22,7 @@ import java.sql.SQLException;
import com.opengamma.elsql.ElSql;
import com.opengamma.elsql.SpringSqlParams;
import org.apache.camel.Exchange;
-import org.apache.camel.component.sql.SqlEndpoint;
+import org.apache.camel.component.sql.DefaultSqlEndpoint;
import org.apache.camel.component.sql.SqlProcessingStrategy;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -43,7 +43,7 @@ public class ElsqlSqlProcessingStrategy implements SqlProcessingStrategy {
}
@Override
- public int commit(final SqlEndpoint endpoint, final Exchange exchange, final Object data, final JdbcTemplate jdbcTemplate, final String query) throws Exception {
+ public int commit(final DefaultSqlEndpoint endpoint, final Exchange exchange, final Object data, final JdbcTemplate jdbcTemplate, final String query) throws Exception {
final SqlParameterSource param = new ElsqlSqlMapSource(exchange, data);
final String sql = elSql.getSql(elSqlName, new SpringSqlParams(param));
LOG.debug("ElSql @{} using sql: {}", elSqlName, sql);
@@ -63,7 +63,7 @@ public class ElsqlSqlProcessingStrategy implements SqlProcessingStrategy {
}
@Override
- public int commitBatchComplete(final SqlEndpoint endpoint, final JdbcTemplate jdbcTemplate, final String query) throws Exception {
+ public int commitBatchComplete(final DefaultSqlEndpoint endpoint, final JdbcTemplate jdbcTemplate, final String query) throws Exception {
return 0;
}
}
http://git-wip-us.apache.org/repos/asf/camel/blob/3dd80567/components/camel-sql/src/main/java/org/apache/camel/component/sql/DefaultSqlProcessingStrategy.java
----------------------------------------------------------------------
diff --git a/components/camel-sql/src/main/java/org/apache/camel/component/sql/DefaultSqlProcessingStrategy.java b/components/camel-sql/src/main/java/org/apache/camel/component/sql/DefaultSqlProcessingStrategy.java
index d641c0f..1d7f96d 100644
--- a/components/camel-sql/src/main/java/org/apache/camel/component/sql/DefaultSqlProcessingStrategy.java
+++ b/components/camel-sql/src/main/java/org/apache/camel/component/sql/DefaultSqlProcessingStrategy.java
@@ -39,7 +39,7 @@ public class DefaultSqlProcessingStrategy implements SqlProcessingStrategy {
}
@Override
- public int commit(final SqlEndpoint endpoint, final Exchange exchange, final Object data, final JdbcTemplate jdbcTemplate, final String query) throws Exception {
+ public int commit(final DefaultSqlEndpoint endpoint, final Exchange exchange, final Object data, final JdbcTemplate jdbcTemplate, final String query) throws Exception {
final String preparedQuery = sqlPrepareStatementStrategy.prepareQuery(query, endpoint.isAllowNamedParameters());
@@ -66,7 +66,7 @@ public class DefaultSqlProcessingStrategy implements SqlProcessingStrategy {
}
@Override
- public int commitBatchComplete(final SqlEndpoint endpoint, final JdbcTemplate jdbcTemplate, final String query) throws Exception {
+ public int commitBatchComplete(final DefaultSqlEndpoint endpoint, final JdbcTemplate jdbcTemplate, final String query) throws Exception {
final String preparedQuery = sqlPrepareStatementStrategy.prepareQuery(query, endpoint.isAllowNamedParameters());
return jdbcTemplate.execute(preparedQuery, new PreparedStatementCallback<Integer>() {
http://git-wip-us.apache.org/repos/asf/camel/blob/3dd80567/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlConsumer.java
----------------------------------------------------------------------
diff --git a/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlConsumer.java b/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlConsumer.java
index 3774dc2..1187881 100644
--- a/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlConsumer.java
+++ b/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlConsumer.java
@@ -69,8 +69,8 @@ public class SqlConsumer extends ScheduledBatchPollingConsumer {
}
@Override
- public SqlEndpoint getEndpoint() {
- return (SqlEndpoint) super.getEndpoint();
+ public DefaultSqlEndpoint getEndpoint() {
+ return (DefaultSqlEndpoint) super.getEndpoint();
}
@Override
http://git-wip-us.apache.org/repos/asf/camel/blob/3dd80567/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlProcessingStrategy.java
----------------------------------------------------------------------
diff --git a/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlProcessingStrategy.java b/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlProcessingStrategy.java
index 6175bd8..6117cb2 100644
--- a/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlProcessingStrategy.java
+++ b/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlProcessingStrategy.java
@@ -35,7 +35,7 @@ public interface SqlProcessingStrategy {
* @return the update count if the query returned an update count
* @throws Exception can be thrown in case of error
*/
- int commit(SqlEndpoint endpoint, Exchange exchange, Object data, JdbcTemplate jdbcTemplate, String query) throws Exception;
+ int commit(DefaultSqlEndpoint endpoint, Exchange exchange, Object data, 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.
@@ -46,6 +46,6 @@ public interface SqlProcessingStrategy {
* @return the update count if the query returned an update count
* @throws Exception can be thrown in case of error
*/
- int commitBatchComplete(SqlEndpoint endpoint, JdbcTemplate jdbcTemplate, String query) throws Exception;
+ int commitBatchComplete(DefaultSqlEndpoint endpoint, JdbcTemplate jdbcTemplate, String query) throws Exception;
}