com.vaadin.data.util.sqlcontainer.query.generator.filter
Class QueryBuilder

java.lang.Object
  extended by com.vaadin.data.util.sqlcontainer.query.generator.filter.QueryBuilder
All Implemented Interfaces:
Serializable

public class QueryBuilder
extends Object
implements Serializable

See Also:
Serialized Form

Constructor Summary
QueryBuilder()
           
 
Method Summary
static void addFilterTranslator(FilterTranslator translator)
           
static String getJoinedFilterString(Collection<Container.Filter> filters, String joinString, StatementHelper sh)
           
static String getWhereStringForFilter(Container.Filter filter, StatementHelper sh)
          Constructs and returns a string representing the filter that can be used in a WHERE clause.
static String getWhereStringForFilters(List<Container.Filter> filters, StatementHelper sh)
           
static String group(String str)
           
static String quote(Object str)
           
static void setStringDecorator(StringDecorator decorator)
          Allows specification of a custom ColumnQuoter instance that handles quoting of column names for the current DB dialect.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryBuilder

public QueryBuilder()
Method Detail

addFilterTranslator

public static void addFilterTranslator(FilterTranslator translator)

setStringDecorator

public static void setStringDecorator(StringDecorator decorator)
Allows specification of a custom ColumnQuoter instance that handles quoting of column names for the current DB dialect.

Parameters:
decorator - the ColumnQuoter instance to use.

quote

public static String quote(Object str)

group

public static String group(String str)

getWhereStringForFilter

public static String getWhereStringForFilter(Container.Filter filter,
                                             StatementHelper sh)
Constructs and returns a string representing the filter that can be used in a WHERE clause.

Parameters:
filter - the filter to translate
sh - the statement helper to update with the value(s) of the filter
Returns:
a string representing the filter.

getJoinedFilterString

public static String getJoinedFilterString(Collection<Container.Filter> filters,
                                           String joinString,
                                           StatementHelper sh)

getWhereStringForFilters

public static String getWhereStringForFilters(List<Container.Filter> filters,
                                              StatementHelper sh)


Copyright © 2000-2011 Vaadin Ltd. All Rights Reserved.