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

E22562-02

oracle.apps.fnd.applcore.globalSearch.ui.ecsf
Class ECSFSearchResultAdapter

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

public class ECSFSearchResultAdapter
extends AbstractSearchResult
implements java.io.Serializable

ECSF specific Search Results.

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

Field Summary
 
Fields inherited from class oracle.apps.fnd.applcore.globalSearch.ui.AbstractSearchResult
_allSearchableCategories, _attributeTreeItems, _attributeTreeModel, _callerContext, _errorMessageName, _inError, _searched, _searchedCategories, _searchFilterItems, _searchString
 
Fields inherited from interface oracle.apps.fnd.applcore.globalSearch.ui.SearchResult
BLOCK_SIZE
 
Constructor Summary
ECSFSearchResultAdapter(ECSFSavedSearch ss, java.lang.String searchTabName, java.util.List<SearchCategory> searchCategories, java.util.List<SearchCategory> allSearchableCategories, java.lang.String searchString, java.lang.String callerContext, boolean performInitialSearch, boolean usesFilters)
          Run a saved Search.
ECSFSearchResultAdapter(SearchResult base)
          Copy constructor that will duplicate the search structure, but not do a search.
ECSFSearchResultAdapter(java.lang.String searchTabName, java.util.List<SearchCategory> searchCategories, java.util.List<SearchCategory> allSearchableCategories, java.lang.String searchString, java.lang.String callerContext, boolean performInitialSearch, boolean usesFilters)
          Run a brand new Search.
 
Method Summary
static void addBIItem(java.util.List<SearchResultItem> resultItems, java.util.Map<java.lang.String,java.lang.Object> attributes, oracle.ecsf.IndexedDocument ecsfDocument, boolean rtl)
          add a Business Intelligence result item.
static void addItem(oracle.ecsf.SearchContext searchContext, java.util.List<SearchResultItem> resultItems, oracle.ecsf.IndexedDocument ecsfDocument, boolean rtl, ECSFSearchResultAdapter sra)
          Add ecsfDocument to the result list.
static void addWCItem(java.util.List<SearchResultItem> resultItems, java.util.Map<java.lang.String,java.lang.Object> fields, oracle.ecsf.IndexedDocument ecsfDocument, ECSFSearchResultAdapter sra)
          Add a Web Center Item.
 boolean allResultsRetrieved()
          Have all results been obtained from the search engine?
 SearchResult copySearch()
          Copy the search criteria, but do not perform a search.
 boolean equals(java.lang.Object obj)
          
 boolean extendSearchResults()
          Extend the search results.
 int getApproxNumResults()
          Get the heuristic number of results the searh engine estimates it can return.
 org.apache.myfaces.trinidad.model.TreeModel getAttributeTreeModel()
          Get the attribute Tree Model.
 int getCurrentNumberOfResults()
          Get the current number of group results.
 SearchResultItem getItem(int index)
          Get the search results result item at index i.
 int hashCode()
          
 void search()
          Run a search given the existing set of criteria, that is categories, search string and filters.
 
Methods inherited from class oracle.apps.fnd.applcore.globalSearch.ui.AbstractSearchResult
addWarning, containsAllSearchableCategories, getAllSearchableCategories, getApproxNumResultsStr, getAttributeTreeItems, getCallerContext, getCategoryTreeItem, getDisclosedRowKeys, getErrorMessageName, getItemsCM, getSearchCreationTime, getSearchedCategories, getSearchFilterItems, getSearchString, getSearchTabName, getWarningsList, isInError, isSaved, isSearched, isUsesFilters, isWarnings, setDisclosedRowKeys, setSaved
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ECSFSearchResultAdapter

public ECSFSearchResultAdapter(java.lang.String searchTabName,
                               java.util.List<SearchCategory> searchCategories,
                               java.util.List<SearchCategory> allSearchableCategories,
                               java.lang.String searchString,
                               java.lang.String callerContext,
                               boolean performInitialSearch,
                               boolean usesFilters)
Run a brand new Search.

Parameters:
searchTabName - Search Tab name.
searchCategories - user selected categories.
allSearchableCategories - list of allowed categories to search on. A superset of searchCategories.
searchString - user entered 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.
performInitialSearch - do we perform an initial search.
usesFilters - does this search use filters.

ECSFSearchResultAdapter

public ECSFSearchResultAdapter(ECSFSavedSearch ss,
                               java.lang.String searchTabName,
                               java.util.List<SearchCategory> searchCategories,
                               java.util.List<SearchCategory> allSearchableCategories,
                               java.lang.String searchString,
                               java.lang.String callerContext,
                               boolean performInitialSearch,
                               boolean usesFilters)
Run a saved Search.

Parameters:
ss - the search to run.
searchTabName - name of tab to go in.
searchCategories - categories to search.
allSearchableCategories - all possible categories.
searchString - user-entered search String.
callerContext - caller context - global or user-defined.
performInitialSearch - do we do the search inline with this call, or will a separate search()c all be required?
usesFilters - does this saved search use filters.

ECSFSearchResultAdapter

public ECSFSearchResultAdapter(SearchResult base)
Copy constructor that will duplicate the search structure, but not do a search.

Parameters:
base - search to copy.
Method Detail

copySearch

public 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.

Specified by:
copySearch in interface SearchResult
Returns:
a copy of the search, containing the search string, categories, and any other filters, but no search results.

search

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

Specified by:
search in interface SearchResult

addItem

public static void addItem(oracle.ecsf.SearchContext searchContext,
                           java.util.List<SearchResultItem> resultItems,
                           oracle.ecsf.IndexedDocument ecsfDocument,
                           boolean rtl,
                           ECSFSearchResultAdapter sra)
Add ecsfDocument to the result list. This method will determin what sort of result it is (apps, BI, Web Center) and process accordingly.

Parameters:
searchContext - ecsf search context.
resultItems - array of items to add to.
ecsfDocument - search result document.
rtl - are we right-to left.
sra - contining search result class.

addBIItem

public static void addBIItem(java.util.List<SearchResultItem> resultItems,
                             java.util.Map<java.lang.String,java.lang.Object> attributes,
                             oracle.ecsf.IndexedDocument ecsfDocument,
                             boolean rtl)
add a Business Intelligence result item.

Parameters:
resultItems - to add to.
attributes - search attributes.
ecsfDocument - the indexed document
rtl - are we in Right-to-Lef ot Left-to-Right mode.

addWCItem

public static void addWCItem(java.util.List<SearchResultItem> resultItems,
                             java.util.Map<java.lang.String,java.lang.Object> fields,
                             oracle.ecsf.IndexedDocument ecsfDocument,
                             ECSFSearchResultAdapter sra)
Add a Web Center Item. This item should come through as an External object with 1 action of type URL.

Parameters:
resultItems - collection to add result to.
fields - fields from SES.
ecsfDocument - doc.
sra - current search result adapter, primarily for adding counts to.

extendSearchResults

public boolean extendSearchResults()
Extend the search results. This method adds up to BLOCK_SIZE results to our current result set up to the getApproxNumResults().

Specified by:
extendSearchResults in interface SearchResult
Returns:
true if no error, false if major problem extending.

getCurrentNumberOfResults

public 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.

Specified by:
getCurrentNumberOfResults in interface SearchResult
Returns:
current number of group results

allResultsRetrieved

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

Specified by:
allResultsRetrieved in interface SearchResult
Returns:
true iff all results retrieved, false otherwise.

getApproxNumResults

public 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.

Specified by:
getApproxNumResults in interface SearchResult
Returns:
estimated number of results it is possible to search.

getItem

public 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.

Specified by:
getItem in interface SearchResult
Parameters:
index - 0 based index into results.
Returns:
valid item if available, null otherwise.

getAttributeTreeModel

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

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

equals

public boolean equals(java.lang.Object obj)

Overrides:
equals in class AbstractSearchResult

hashCode

public int hashCode()

Overrides:
hashCode in class AbstractSearchResult

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

E22562-02

Copyright © 2011 Oracle. All Rights Reserved.