com.im.df/1 5.9.1

com.im.df.query.ui
Class QueryFactories.QueryTermFactory

java.lang.Object
  extended by com.im.df.query.ui.QueryFactories.QueryTermFactory
Direct Known Subclasses:
QueryFactories.CompositeQueryTermFactory, QueryFactories.FieldOperatorValueQueryTermFactory, QueryFactories.StructureQueryTermFactory
Enclosing class:
QueryFactories

public abstract static class QueryFactories.QueryTermFactory
extends Object


Field Summary
protected  String defaultWidgetFactoryType
           
protected  Map<String,QueryFactories.WidgetFactory> widgetFactories
           
 
Constructor Summary
QueryFactories.QueryTermFactory()
           
 
Method Summary
abstract  SQLWhereClauseElement createWhereClause(DFTermExpression query, com.im.df.impl.db.query.DFSQLElementFactory sqlFactory, String identifierQuoteString)
          Create an appropriate where clause for our type of query
protected  DFOperator findDefaultOperator(DFField field, boolean ignore)
          Find the default operator for this field type, or the IGNORE operator
protected  QueryFactories.WidgetFactory findPreferredWidgetType(DFTermExpression qt)
           
 QueryFactories.WidgetFactory findWidgetFactory(DFTermExpression qt)
          Find the widget factory of this query.
 QueryFactories.WidgetFactory findWidgetFactory(String type)
          Find the widget factory of this type.
abstract  String getType()
          The type is used as a hint so that the query term can be executed without having to make guesses about how to interpret it.
 void registerDefaultWidgetFactory(QueryFactories.WidgetFactory factory)
          Register a widget factory for this type of query term.
 void registerWidgetFactory(QueryFactories.WidgetFactory factory)
          Register a widget factory for this type of query term.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

widgetFactories

protected Map<String,QueryFactories.WidgetFactory> widgetFactories

defaultWidgetFactoryType

protected String defaultWidgetFactoryType
Constructor Detail

QueryFactories.QueryTermFactory

public QueryFactories.QueryTermFactory()
Method Detail

getType

public abstract String getType()
The type is used as a hint so that the query term can be executed without having to make guesses about how to interpret it. When the query term is being created (e.g. by a query widget it should always be possible to specify its type. This should be specified in the DFTermExpression's options using the QUERY_TERM_TYPE constant as the key.

Returns:
A string that describes the type of this query term.

createWhereClause

public abstract SQLWhereClauseElement createWhereClause(DFTermExpression query,
                                                        com.im.df.impl.db.query.DFSQLElementFactory sqlFactory,
                                                        String identifierQuoteString)
Create an appropriate where clause for our type of query


registerWidgetFactory

public void registerWidgetFactory(QueryFactories.WidgetFactory factory)
Register a widget factory for this type of query term.


registerDefaultWidgetFactory

public void registerDefaultWidgetFactory(QueryFactories.WidgetFactory factory)
Register a widget factory for this type of query term.


findWidgetFactory

public QueryFactories.WidgetFactory findWidgetFactory(String type)
Find the widget factory of this type. If type is null the default factory will be returned.


findWidgetFactory

public QueryFactories.WidgetFactory findWidgetFactory(DFTermExpression qt)
Find the widget factory of this query. If a type is present in the options it will be used, otherwise the default type for the query will be returned.


findPreferredWidgetType

protected QueryFactories.WidgetFactory findPreferredWidgetType(DFTermExpression qt)

findDefaultOperator

protected DFOperator findDefaultOperator(DFField field,
                                         boolean ignore)
Find the default operator for this field type, or the IGNORE operator

Parameters:
field - The field
ignore - If true then the OPERATORS.IGNORE will returned
Returns:
The appropriate operator

com.im.df/1 5.9.1