|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.camel.builder.sql.SqlBuilder
public class SqlBuilder
A builder of SQL Expression and
Predicate implementations
| Constructor Summary | |
|---|---|
SqlBuilder(org.josql.Query query)
|
|
| Method Summary | ||
|---|---|---|
protected void |
addVariables(Map<String,Object> map)
|
|
void |
assertMatches(String text,
Exchange exchange)
|
|
protected void |
configureQuery(Exchange exchange)
|
|
|
evaluate(Exchange exchange,
Class<T> type)
Returns the value of the expression on the given exchange |
|
protected List |
evaluateQuery(Exchange exchange)
|
|
Map<String,Object> |
getVariables()
|
|
boolean |
matches(Exchange exchange)
Evaluates the predicate on the message exchange and returns true if this exchange matches the predicate |
|
protected boolean |
matches(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 |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SqlBuilder(org.josql.Query query)
| Method Detail |
|---|
public <T> T evaluate(Exchange exchange,
Class<T> type)
Expression
evaluate in interface Expressionexchange - the message exchange on which to evaluate the expressiontype - the expected type of the evaluation result
public boolean matches(Exchange exchange)
Predicate
matches in interface Predicateexchange - the message exchange
public void assertMatches(String text,
Exchange exchange)
throws AssertionError
AssertionError
public static SqlBuilder sql(String sql)
throws org.josql.QueryParseException
sql - the SQL query to perform
org.josql.QueryParseException - if there is an issue with the SQL
public SqlBuilder variable(String name,
Object value)
public Map<String,Object> getVariables()
public void setVariables(Map<String,Object> properties)
protected boolean matches(Exchange exchange,
List list)
protected List evaluateQuery(Exchange exchange)
protected void configureQuery(Exchange exchange)
protected void addVariables(Map<String,Object> map)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||