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:
java.io.Serializable

public class QueryBuilder
extends java.lang.Object
implements java.io.Serializable

See Also:
Serialized Form

Constructor Summary
QueryBuilder()
           
 
Method Summary
static void addFilterTranslator(FilterTranslator translator)
           
static java.lang.String getJoinedFilterString(java.util.Collection<Container.Filter> filters, java.lang.String joinString, StatementHelper sh)
           
static java.lang.String getWhereStringForFilter(Container.Filter filter, StatementHelper sh)
          Constructs and returns a string representing the filter that can be used in a WHERE clause.
static java.lang.String getWhereStringForFilters(java.util.List<Container.Filter> filters, StatementHelper sh)
           
static java.lang.String group(java.lang.String str)
           
static java.lang.String quote(java.lang.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 java.lang.String quote(java.lang.Object str)

group

public static java.lang.String group(java.lang.String str)

getWhereStringForFilter

public static java.lang.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 java.lang.String getJoinedFilterString(java.util.Collection<Container.Filter> filters,
                                                     java.lang.String joinString,
                                                     StatementHelper sh)

getWhereStringForFilters

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


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