com.endeca.navigation.analytics
Class FilterIn

java.lang.Object
  extended by com.endeca.navigation.analytics.FilterIn
All Implemented Interfaces:
Filter, QueryNode

public class FilterIn
extends Object
implements Filter

A FilterIn is a Filter that checks membership of a given set of values in a table. The membership is checked with a set of lookup expressions in a LookupList that is set in the FilterIn.

This filter:

"[expression1, expression2] IN MyTable"
is semantically correct if MyTable is GROUPED by the same number of fields as the number of expressions within brackets "[...]". In this way, the contents of the brackets uniquely identify a record in MyTable. Brackets with no expression list within represent access to a table that is GROUPed to a single record.

Because the implicit tables NavStateRecords and AllBaseRecords are not GROUPED, it is not possible to do a lookup on these tables.


Constructor Summary
FilterIn(String tableName, LookupList fList)
          Constructs a new FilterIn.
 
Method Summary
 LookupList getLookupList()
          Gets the LookupList for this FilterIn.
 String getTableName()
          Gets the table name for this FilterIn.
 void setLookupList(LookupList lList)
          Sets the LookupList for this FilterIn.
 void setTableName(String tName)
          Sets the table name for this FilterIn.
 String toString()
          Returns the string form of this FilterIn.
 String toWire()
          Returns the wire format of this FilterIn.
 void validateSyntax()
          Validates the syntax of this FilterIn.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FilterIn

public FilterIn(String tableName,
                LookupList fList)
Constructs a new FilterIn. The LookupList represents a list of expressions that evaluate to a list of values that uniquely identify a record in the specified table.

Parameters:
tableName - the name of the table. Note that the table names NavStateRecords and AllBaseRecords are reserved and therefore cannot be specified.
fList - a LookupList object that has been populated with lookup expressions (objects of type Expr).
Method Detail

getTableName

public String getTableName()
Gets the table name for this FilterIn.

Returns:
The name of the table for this FilterIn.

setTableName

public void setTableName(String tName)
Sets the table name for this FilterIn.

Parameters:
tName - the name of the table. Note that the table names NavStateRecords and AllBaseRecords are reserved and therefore cannot be specified.

getLookupList

public LookupList getLookupList()
Gets the LookupList for this FilterIn.

Returns:
The LookupList for this FilterIn.

setLookupList

public void setLookupList(LookupList lList)
Sets the LookupList for this FilterIn.

Parameters:
lList - a LookupList object that has been populated with lookup expressions (objects of type Expr).

toString

public String toString()
Returns the string form of this FilterIn. These are of the format:
[expression1, expression2...] IN table-name
where each expression is a lookup expression in the LookupList.

Specified by:
toString in interface QueryNode
Overrides:
toString in class Object
Returns:
A string representation of the FilterIn in the specified format.

toWire

public String toWire()
Returns the wire format of this FilterIn. This method is not intended for public use because the wire format is subject to change.

Specified by:
toWire in interface QueryNode
Returns:
A wire format representation of this FilterIn.

validateSyntax

public void validateSyntax()
                    throws SyntaxException
Validates the syntax of this FilterIn. A FilterIn is valid if the table-name is non-null and non-empty and the LookupList is itself valid.

Specified by:
validateSyntax in interface QueryNode
Throws:
SyntaxException - if the syntax requirements are not satisfied.


© 2003, 2012 Oracle and/or its affiliates. All rights reserved.
Oracle and/or its affiliates Confidential