com.webmethods.caf.faces.search.query
Interface ISearchQuery


public interface ISearchQuery

Interface that search query implementations must implement.


Method Summary
 void clear()
          Reset the query state back to the original values
 ISearchQuery cloneSearchQuery()
          Makes a clone of this search query
 Integer getInvocationID()
          Return the unique id of the search invocation, the search result portlet can use this id to determine if a new search has been executed.
 String getKeywordsField()
          Deprecated. use @link #getKeywordTerms() or @link #getNormalizedKeywordTerms() instead
 String[] getKeywordTerms()
          Gets the keywords field parsed into search terms.
 Integer getMaxResults()
          Get the maximum number of results allowed in the search results
 String[] getNormalizedKeywordTerms()
          Gets the keyword fields parsed into search terms and normalized.
 Map getRefineFields()
          Returns the map of refine field name/value pairs for the query
 Boolean getUseOrCondition()
          Return true to use an 'or' query or false for an 'and' query.
 void populateFromSearchStateString(String stateString)
          Populate this object with data deserialized from the stateString.
 void setInvocationID(Integer invokeID)
          Setter for the invocation id
 String toSearchStateString(ISearchStateOptions searchStateOptions)
          Serialize the search state to a string
 

Method Detail

getInvocationID

Integer getInvocationID()
Return the unique id of the search invocation, the search result portlet can use this id to determine if a new search has been executed. A new id is generated each time the user hits the 'Go' button in the searchbar control.

Returns:
the id of the search invocation or zero if no search has been executed yet.

setInvocationID

void setInvocationID(Integer invokeID)
Setter for the invocation id

Parameters:
invokeID - the invocation id

getMaxResults

Integer getMaxResults()
Get the maximum number of results allowed in the search results

Returns:
max results number

getKeywordsField

String getKeywordsField()
Deprecated. use @link #getKeywordTerms() or @link #getNormalizedKeywordTerms() instead

Gets the raw value of the keywords field

Returns:
the raw value of the keywords field

getKeywordTerms

String[] getKeywordTerms()
Gets the keywords field parsed into search terms. NOTE: this API does not normalize the search terms.

Returns:
the keyword terms for the query (not normalized)

getNormalizedKeywordTerms

String[] getNormalizedKeywordTerms()
Gets the keyword fields parsed into search terms and normalized.

Returns:
the normalized keyword terms for the query

getRefineFields

Map getRefineFields()
Returns the map of refine field name/value pairs for the query

Returns:
map of refined field name/value pairs

getUseOrCondition

Boolean getUseOrCondition()
Return true to use an 'or' query or false for an 'and' query.

Returns:
true for 'or' query false otherwise

clear

void clear()
Reset the query state back to the original values


cloneSearchQuery

ISearchQuery cloneSearchQuery()
Makes a clone of this search query


toSearchStateString

String toSearchStateString(ISearchStateOptions searchStateOptions)
Serialize the search state to a string

Parameters:
searchStateOptions - the options to use when writing the search state
Returns:
search state as a string

populateFromSearchStateString

void populateFromSearchStateString(String stateString)
Populate this object with data deserialized from the stateString.

Parameters:
stateString - the search state string (from toSearchStateString method)