com.sas.services.information.search
Class ObjectNameFilter

com.sas.services.information.search.ObjectNameFilter
All Implemented Interfaces:
SearchFilter, java.io.Serializable
Direct Known Subclasses:
DisplayNameFilter

public class ObjectNameFilter
implements SearchFilter, java.io.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
protected  java.lang.String _filterDescription
           
protected  boolean _includeDescription
           
protected  java.lang.String _name
           
protected  SearchOperator _searchOperator
           
protected static java.lang.String METADATA_DESC
           
protected static java.lang.String METADATA_NAME
           
 
Constructor Summary
ObjectNameFilter(java.lang.String name, boolean includeDescription)
          Constructs a new name filter that allows objects to be searched on by their name
ObjectNameFilter(java.lang.String name, boolean includeDescription, SearchOperator searchOperator)
          Constructs a new name filter that allows objects to be searched on by their name
 
Method Summary
 boolean equals(java.lang.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
 java.lang.String getFilterDescription()
          Returns the description of this filter.
 java.lang.String getFilterType()
          Returns the localized name of this filter.
 java.lang.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
 

Field Detail

METADATA_NAME

protected static final java.lang.String METADATA_NAME
See Also:
Constant Field Values

METADATA_DESC

protected static final java.lang.String METADATA_DESC
See Also:
Constant Field Values

_name

protected java.lang.String _name

_includeDescription

protected boolean _includeDescription

_searchOperator

protected SearchOperator _searchOperator

_filterDescription

protected java.lang.String _filterDescription
Constructor Detail

ObjectNameFilter

public ObjectNameFilter(java.lang.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(java.lang.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 Detail

getDefaultOperator

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

Returns:
the default operator

getFilterType

public java.lang.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 java.lang.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 java.lang.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(java.lang.Object obj)
Overrides:
equals in class java.lang.Object



Copyright © 2009 SAS Institute Inc. All Rights Reserved.