org.apache.camel.builder.sql
Class SqlBuilder<E extends org.apache.camel.Exchange>
java.lang.Object
org.apache.camel.builder.sql.SqlBuilder<E>
- All Implemented Interfaces:
- org.apache.camel.Expression<E>, org.apache.camel.Predicate<E>
public class SqlBuilder<E extends org.apache.camel.Exchange>
- extends Object
- implements org.apache.camel.Expression<E>, org.apache.camel.Predicate<E>
A builder of SQL Expression
and
Predicate
implementations
- Version:
- $Revision: $
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 Object evaluate(E exchange)
- Specified by:
evaluate
in interface org.apache.camel.Expression<E extends org.apache.camel.Exchange>
matches
public boolean matches(E exchange)
- Specified by:
matches
in interface org.apache.camel.Predicate<E extends org.apache.camel.Exchange>
assertMatches
public void assertMatches(String text,
E exchange)
throws AssertionError
- Specified by:
assertMatches
in interface org.apache.camel.Predicate<E extends org.apache.camel.Exchange>
- Throws:
AssertionError
sql
public static <E extends org.apache.camel.Exchange> SqlBuilder<E> 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<E> 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(E exchange,
List list)
evaluateQuery
protected List evaluateQuery(E exchange)
configureQuery
protected void configureQuery(E exchange)
addVariables
protected void addVariables(Map<String,Object> map)
Copyright © 2007 Apache Software Foundation. All Rights Reserved.