public class SqlBuilder extends Object implements org.apache.camel.Expression, org.apache.camel.Predicate
Expression
and
Predicate
implementationsConstructor and Description |
---|
SqlBuilder(org.josql.Query query) |
Modifier and Type | Method and Description |
---|---|
protected void |
addVariables(Map<String,Object> map) |
void |
assertMatches(String text,
org.apache.camel.Exchange exchange) |
protected void |
configureQuery(org.apache.camel.Exchange exchange) |
<T> T |
evaluate(org.apache.camel.Exchange exchange,
Class<T> type) |
protected List<?> |
evaluateQuery(org.apache.camel.Exchange exchange) |
Map<String,Object> |
getVariables() |
boolean |
matches(org.apache.camel.Exchange exchange) |
protected boolean |
matches(org.apache.camel.Exchange exchange,
List<?> list) |
void |
setVariables(Map<String,Object> properties) |
static SqlBuilder |
sql(String sql)
Creates a new builder for the given SQL query string
|
SqlBuilder |
variable(String name,
Object value)
Adds the variable value to be used by the SQL query
|
public <T> T evaluate(org.apache.camel.Exchange exchange, Class<T> type)
evaluate
in interface org.apache.camel.Expression
public boolean matches(org.apache.camel.Exchange exchange)
matches
in interface org.apache.camel.Predicate
public void assertMatches(String text, org.apache.camel.Exchange exchange) throws AssertionError
AssertionError
public static SqlBuilder sql(String sql) throws org.josql.QueryParseException
sql
- the SQL query to performorg.josql.QueryParseException
- if there is an issue with the SQLpublic SqlBuilder variable(String name, Object value)
protected boolean matches(org.apache.camel.Exchange exchange, List<?> list)
protected List<?> evaluateQuery(org.apache.camel.Exchange exchange)
protected void configureQuery(org.apache.camel.Exchange exchange)
Apache Camel