@UriEndpoint(scheme="sql",
consumerClass=SqlConsumer.class)
public class SqlEndpoint
extends org.apache.camel.impl.DefaultPollingEndpoint
| Constructor and Description |
|---|
SqlEndpoint() |
SqlEndpoint(String uri,
org.apache.camel.Component component,
org.springframework.jdbc.core.JdbcTemplate jdbcTemplate,
String query) |
| Modifier and Type | Method and Description |
|---|---|
org.apache.camel.Consumer |
createConsumer(org.apache.camel.Processor processor) |
protected String |
createEndpointUri() |
org.apache.camel.Producer |
createProducer() |
org.springframework.jdbc.core.JdbcTemplate |
getJdbcTemplate() |
int |
getMaxMessagesPerPoll() |
String |
getOnConsume() |
String |
getOnConsumeBatchComplete() |
String |
getOnConsumeFailed() |
String |
getOutputClass() |
SqlOutputType |
getOutputType() |
int |
getParametersCount() |
SqlPrepareStatementStrategy |
getPrepareStatementStrategy() |
SqlProcessingStrategy |
getProcessingStrategy() |
String |
getQuery() |
char |
getSeparator() |
boolean |
isAllowNamedParameters() |
boolean |
isAlwaysPopulateStatement() |
boolean |
isBatch() |
boolean |
isNoop() |
boolean |
isSingleton() |
protected List<Map<String,Object>> |
queryForList(ResultSet rs) |
protected Object |
queryForObject(ResultSet rs) |
void |
setAllowNamedParameters(boolean allowNamedParameters) |
void |
setAlwaysPopulateStatement(boolean alwaysPopulateStatement) |
void |
setBatch(boolean batch)
Enables or disables batch mode
|
void |
setJdbcTemplate(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate) |
void |
setMaxMessagesPerPoll(int maxMessagesPerPoll)
Sets the maximum number of messages to poll
|
void |
setNoop(boolean noop) |
void |
setOnConsume(String onConsume) |
void |
setOnConsumeBatchComplete(String onConsumeBatchComplete) |
void |
setOnConsumeFailed(String onConsumeFailed) |
void |
setOutputClass(String outputClass) |
void |
setOutputType(SqlOutputType outputType) |
void |
setParametersCount(int parametersCount) |
void |
setPrepareStatementStrategy(SqlPrepareStatementStrategy prepareStatementStrategy) |
void |
setProcessingStrategy(SqlProcessingStrategy processingStrategy) |
void |
setQuery(String query)
Sets the SQL query to perform
|
void |
setSeparator(char separator) |
configureConsumer, createEndpointConfiguration, createExchange, createExchange, createExchange, createPollingConsumer, doStart, doStop, equals, getCamelContext, getComponent, getConsumerProperties, getEndpointConfiguration, getEndpointKey, getEndpointUri, getExchangePattern, getId, hashCode, isLenientProperties, isSynchronous, setCamelContext, setConsumerProperties, setEndpointConfiguration, setEndpointUri, setEndpointUriIfNotSpecified, setExchangePattern, setSynchronous, toStringdoResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, resume, shutdown, start, stop, suspendpublic org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor)
throws Exception
createConsumer in interface org.apache.camel.EndpointcreateConsumer in class org.apache.camel.impl.DefaultPollingEndpointExceptionpublic boolean isSingleton()
public org.springframework.jdbc.core.JdbcTemplate getJdbcTemplate()
public void setJdbcTemplate(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate)
public String getQuery()
public void setQuery(String query)
public boolean isBatch()
public void setBatch(boolean batch)
public int getMaxMessagesPerPoll()
public void setMaxMessagesPerPoll(int maxMessagesPerPoll)
public SqlProcessingStrategy getProcessingStrategy()
public void setProcessingStrategy(SqlProcessingStrategy processingStrategy)
public SqlPrepareStatementStrategy getPrepareStatementStrategy()
public void setPrepareStatementStrategy(SqlPrepareStatementStrategy prepareStatementStrategy)
public String getOnConsume()
public void setOnConsume(String onConsume)
public String getOnConsumeFailed()
public void setOnConsumeFailed(String onConsumeFailed)
public String getOnConsumeBatchComplete()
public void setOnConsumeBatchComplete(String onConsumeBatchComplete)
public boolean isAllowNamedParameters()
public void setAllowNamedParameters(boolean allowNamedParameters)
public boolean isAlwaysPopulateStatement()
public void setAlwaysPopulateStatement(boolean alwaysPopulateStatement)
public char getSeparator()
public void setSeparator(char separator)
public SqlOutputType getOutputType()
public void setOutputType(SqlOutputType outputType)
public String getOutputClass()
public void setOutputClass(String outputClass)
public int getParametersCount()
public void setParametersCount(int parametersCount)
public boolean isNoop()
public void setNoop(boolean noop)
protected String createEndpointUri()
createEndpointUri in class org.apache.camel.impl.DefaultEndpointprotected List<Map<String,Object>> queryForList(ResultSet rs) throws SQLException
SQLExceptionprotected Object queryForObject(ResultSet rs) throws SQLException
SQLExceptionApache Camel