org.apache.camel.builder.sql
Class SqlBuilder
java.lang.Object
org.apache.camel.builder.sql.SqlBuilder
- All Implemented Interfaces:
- org.apache.camel.Expression, org.apache.camel.Predicate
public class SqlBuilder
- extends Object
- implements org.apache.camel.Expression, org.apache.camel.Predicate
A builder of SQL Expression
and
Predicate
implementations
- Version:
Constructor Summary |
SqlBuilder(org.josql.Query query)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SqlBuilder
public SqlBuilder(org.josql.Query query)
evaluate
public <T> T evaluate(org.apache.camel.Exchange exchange,
Class<T> type)
- Specified by:
evaluate
in interface org.apache.camel.Expression
matches
public boolean matches(org.apache.camel.Exchange exchange)
- Specified by:
matches
in interface org.apache.camel.Predicate
assertMatches
public void assertMatches(String text,
org.apache.camel.Exchange exchange)
throws AssertionError
- Throws:
AssertionError
sql
public static SqlBuilder sql(String sql)
throws org.josql.QueryParseException
- Creates a new builder for the given SQL query string
- Parameters:
sql
- the SQL query to perform
- Returns:
- a new builder
- Throws:
org.josql.QueryParseException
- if there is an issue with the SQL
variable
public SqlBuilder variable(String name,
Object value)
- Adds the variable value to be used by the SQL query
getVariables
public Map<String,Object> getVariables()
setVariables
public void setVariables(Map<String,Object> properties)
matches
protected boolean matches(org.apache.camel.Exchange exchange,
List<?> list)
evaluateQuery
protected List<?> evaluateQuery(org.apache.camel.Exchange exchange)
configureQuery
protected void configureQuery(org.apache.camel.Exchange exchange)
addVariables
protected void addVariables(Map<String,Object> map)
Apache CAMEL