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

E22562-02

oracle.apps.fnd.applcore.globalSearch.ui
Interface SearchResult

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
AbstractSearchResult, ECSFSearchResultAdapter

public interface SearchResult
extends java.io.Serializable

A Search Result.

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

Field Summary
static int BLOCK_SIZE
          The number of results requested from SES via ECSF.
 
Method Summary
 void addWarning(java.lang.String warning)
          Add a warning to the search result.
 boolean allResultsRetrieved()
          Have all results been obtained from the search engine?
 boolean containsAllSearchableCategories(java.util.List<SearchCategory> categories)
          Does the passed list of categories contain all of the Searchable categories.
 SearchResult copySearch()
          Copy the search criteria, but do not perform a search.
 boolean extendSearchResults()
          Extend the search results by calling the search engine.
 java.util.List<SearchCategory> getAllSearchableCategories()
          Get the list of all allowed categories the user can pick from.
 int getApproxNumResults()
          Get the heuristic number of results the searh engine estimates it can return.
 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 group)
          Get the root level Tree Item for given category.
 int getCurrentNumberOfResults()
          Get the current number of group results.
 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.
 SearchResultItem getItem(int index)
          Get the search results result item at index i.
 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.
 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 search()
          Run a search given the existing set of criteria, that is categories, search string and filters.
 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.
 

Field Detail

BLOCK_SIZE

static final int BLOCK_SIZE
The number of results requested from SES via ECSF. If this number is too large, there will be significant initial overhead in bringing up the search result. If it is too small, multiple search extensions will be performed, also slowing down the results coming up. This value MUST be at least twice the table fetchSize.

Refer: SearchResultCM AF_TABLE_FETCHSIZE and GlobalSearchResultTabDC.jsff af:table fetchSize attribute.

See Also:
SearchResultCM, Constant Field Values
Method Detail

getSearchCreationTime

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

Returns:
millsecs since opoc since creation.

copySearch

SearchResult copySearch()
Copy the search criteria, but do not perform a search. It is expected that a search will be performed soon after this call.

Returns:
a copy of the search, containing the search string, categories, and any other filters, but no search results.

getSearchFilterItems

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

Returns:
search filter items.

getSearchedCategories

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

Returns:
categories used in the search.

getAllSearchableCategories

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.

Returns:
categories used in the search.

containsAllSearchableCategories

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

Parameters:
categories - non-null List of SearchCategory.
Returns:
true if all, false otherwise.

getSearchString

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

Returns:
search String.

getCallerContext

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.

Returns:
caller context.

getAttributeTreeModel

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

Returns:
attribute Tree Model.

getCategoryTreeItem

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

Parameters:
group - group to find.
Returns:
relevant tree item, one will be created if it does not exist.

getItemsCM

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

Returns:
CollectionModel

getApproxNumResults

int getApproxNumResults()
Get the heuristic number of results the searh engine estimates it can return. This number is likely to be accurate for small numbers of results, but an estimate only for large results.

Returns:
estimated number of results it is possible to search.

getApproxNumResultsStr

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.

Returns:
String representing the estimated number of results it is possible to search.
See Also:
getApproxNumResults()

getCurrentNumberOfResults

int getCurrentNumberOfResults()
Get the current number of group results. This is the number that has already been obtained by the search engine, not the total number of heuristic hits the search engine may be able to return if asked.

Returns:
current number of group results

getItem

SearchResultItem getItem(int index)
Get the search results result item at index i. If this item is not available (i >= getCurrentNumberOfGroupResults()) null will be returned. In this case extendSearchResults() should be used to obtain more results.

Parameters:
index - 0 based index into results.
Returns:
valid item if available, null otherwise.

allResultsRetrieved

boolean allResultsRetrieved()
Have all results been obtained from the search engine?

Returns:
true iff all results retrieved, false otherwise.

extendSearchResults

boolean extendSearchResults()
Extend the search results by calling the search engine.

Returns:
true if no error, false if major problem extending.

isSearched

boolean isSearched()
Has the search been performed?

Returns:
true is any search has been performed, false otherwise.

search

void search()
Run a search given the existing set of criteria, that is categories, search string and filters.


getAttributeTreeItems

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.

Returns:
the list of tree items for the search

getSearchTabName

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

Returns:
search tab name.

isUsesFilters

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

Returns:
true is supports attribute filters.

setDisclosedRowKeys

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

Parameters:
disclosedRowKeys - disclosed row keys.

getDisclosedRowKeys

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

Returns:
disclosed row keys.

isSaved

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.

Returns:
true if was originally run as a saved search, false otherwise.

setSaved

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.

Parameters:
wasSaved - if was originally run as a saved search, false otherwise.

isInError

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

Returns:
true if in error, false otherwise.

getErrorMessageName

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

Returns:
error message name from fnd_messages.

getWarningsList

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

Returns:
any warnings.

addWarning

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

Parameters:
warning - the warning text to show the user.

isWarnings

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

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.