com.im.df/1 5.9.1

com.im.df.query.ui
Class QueryFactories

java.lang.Object
  extended by com.im.df.query.ui.QueryFactories

public class QueryFactories
extends Object


Nested Class Summary
static class QueryFactories.CompositeQueryTermFactory
           
static class QueryFactories.FieldOperatorValueQueryTermFactory
           
static class QueryFactories.QueryTermFactory
           
static class QueryFactories.StructureQueryTermFactory
           
static class QueryFactories.StructureQueryWidgetFactory
           
static class QueryFactories.WidgetFactory
          Factory for query widgets
 
Field Summary
static String CASE_INSENSITIVE_SEARCH
           
static String DATA_TREE_PATH
          The path down the dta tree in terms of the DFRelationship.Directions
static String QUERY_TERM_CREATOR
          The type of widget that created this query term
static String QUERY_TERM_TYPE
          The type of query term e.g.
 
Constructor Summary
QueryFactories(DFDataTree dataTree)
          Queries for this data tree, including relational queries
QueryFactories(DFDataTree dataTree, DBDatabaseInfo dbInfo, String identifierQuoteString)
          Creates a new instance of QueryWidgetFactory
QueryFactories(DFEntity entity)
          Queries for only this Entity.
 
Method Summary
 DFTermExpression createCompositeQueryTerm(DFOperator op, List<DFTermExpression> children)
          Create a default AND or OR query term for this field.
 DFTermExpression createCompositeQueryTerm(DFOperator op, List<DFTermExpression> children, Map<String,Object> options)
          Create composite term.
 DFTermExpression createFieldOperatorValueQueryTerm(DFField field, boolean ignore)
          Create a default field operator value query term for this field TODO - we need to be able to specify the operator, but we need a mechanism to work out which should be the default.
 DFTermExpression createFieldOperatorValueQueryTerm(DFField field, DFOperator op, Object... values)
           
 SQLWhereClauseElement createWhereClauseElement(DFTermExpression query)
           
static void findAllEntities(DFTermExpression query, Set<DFEntity> results)
           
static void findAllFields(DFTermExpression query, Set<DFField> results, boolean recurse)
           
protected static String getShortDescritpionForSingleFieldQuery(List<DFTerm> operands)
           
static String getShortQueryWidgetDescription(DFTermExpression query)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

QUERY_TERM_TYPE

public static final String QUERY_TERM_TYPE
The type of query term e.g. field operator value query

See Also:
Constant Field Values

QUERY_TERM_CREATOR

public static final String QUERY_TERM_CREATOR
The type of widget that created this query term

See Also:
Constant Field Values

DATA_TREE_PATH

public static final String DATA_TREE_PATH
The path down the dta tree in terms of the DFRelationship.Directions

See Also:
Constant Field Values

CASE_INSENSITIVE_SEARCH

public static final String CASE_INSENSITIVE_SEARCH
See Also:
Constant Field Values
Constructor Detail

QueryFactories

public QueryFactories(DFDataTree dataTree,
                      DBDatabaseInfo dbInfo,
                      String identifierQuoteString)
Creates a new instance of QueryWidgetFactory


QueryFactories

public QueryFactories(DFEntity entity)
Queries for only this Entity. No relational queries.


QueryFactories

public QueryFactories(DFDataTree dataTree)
Queries for this data tree, including relational queries

Method Detail

getShortQueryWidgetDescription

public static String getShortQueryWidgetDescription(DFTermExpression query)

createCompositeQueryTerm

public DFTermExpression createCompositeQueryTerm(DFOperator op,
                                                 List<DFTermExpression> children)
Create a default AND or OR query term for this field. The options will be created as a new HashMap() with a zero length path identified by the key DATA_TREE_PATH


createCompositeQueryTerm

public DFTermExpression createCompositeQueryTerm(DFOperator op,
                                                 List<DFTermExpression> children,
                                                 Map<String,Object> options)
Create composite term. The options must exist and contain a path identified by the key DATA_TREE_PATH


createFieldOperatorValueQueryTerm

public DFTermExpression createFieldOperatorValueQueryTerm(DFField field,
                                                          boolean ignore)
Create a default field operator value query term for this field TODO - we need to be able to specify the operator, but we need a mechanism to work out which should be the default.

Parameters:
field - The field
ignore - If true then the operator is set to null. If false the first operator is set.
Returns:
The query term

createFieldOperatorValueQueryTerm

public DFTermExpression createFieldOperatorValueQueryTerm(DFField field,
                                                          DFOperator op,
                                                          Object... values)

createWhereClauseElement

public SQLWhereClauseElement createWhereClauseElement(DFTermExpression query)

getShortDescritpionForSingleFieldQuery

protected static String getShortDescritpionForSingleFieldQuery(List<DFTerm> operands)

findAllFields

public static void findAllFields(DFTermExpression query,
                                 Set<DFField> results,
                                 boolean recurse)

findAllEntities

public static void findAllEntities(DFTermExpression query,
                                   Set<DFEntity> results)

com.im.df/1 5.9.1