Class ObjectNameFilter
java.lang.Object
com.sas.services.information.search.ObjectNameFilter
- All Implemented Interfaces:
SearchFilter,Serializable
- Direct Known Subclasses:
DisplayNameFilter
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 Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected booleanprotected Stringprotected SearchOperatorprotected static final Stringprotected static final String -
Constructor Summary
ConstructorsConstructorDescriptionObjectNameFilter(String name, boolean includeDescription) Constructs a new name filter that allows objects to be searched on by their nameObjectNameFilter(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 TypeMethodDescriptionbooleanequals(Object obj) static SearchOperatorReturns the default operator, CONTAINS, used for all name searches.Returns the filter component used for processing this search criteriaStringReturns the description of this filter.StringReturns the localized name of this filter.StringgetName()Returns the name being searched forReturns the operator being used in this searchbooleanReturns true if searching within the description fieldMethods 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:
-
METADATA_DESC
protected static final String METADATA_DESC- See Also:
-
_name
protected String _name -
_includeDescription
protected boolean _includeDescription -
_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 onincludeDescription- if true, the search will look through the objects' descriptions as well
-
ObjectNameFilter
Constructs a new name filter that allows objects to be searched on by their name- Parameters:
name- the name to search onincludeDescription- if true, the search will look through the objects' descriptionssearchOperator- will be the SearchOperator enum with values for "Contains", "Equals" or "Starts with" as well
-
-
Method Details
-
getDefaultOperator
Returns the default operator, CONTAINS, used for all name searches.- Returns:
- the default operator
-
getFilterType
public String getFilterType()Description copied from interface:SearchFilterReturns 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:
getFilterTypein interfaceSearchFilter- Returns:
- filter type
-
getFilterDescription
public String getFilterDescription()Description copied from interface:SearchFilterReturns 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:
getFilterDescriptionin interfaceSearchFilter- 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
Returns the operator being used in this search- Returns:
- the metadata search operator
-
getFilterComponent
Description copied from interface:SearchFilterReturns the filter component used for processing this search criteria- Specified by:
getFilterComponentin interfaceSearchFilter- Returns:
- filter component
-
equals
public boolean equals(Object obj) - Overrides:
equalsin classObject
-