com.endeca.portal.lql
Class LQLFilterCollection

java.lang.Object
  extended by com.endeca.portal.lql.LQLFilterCollection

public class LQLFilterCollection
extends java.lang.Object

Used to collect the generated LQL AST fragments created by all the QueryFunctions in the current QueryState, then combine those fragments into a single clause to be sent to the MDEX Engine.

Author:
Endeca Technologies, Inc.

Constructor Summary
LQLFilterCollection()
           
 
Method Summary
 boolean addDataSourceFilterExpression(com.endeca.mdex.lql_parser.types.ExpressionBase expr)
          Add a LQL AST expression fragment to the collection of data source expressions
 boolean addSelectionFilterExpression(com.endeca.mdex.lql_parser.types.ExpressionBase expr)
          Add a LQL AST expression fragment to the collection of selection expressions
 com.endeca.mdex.lql_parser.types.StandaloneFilter getCombinedDataSourceFilter()
          Returns the StandaloneFilter created by AND-ing together all of the data source filter fragments previously populated into this class
 com.endeca.mdex.lql_parser.types.StandaloneFilter getCombinedSelectionFilter()
          Returns the StandaloneFilter created by AND-ing together all of the selection filter fragments previously populated into this class
 boolean hasDataSourceFilterExpressions()
          Convenience to check if this collection contains any data source expressions
 boolean hasSelectionFilterExpressions()
          Convenience to check if this collection contains any selection expressions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LQLFilterCollection

public LQLFilterCollection()
Method Detail

addSelectionFilterExpression

public boolean addSelectionFilterExpression(com.endeca.mdex.lql_parser.types.ExpressionBase expr)
Add a LQL AST expression fragment to the collection of selection expressions

Parameters:
expr - the LQL AST expression fragment
Returns:
true if the underlying collection is changed as a result of this call. See ArrayList.add(Object)

addDataSourceFilterExpression

public boolean addDataSourceFilterExpression(com.endeca.mdex.lql_parser.types.ExpressionBase expr)
Add a LQL AST expression fragment to the collection of data source expressions

Parameters:
expr - the LQL AST expression fragment
Returns:
true if the underlying collection is changed as a result of this call. See ArrayList.add(Object)

hasSelectionFilterExpressions

public boolean hasSelectionFilterExpressions()
Convenience to check if this collection contains any selection expressions

Returns:
true if any selection filters exist. Based on ArrayList.isEmpty()

hasDataSourceFilterExpressions

public boolean hasDataSourceFilterExpressions()
Convenience to check if this collection contains any data source expressions

Returns:
true if any data source filters exist. Based on ArrayList.isEmpty()

getCombinedSelectionFilter

public com.endeca.mdex.lql_parser.types.StandaloneFilter getCombinedSelectionFilter()
Returns the StandaloneFilter created by AND-ing together all of the selection filter fragments previously populated into this class

Returns:
the the concatenation of all selection filter fragments

getCombinedDataSourceFilter

public com.endeca.mdex.lql_parser.types.StandaloneFilter getCombinedDataSourceFilter()
Returns the StandaloneFilter created by AND-ing together all of the data source filter fragments previously populated into this class

Returns:
the the concatenation of all data source filter fragments