com.mapinfo.midev.language.filter

## Class FilterSearch

- java.lang.Object
- - com.mapinfo.midev.language.filter.FilterSearch

All Implemented Interfaces:
  ISearch

    public final class FilterSearch
    extends Object
    implements ISearch

An `ISearch` that uses an optional `IFilter` to select `IFeatures` from an `IDataSourceTable`.

See Also:
  `ISearch`, `FilterLanguage`, `IFilter`, `FilterCapabilities`

### Constructor Summary

Constructors
Constructor and Description
`FilterSearch()` Constructs an empty search object.
`FilterSearch(SelectList attributeNames)` Constructs a search object that requests the specified attributes.
`FilterSearch(SelectList attributeNames, IFilter filter, String orderByAttributeName)` Constructs a search object for the specified attributes, filter, and sorting.
`FilterSearch(SelectList attributeNames, IFilter filter, String orderByAttributeName, OrderByDirection orderByDirection, Integer limit, Integer offset)` Constructs a search object for the specified attributes, filter, and sorting.
`FilterSearch(String[] attributeNames)` Constructs a search object that requests the specified attributes.
`FilterSearch(String[] attributeNames, IFilter filter, String orderByAttributeName)` Constructs a search object for the specified attributes, filter, and sorting.
`FilterSearch(String[] attributeNames, IFilter filter, String orderByAttributeName, OrderByDirection orderByDirection, Integer limit, Integer offset)` Constructs a search object for the specified attributes, filter, and sorting.

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`boolean` `equals(Object o)`
`IFilter` `getFilter()` Returns the `IFilter` used to filter the `IFeatures` or null if the `IFeatures` are not to be filtered.
`ILanguage` `getLanguage()` Returns the language that this `ISearch` uses to define itself.
`Integer` `getLimit()` Returns limit value
`Integer` `getOffset()` Returns offset value
`String` `getOrderBy()` Returns the attribute name by which the results of the search will be sorted or `null` to indicate that the results will not be sorted.
`OrderByDirection` `getOrderByDirection()` Returns the direction to order the results.
`SelectList` `getSelectList()` Returns the select list for the search.
`int` `hashCode()`
`static FilterSearch` `searchALL()` Constructs a new FilterSearch object that has no filter and no order by.
`String` `toString()`

### Methods inherited from class java.lang.Object

`getClass, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### FilterSearch

    public FilterSearch()

Constructs an empty search object. The default behavior of an empty search object is to not filter the features (in other words return all features), and do not specify a sort attribute (do not request the results to be sorted). There are also no attributes included by default in the select list.

#### FilterSearch

    public FilterSearch(String[] attributeNames)

Constructs a search object that requests the specified attributes.

Parameters:
  `attributeNames` - the collection of attribute names to include in the search.

#### FilterSearch

    public FilterSearch(SelectList attributeNames)

Constructs a search object that requests the specified attributes.

Parameters:
  `attributeNames` - the collection of attributes to include in the search.

#### FilterSearch

    public FilterSearch(String[] attributeNames,
                        IFilter filter,
                        String orderByAttributeName)

Constructs a search object for the specified attributes, filter, and sorting.

Parameters:
  `attributeNames` - the attributes to return from the search
  `filter` - the filter that indicates which features are to be returned or `null` if no filter is to be applied.
  `orderByAttributeName` - the name of the attribute that will be used to sort the features that are returned, or `null` if no sorting is desired.

#### FilterSearch

    public FilterSearch(String[] attributeNames,
                        IFilter filter,
                        String orderByAttributeName,
                        OrderByDirection orderByDirection,
                        Integer limit,
                        Integer offset)

Constructs a search object for the specified attributes, filter, and sorting.

Parameters:
  `attributeNames` - the attributes to return from the search
  `filter` - the filter that indicates which features are to be returned or `null` if no filter is to be applied.
  `orderByAttributeName` - the name of the attribute that will be used to sort the features that are returned, or `null` if no sorting is desired.

#### FilterSearch

    public FilterSearch(SelectList attributeNames,
                        IFilter filter,
                        String orderByAttributeName)

Constructs a search object for the specified attributes, filter, and sorting.

Parameters:
  `attributeNames` - the attributes to return from the search
  `filter` - the filter that indicates which features are to be returned or `null` if no filter is to be applied.
  `orderByAttributeName` - the name of the attribute that will be used to sort the features that are returned, or `nul` if no sorting is desired.

#### FilterSearch

    public FilterSearch(SelectList attributeNames,
                        IFilter filter,
                        String orderByAttributeName,
                        OrderByDirection orderByDirection,
                        Integer limit,
                        Integer offset)

Constructs a search object for the specified attributes, filter, and sorting.

Parameters:
  `attributeNames` - the attributes to return from the search
  `filter` - the filter that indicates which features are to be returned or `null` if no filter is to be applied.
  `orderByAttributeName` - the name of the attribute that will be used to sort the
  `orderByDirection` - the direction to order by attribute name features that are returned, or `nul` if no sorting is desired.
  `limit` - limit number of records
  `offset` - skip records till specified offset

### Method Detail

#### getLanguage

    public ILanguage getLanguage()

Returns the language that this `ISearch` uses to define itself. In this case `FilterLanguage.getInstance()` is returned indicating that the `FilterLanguage` is what this `ISearch` is all about.

Specified by:
  `getLanguage` in interface `ISearch`
Returns:
  the language that this `ISearch` uses to define itself. In this case `FilterLanguage.getInstance()` is returned indicating that the `FilterLanguage` is what this `ISearch` is all about.

#### getSelectList

    public SelectList getSelectList()

Returns the select list for the search.

Returns:
  the select list for the search.

#### getOrderBy

    public String getOrderBy()

Returns the attribute name by which the results of the search will be sorted or `null` to indicate that the results will not be sorted.

Returns:
  the attribute name by which the results of the search will be sorted or `null` to indicate that the results will not be sorted.

#### getOrderByDirection

    public OrderByDirection getOrderByDirection()

Returns the direction to order the results.

Returns:
  the direction to order the results.

#### getFilter

    public IFilter getFilter()

Returns the `IFilter` used to filter the `IFeatures` or null if the `IFeatures` are not to be filtered.

Returns:
  the `IFilter` used to filter the `IFeatures` or null if the `IFeatures` are not to be filtered.

#### getLimit

    public Integer getLimit()

Returns limit value

Returns:
  limit

#### getOffset

    public Integer getOffset()

Returns offset value

Returns:
  offset

#### searchALL

    public static FilterSearch searchALL()

Constructs a new FilterSearch object that has no filter and no order by. The selection list is defaulted to include one attribute that contains the `QueryAttribute.WILDCARD` string as the attribute name.

Returns:
  a new FilterSearch object.

#### equals

    public boolean equals(Object o)

Overrides:
  `equals` in class `Object`

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `Object`

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`