Package com.sas.services.information.search

# Class ObjectNameFilter

java.lang.Object
com.sas.services.information.search.ObjectNameFilter

All Implemented Interfaces:
  `SearchFilter`, `Serializable`

Direct Known Subclasses:
  `DisplayNameFilter`

public class ObjectNameFilter extends Object implements SearchFilter, Serializable
The ObjectNameFilter class is used to filter or search for objects by their Name attribute. For instance, applications can search for only those objects that have the word "SAS" contained within their name. This class supports searching for this value within an object's description as well.

See Also:
  - Serialized Form

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected String`
  `_filterDescription`
  `protected boolean`
  `_includeDescription`
  `protected String`
  `_name`
  `protected SearchOperator`
  `_searchOperator`
  `protected static final String`
  `METADATA_DESC`
  `protected static final String`
  `METADATA_NAME`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ObjectNameFilter(String name, boolean includeDescription)`
  Constructs a new name filter that allows objects to be searched on by their name
  `ObjectNameFilter(String name, boolean includeDescription, SearchOperator searchOperator)`
  Constructs a new name filter that allows objects to be searched on by their name

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `equals(Object obj)`
  `static SearchOperator`
  `getDefaultOperator()`
  Returns the default operator, CONTAINS, used for all name searches.
  `FilterComponent`
  `getFilterComponent()`
  Returns the filter component used for processing this search criteria
  `String`
  `getFilterDescription()`
  Returns the description of this filter.
  `String`
  `getFilterType()`
  Returns the localized name of this filter.
  `String`
  `getName()`
  Returns the name being searched for
  `SearchOperator`
  `getSearchOperator()`
  Returns the operator being used in this search
  `boolean`
  `isIncludingDescription()`
  Returns true if searching within the description field

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

  `clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### METADATA_NAME

    protected static final String METADATA_NAME
    See Also:
      - Constant Field Values

  - ### METADATA_DESC

    protected static final String METADATA_DESC
    See Also:
      - Constant Field Values

  - ### _name

    protected String _name

  - ### _includeDescription

    protected boolean _includeDescription

  - ### _searchOperator

    protected SearchOperator _searchOperator

  - ### _filterDescription

    protected String _filterDescription

- ## Constructor Details

  - ### ObjectNameFilter

    public ObjectNameFilter(String name, boolean includeDescription)
    Constructs a new name filter that allows objects to be searched on by their name
    Parameters:
      `name` - the name to search on
      `includeDescription` - if true, the search will look through the objects' descriptions as well

  - ### ObjectNameFilter

    public ObjectNameFilter(String name, boolean includeDescription, SearchOperator searchOperator)
    Constructs a new name filter that allows objects to be searched on by their name
    Parameters:
      `name` - the name to search on
      `includeDescription` - if true, the search will look through the objects' descriptions
      `searchOperator` - will be the SearchOperator enum with values for "Contains", "Equals" or "Starts with" as well

- ## Method Details

  - ### getDefaultOperator

    public static SearchOperator getDefaultOperator()
    Returns the default operator, CONTAINS, used for all name searches.
    Returns:
      the default operator

  - ### getFilterType

    public String getFilterType()
    Description copied from interface: `SearchFilter`
    Returns the localized name of this filter. This method is typically used to help identify to the user what type of search is being performed. For instance, a name search, or a type search.
    Specified by:
      `getFilterType` in interface `SearchFilter`
    Returns:
      filter type

  - ### getFilterDescription

    public String getFilterDescription()
    Description copied from interface: `SearchFilter`
    Returns the description of this filter. This description is typically used for display purposes, or a log file, to inform the user what the intention of this filter is.
    Specified by:
      `getFilterDescription` in interface `SearchFilter`
    Returns:
      the filter description

  - ### getName

    public String getName()
    Returns the name being searched for
    Returns:
      the object name

  - ### isIncludingDescription

    public boolean isIncludingDescription()
    Returns true if searching within the description field
    Returns:

  - ### getSearchOperator

    public SearchOperator getSearchOperator()
    Returns the operator being used in this search
    Returns:
      the metadata search operator

  - ### getFilterComponent

    public FilterComponent getFilterComponent()
    Description copied from interface: `SearchFilter`
    Returns the filter component used for processing this search criteria
    Specified by:
      `getFilterComponent` in interface `SearchFilter`
    Returns:
      filter component

  - ### equals

    public boolean equals(Object obj)
    Overrides:
      `equals` in class `Object`