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:
  • Field Details

    • METADATA_NAME

      protected static final String METADATA_NAME
      See Also:
    • METADATA_DESC

      protected static final String METADATA_DESC
      See Also:
    • _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