Oracle Fusion Middleware extensions for Applications Core API Reference
11g Release 1 (11.1.2)

E22562-02

oracle.apps.fnd.applcore.globalSearch.ui
Class AbstractSearchResult

java.lang.Object
  extended by oracle.apps.fnd.applcore.globalSearch.ui.AbstractSearchResult
All Implemented Interfaces:
java.io.Serializable, SearchResult
Direct Known Subclasses:
ECSFSearchResultAdapter

public abstract class AbstractSearchResult
extends java.lang.Object
implements SearchResult, java.io.Serializable

An abstract base class for Search Results. All implementation classes MUST extend this abstract class and not implement the interface directly to allow for future interface changes.

Author:
David Groves <david.groves@oracle.com>
See Also:
Serialized Form

Field Summary
protected  java.util.List<SearchCategory> _allSearchableCategories
          All categories that can be searched upon, not necessarily the ones the user picked to search on.
protected  java.util.List<TreeItem> _attributeTreeItems
          The root tree items wrapped by _attributeTreeModel for our JSF tree.
protected  org.apache.myfaces.trinidad.model.TreeModel _attributeTreeModel
           
protected  java.lang.String _callerContext
           
protected  java.lang.String _errorMessageName
          Error message name in cases where _inError == true.
protected  boolean _inError
           
protected  boolean _searched
          Has this search been performed?
protected  java.util.List<SearchCategory> _searchedCategories
          The basic set of searched categories selected by the user from the Category list in the UI.
protected  SearchFilterItems _searchFilterItems
           
protected  java.lang.String _searchString
           
 
Fields inherited from interface oracle.apps.fnd.applcore.globalSearch.ui.SearchResult
BLOCK_SIZE
 
Constructor Summary
AbstractSearchResult(java.lang.String searchTabName, java.util.List<SearchCategory> searchCategories, java.util.List<SearchCategory> allSearchableCategories, java.lang.String searchString, java.lang.String callerContext, boolean usesFilters)
          Construct this class.
 
Method Summary
 void addWarning(java.lang.String warning)
          Add a warning to the search result.
 boolean containsAllSearchableCategories(java.util.List<SearchCategory> categories)
          Does the passed list of categories contain all of the Searchable categories.
 boolean equals(java.lang.Object obj)
          
 java.util.List<SearchCategory> getAllSearchableCategories()
          Get the list of all allowed categories the user can pick from.
 java.lang.String getApproxNumResultsStr()
          Get the heuristic number of results the searh engine estimates it can return as a String "1234 Resuts".
 java.util.List<TreeItem> getAttributeTreeItems()
          Get the attribute tree items for this search.
 org.apache.myfaces.trinidad.model.TreeModel getAttributeTreeModel()
          Get the attribute Tree Model.
 java.lang.String getCallerContext()
          Get the caller Search Context for this Search.
 TreeItem getCategoryTreeItem(SearchCategory cat)
          Get the root level Tree Item for given category.
 org.apache.myfaces.trinidad.model.RowKeySet getDisclosedRowKeys()
          Get the disclosed row keys for this result.
 java.lang.String getErrorMessageName()
          Obtain an error message name for the search, for cases where isInError() == true.
 org.apache.myfaces.trinidad.model.CollectionModel getItemsCM()
          Get the CollectionModel used by the UI to show the results.
 long getSearchCreationTime()
          Get the time this class was created.
 java.util.List<SearchCategory> getSearchedCategories()
          Get the list of categories used in the search.
 SearchFilterItems getSearchFilterItems()
          Get the current Search FIlter Items, this will include the categories, search text, topic and attribute filters.
 java.lang.String getSearchString()
          Get the Search String as entered by the user.
 java.lang.String getSearchTabName()
          Get the search tab name.
 java.util.List<java.lang.String> getWarningsList()
          Get any warnings from the search result.
 int hashCode()
          
 boolean isInError()
          Is this search in error, that is could not be performed and should not be shown.
 boolean isSaved()
          Was this search result originally a saved search? It may have been refreshed due to an attribute filter re-search, but this would not change the fact that it was originally run as a seved search.
 boolean isSearched()
          Has the search been performed?
 boolean isUsesFilters()
          Does this Search result support Attribute Filters?
 boolean isWarnings()
          Are there any warnings to show the user?
 void setDisclosedRowKeys(org.apache.myfaces.trinidad.model.RowKeySet disclosedRowKeys)
          Set the disclosed row keys for this result.
 void setSaved(boolean wasSaved)
          Set the initial saved stateof this search? It may have been refreshed due to an attribute filter re-search, but this would not change the fact that it was originally run as a seved search.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface oracle.apps.fnd.applcore.globalSearch.ui.SearchResult
allResultsRetrieved, copySearch, extendSearchResults, getApproxNumResults, getCurrentNumberOfResults, getItem, search
 

Field Detail

_searched

protected boolean _searched
Has this search been performed?


_inError

protected boolean _inError

_errorMessageName

protected java.lang.String _errorMessageName
Error message name in cases where _inError == true.


_searchFilterItems

protected SearchFilterItems _searchFilterItems

_searchedCategories

protected java.util.List<SearchCategory> _searchedCategories
The basic set of searched categories selected by the user from the Category list in the UI. It does not represent any narrowing of the search using filters.


_allSearchableCategories

protected java.util.List<SearchCategory> _allSearchableCategories
All categories that can be searched upon, not necessarily the ones the user picked to search on.


_searchString

protected java.lang.String _searchString

_callerContext

protected java.lang.String _callerContext

_attributeTreeItems

protected java.util.List<TreeItem> _attributeTreeItems
The root tree items wrapped by _attributeTreeModel for our JSF tree.


_attributeTreeModel

protected transient org.apache.myfaces.trinidad.model.TreeModel _attributeTreeModel
Constructor Detail

AbstractSearchResult

public AbstractSearchResult(java.lang.String searchTabName,
                            java.util.List<SearchCategory> searchCategories,
                            java.util.List<SearchCategory> allSearchableCategories,
                            java.lang.String searchString,
                            java.lang.String callerContext,
                            boolean usesFilters)
Construct this class.

Parameters:
searchTabName - Search Tab name.
searchCategories - search categories.
allSearchableCategories - list of allowed categories to search on. A superset of searchCategories.
searchString - Search String.
callerContext - a String which represents to the caller, the context in which the search result will be called. This primarily relates to saved searches, which will be saved with this context, and only saved searches with this context shown to the user.
usesFilters - does this search use filters.
Method Detail

getSearchFilterItems

public SearchFilterItems getSearchFilterItems()
Get the current Search FIlter Items, this will include the categories, search text, topic and attribute filters.

Specified by:
getSearchFilterItems in interface SearchResult
Returns:
search filter items.

getSearchedCategories

public java.util.List<SearchCategory> getSearchedCategories()
Get the list of categories used in the search. Expect that there will be 1 searched category per group.

Specified by:
getSearchedCategories in interface SearchResult
Returns:
categories used in the search.

getAllSearchableCategories

public java.util.List<SearchCategory> getAllSearchableCategories()
Get the list of all allowed categories the user can pick from. This should be a superset of the searchedCategories.

Specified by:
getAllSearchableCategories in interface SearchResult
Returns:
categories used in the search.

containsAllSearchableCategories

public boolean containsAllSearchableCategories(java.util.List<SearchCategory> categories)
Does the passed list of categories contain all of the Searchable categories.

Specified by:
containsAllSearchableCategories in interface SearchResult
Parameters:
categories - non-null List of SearchCategory.
Returns:
true if all, false otherwise.

getSearchString

public java.lang.String getSearchString()
Get the Search String as entered by the user.

Specified by:
getSearchString in interface SearchResult
Returns:
search String.

getCallerContext

public java.lang.String getCallerContext()
Get the caller Search Context for this Search. The Search Context is a String which represents to the caller, the context in which the search result will be called. This primarily relates to saved searches, which will be saved with this context, and only saved searches with this context shown to the user.

Specified by:
getCallerContext in interface SearchResult
Returns:
caller context.

getAttributeTreeModel

public org.apache.myfaces.trinidad.model.TreeModel getAttributeTreeModel()
Get the attribute Tree Model.

Specified by:
getAttributeTreeModel in interface SearchResult
Returns:
attribute Tree Model.

getCategoryTreeItem

public TreeItem getCategoryTreeItem(SearchCategory cat)
Get the root level Tree Item for given category.

Specified by:
getCategoryTreeItem in interface SearchResult
Parameters:
cat - group to find.
Returns:
relevant tree item, one will be created if it does not exist.

getItemsCM

public org.apache.myfaces.trinidad.model.CollectionModel getItemsCM()
Get the CollectionModel used by the UI to show the results.

Specified by:
getItemsCM in interface SearchResult
Returns:
CollectionModel

getAttributeTreeItems

public java.util.List<TreeItem> getAttributeTreeItems()
Get the attribute tree items for this search. This method may return a copy, but is more likely to return the base structure so it can be passed between searches as the tree grows through user searches.

Specified by:
getAttributeTreeItems in interface SearchResult
Returns:
the list of tree items for the search

equals

public boolean equals(java.lang.Object obj)

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()

Overrides:
hashCode in class java.lang.Object

getSearchTabName

public java.lang.String getSearchTabName()
Get the search tab name.

Specified by:
getSearchTabName in interface SearchResult
Returns:
search tab name.

isSearched

public boolean isSearched()
Has the search been performed?

Specified by:
isSearched in interface SearchResult
Returns:
true is any search has been performed, false otherwise.

isUsesFilters

public boolean isUsesFilters()
Does this Search result support Attribute Filters?

Specified by:
isUsesFilters in interface SearchResult
Returns:
true is supports attribute filters.

setDisclosedRowKeys

public void setDisclosedRowKeys(org.apache.myfaces.trinidad.model.RowKeySet disclosedRowKeys)
Set the disclosed row keys for this result.

Specified by:
setDisclosedRowKeys in interface SearchResult
Parameters:
disclosedRowKeys - disclosed row keys.

getDisclosedRowKeys

public org.apache.myfaces.trinidad.model.RowKeySet getDisclosedRowKeys()
Get the disclosed row keys for this result.

Specified by:
getDisclosedRowKeys in interface SearchResult
Returns:
disclosed row keys.

isSaved

public boolean isSaved()
Was this search result originally a saved search? It may have been refreshed due to an attribute filter re-search, but this would not change the fact that it was originally run as a seved search.

Specified by:
isSaved in interface SearchResult
Returns:
true if was originally run as a saved search, false otherwise.

setSaved

public void setSaved(boolean wasSaved)
Set the initial saved stateof this search? It may have been refreshed due to an attribute filter re-search, but this would not change the fact that it was originally run as a seved search.

Specified by:
setSaved in interface SearchResult
Parameters:
wasSaved - if was originally run as a saved search, false otherwise.

getSearchCreationTime

public long getSearchCreationTime()
Get the time this class was created.

Specified by:
getSearchCreationTime in interface SearchResult
Returns:
millsecs since opoc since creation.

getApproxNumResultsStr

public java.lang.String getApproxNumResultsStr()
Get the heuristic number of results the searh engine estimates it can return as a String "1234 Resuts". This number is likely to be accurate for small numbers of results, but an estimate only for large results.

Specified by:
getApproxNumResultsStr in interface SearchResult
Returns:
String representing the estimated number of results it is possible to search.
See Also:
SearchResult.getApproxNumResults()

isInError

public boolean isInError()
Is this search in error, that is could not be performed and should not be shown.

Specified by:
isInError in interface SearchResult
Returns:
true if in error, false otherwise.

getErrorMessageName

public java.lang.String getErrorMessageName()
Obtain an error message name for the search, for cases where isInError() == true.

Specified by:
getErrorMessageName in interface SearchResult
Returns:
error message name from fnd_messages.

getWarningsList

public java.util.List<java.lang.String> getWarningsList()
Get any warnings from the search result.

Specified by:
getWarningsList in interface SearchResult
Returns:
any warnings.

addWarning

public void addWarning(java.lang.String warning)
Add a warning to the search result.

Specified by:
addWarning in interface SearchResult
Parameters:
warning - the warning text to show the user.

isWarnings

public boolean isWarnings()
Are there any warnings to show the user?

Specified by:
isWarnings in interface SearchResult
Returns:
true if any warnings, false if not.

Oracle Fusion Middleware extensions for Applications Core API Reference
11g Release 1 (11.1.2)

E22562-02

Copyright © 2011 Oracle. All Rights Reserved.