Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.ifs.fdk
Class SearchManager

All Superinterfaces:
  java.rmi.Remote

All Known Implementing Classes:
  CoreSearchManager, SearchManagerImpl

    public interface class SearchManager

extends java.rmi.Remote

The search management interface.

Method Summary
`NamedValue[]` | `executeSelect(NamedValue priTarget, NamedValue[] auxTargets, java.lang.String searchCondition, java.lang.String sortCondition, NamedValue[] bindVals, NamedValue[] options, AttributeRequest[] attrReqs)` Executes a search using a prepared selector.
`int` | `executeSelectCount(NamedValue priTarget, NamedValue[] auxTargets, java.lang.String searchCondition, NamedValue[] bindVals, NamedValue[] options)` Executes a search to obtain the result count using a prepared selector.
`NamedValueSet[]` | `getProperties()` Returns the property information for the seach properties.
`NamedValue[]` | `search(SearchExpression expr, NamedValue[] options, AttributeRequest[] attrReqs)` Performs a search.

Method Detail

### search

    NamedValue[] search(SearchExpression expr,
                        NamedValue[] options,
                        AttributeRequest[] attrReqs)
                        throws FdkException

  Description copied from interface: `SearchManager`
  Performs a search. The search conditions are specified by a SearchExpression and this method returns an array of Items for the search results.

  Parameters:
    `expr` - the query expression for the search represented as a SearchExpression
    `options` - the options for the search:
    - Options.FOLDER_RESTRICTION - A Long or a long[] specifying the id or ids of folders that the search should be restricted to; also accepts a String or a String[] specifying the PATH or PATHs of folders that the search should be restricted to.
    - Options.MULTILEVEL_FOLDER_RESTRICTION - A Boolean specifying if the folder restriction limits the search to just the specified folder, or the specified folder and all sub-folders. Default is TRUE, include all sub-folders.
    - Options.SEARCH_LANGUAGE - A string specifying the language used for parsing the content search criteria. The language is used when parsing words in the content search criteria. This is independent of the document language attribute and does not restrict the search based on the document language. Default is the users default language.
    - Options.SEARCH_FOR_DOCUMENTS - A Boolean specifying if documents and links should be returned by the search. Default is TRUE, the search will return documents and links.
    - Options.SEARCH_FOR_FOLDERS - A Boolean specifying if folders should be returned by the search. Default is TRUE, the search will return folders.
    - Options.SEARCH_VERSION_HISTORY - A Boolean specifying if previous versions of versioned documents should be returned by the search. Default is FALSE, only the current version is returned.
    - Options.SEARCH_RECORDS - A Boolean specifying if the search should search records instead of documents. Default is FALSE, the search should perform a regular search for documents and folders.
    - Options.SEARCH_RECORDS_CLASSNAME - A String specifying the internal classname for the record category or record folder type. The records search will be restricted to records of the specified type. The string is specified in the format "[ record_class_name ]". Default is NULL, the search will find records of any type.
    - Options.SEARCH_ARCHIVE_FOR_WORKSPACE - A String specifying the name of a workspace. The archive will be searched for items deleted from the specified workspace. Wildcards * and ? are allowed. Default is NULL. The user must be a content administrator and the session must be in admin mode in order to perform an archive search.
    - Options.SEARCH_ARCHIVE_DELETED_RANGE - A Date[2] specifying the starting and ending dates of a date range. The archive will be searched for items deleted within the specified range. The starting or ending date of the date range may be null. Default is NULL. The user must be a content administrator and the session must be in admin mode in order to perform an archive search.
    - Options.DATE_COMP_LEVEL - An Integer which specifies the precision used for date comparisons in date search criteria. Allowed values are defined by the DATE_COMP_xxx constants in FdkConstants. The default is FdkConstants.DATE_COMP_DAY which will compare dates based on the day.
    - Options.RETURN_FROM - An Integer specifying the starting index for returning results. Default is 1 to return items starting from the first search result.
    - Options.RETURN_COUNT - An Integer specifying the maximum number of items to return for the search results. Default is to return all search results.
    - Options.PRIMARY_SORT_ATTRIBUTE - A String specifying the attribute for sorting. Only attributes that are allowed in a search expression and the value FdkConstants.TEXT_SCORE are allowed to be specified for the sort attribute.
    - Options.PRIMARY_SORT_DIRECTION - A Boolean specifying the sort order. Default is TRUE for ascending.
    - Options.SECONDARY_SORT_ATTRIBUTE - A String specifying the attribute for sorting. Only attributes that are allowed in a search expression and the value FdkConstants.TEXT_SCORE are allowed to be specified for the sort attribute.
    - Options.SECONDARY_SORT_DIRECTION - A Boolean specifying the sort order. Default is TRUE for ascending.
    `attrReqs` - the requested attributes for each item, or null.
  Returns:
    A NamedValue array with the following attributes:
    - Options.SEARCH_RESULTS - An Item array representing the items returned by the search or null if no results were returned.
    - Options.SEARCH_RESULT_COUNT - An Integer representing an estimate of the total number of search results.
    - Options.SEARCH_TEXT_SCORES - An int array containing the text search scores. This is only returned for text contains searches.
  Throws:
    `FdkException` - if the operation fails
  See Also:
    `SearchExpression`

### getProperties

    NamedValueSet[] getProperties()
                                  throws FdkException

  Description copied from interface: `SearchManager`
  Returns the property information for the seach properties.

  Returns:
    A NamedValueSet array; each entry in the array is a named value set containing the following attributes:
    - Attributes.SEARCH_PROPERTY_NAME
    - Attributes.SEARCH_PROPERTY_DISPLAY_NAME
    - Attributes.SEARCH_PROPERTY_TYPE
    - Attributes.SEARCH_PROPERTY_SEARCHABLE
    - Attributes.SEARCH_PROPERTY_SELECTABLE
    - Attributes.SEARCH_PROPERTY_SORTABLE
    - Attributes.SEARCH_PROPERTY_LOV (if applicable)
    May return null.
  Throws:
    `FdkException` - if the operation fails

### executeSelect

    NamedValue[] executeSelect(NamedValue priTarget,
                               NamedValue[] auxTargets,
                               java.lang.String searchCondition,
                               java.lang.String sortCondition,
                               NamedValue[] bindVals,
                               NamedValue[] options,
                               AttributeRequest[] attrReqs)
                               throws FdkException

  Description copied from interface: `SearchManager`
  Executes a search using a prepared selector.

  Parameters:
    `priTarget` - the primary search target
    `auxTargets` - the auxiliary search targets (can be null)
    `searchCondition` - the search condition (may include functions)
    `sortCondition` - the sort condition (may include functions)
    `bindVals` - the statement bind values
    `options` - the search options
    `attrReqs` - the requested attributes for each search result item returned (can be null).
  Returns:
    Query expression Search targets are specified as NamedValues where the name is the classname and the value is the class alias. Both values are required (cannot be null). When specifying bind values, the order of elements in the NamedValue array is criticial. Consider the clause: WHERE createdate > ? AND name like ? The NamedValue instance containing the date component must be the first entry in the bindValues NamedValue array, the NamedValue instance containing the name component must be the second entry in the array. Note that only the value component of the NamedValue is leveraged for bindValues. The name component is ignored (can be null). Functions that can be leveraged include: LITERAL, EXACT_TYPE, ATTR, SEARCH_TARGET, CONTAINS, CONTENT_SIZE, LATEST_VERSION, CATEGORY_JOIN, RELATION_JOIN, IN_FOLDER, UNDER_FOLDER, IN_TRASH, IN_ARCHIVE, and EXISTS. Options that can be supplied: Options.STATEMENT_CACHING_KEY - prepared statement caching key
    Options.SEARCH_DISTINCT - use a distinct search (avoid duplicate results)
    Options.SEARCH_LANGUAGE - the language used for parsing the content search criteria. The language is used when parsing words in the content search criteria. This is independent of the document language attribute and does not restrict the search based on the document language. Examples: AMERICAN, CZECH, ENGLISH, GERMAN, LATIN AMERICAN SPANISH, TRADITIONAL CHINESE.
    Options.MAX_RESULTS - Restrict maximum results returned: a value of 0 indicates no restriction.
    Options.STARTING_ROW - Row index of initial result to be returned: a value of 1 indicates no results are skipped.
    e.g if MAX_RESULTS = 10 and STARTING_ROW = 50, then results from row 50 through 59 are returned (if located).

    Note: Bind Variables must be leveraged at every opportunity to minimize possibility of a SQL injection attack (should unprocessed end-user supplied data be provided to the query).

  Throws:
    `FdkException` - if the operation fails;

### executeSelectCount

    int executeSelectCount(NamedValue priTarget,
                           NamedValue[] auxTargets,
                           java.lang.String searchCondition,
                           NamedValue[] bindVals,
                           NamedValue[] options)
                           throws FdkException

  Description copied from interface: `SearchManager`
  Executes a search to obtain the result count using a prepared selector.

  Parameters:
    `priTarget` - the primary search target
    `auxTargets` - the auxiliary search targets (can be null)
    `searchCondition` - the search condition (may include functions)
    `bindVals` - the statement bind values
    `options` - the search options
  Returns:
    search result count Search targets are specified as NamedValues where the name is the classname and the value is the class alias. Both values are required (cannot be null). When specifying bind values, the order of elements in the NamedValue array is criticial. Consider the clause: WHERE createdate > ? AND name like ? The NamedValue instance containing the date component must be the first entry in the bindValues NamedValue array, the NamedValue instance containing the name component must be the second entry in the array. Note that only the value component of the NamedValue is leveraged for bindValues. The name component is ignored (can be null). Functions that can be leveraged include: LITERAL, EXACT_TYPE, ATTR, SEARCH_TARGET, CONTAINS, CONTENT_SIZE, LATEST_VERSION, CATEGORY_JOIN, RELATION_JOIN, IN_FOLDER, UNDER_FOLDER, IN_TRASH, IN_ARCHIVE, and EXISTS. Options that can be supplied: Options.STATEMENT_CACHING_KEY - prepared statement caching key
    Options.SEARCH_DISTINCT - use a distinct search (avoid duplicate results)

    Note: Bind Variables must be leveraged at every opportunity to minimize possibility of a SQL injection attack (should unprocessed end-user supplied data be provided to the query).

  Throws:
    `FdkException` - if the operation fails;

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD