Class SearchScope
- java.lang.Object
-
- com.filenet.api.query.SearchScope
-
public final class SearchScope extends java.lang.ObjectDetermines which repository or repositories are to be searched, and supplies methods to execute searches for properties, objects, and class metadata (class descriptions).When multiple repositories are to be searched, use the
SearchScope(ObjectStore[], MergeMode)constructor to specify whether the scope is the union or intersection of the object stores.- See Also:
MergeMode,SearchSQL,PropertyFilter,StoredSearch
-
-
Constructor Summary
Constructors Constructor and Description SearchScope(ObjectStore objectStore)Use this when the scope is a single object store.SearchScope(ObjectStore[] objectStores, MergeMode mergeMode)Use this when the scope is multiple object stores.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description IndependentObjectSetfetchObjects(SearchSQL searchSQL, java.lang.Integer pageSize, PropertyFilter filter, java.lang.Boolean continuable)RetrievesIndependentObjectobjects from the repository or repositories specified for this instance.IndependentObjectSetfetchObjects(StoredSearch storedSearch, java.lang.String searchClauseFromClass, SearchTemplateParameters templateData, java.lang.Integer pageSize, PropertyFilter filter, java.lang.Boolean continuable)RetrievesIndependentObjectobjects from the repository or repositories specified for this instance based on a query generated from the XML for aStoredSearchinstance.RepositoryRowSetfetchRows(SearchSQL searchSQL, java.lang.Integer pageSize, PropertyFilter filter, java.lang.Boolean continuable)Retrieves rows of properties (Propertiesobjects) from the repository or repositories specified for this instance.RepositoryRowSetfetchRows(StoredSearch storedSearch, java.lang.String searchClauseFromClass, SearchTemplateParameters templateData, java.lang.Integer pageSize, PropertyFilter filter, java.lang.Boolean continuable)Retrieves rows of properties (Propertiesobjects) from the repository or repositories specified for this instance based on a query generated from the XML for aStoredSearchinstance.ClassDescriptionSetfetchSearchableClassDescriptions(java.lang.String[] classNames, PropertyFilter filter)RetrievesClassDescriptionobjects from the repository or repositories specified for this instance.MergeModegetMergeMode()Returns the merge mode used for this instance.ObjectStore[]getObjectStores()Returns the repositories used as the scope for this instance.
-
-
-
Constructor Detail
-
SearchScope
public SearchScope(ObjectStore objectStore)
Use this when the scope is a single object store.- Parameters:
objectStore- AnObjectStoreinstance for the repository to be searched.
-
SearchScope
public SearchScope(ObjectStore[] objectStores, MergeMode mergeMode)
Use this when the scope is multiple object stores. TheMergeModeobject specifies whether to use the union or intersection of the object stores.- Parameters:
objectStores- An array ofObjectStoreinstances for the repositories to be searched.mergeMode- AMergeModeinstance containing the mode (union or intersection) to use.
-
-
Method Detail
-
fetchRows
public RepositoryRowSet fetchRows(SearchSQL searchSQL, java.lang.Integer pageSize, PropertyFilter filter, java.lang.Boolean continuable)
Retrieves rows of properties (Propertiesobjects) from the repository or repositories specified for this instance.The following property settings can affect this method:
ObjectStore.DefaultQueryTimeLimitObjectStore.MaxQueryTimeLimitObjectStore.QueryDatabaseTimeoutServerCacheCofiguration.QueryPageMaxSizeServerCacheCofiguration.QueryPageDefaultSizeServerCacheCofiguration.NonPagedQueryMaxSizeServerCacheConfiguration.QueryCountDefaultSizeServerCacheConfiguration.QueryCountMaxSize
You can optionally include a filter to control which properties to return with the object. If you pass in
nullfor thefilterparameter, this method returns values for all non-object properties and returns placeholders for all object-valued properties. For more information, see the description of thefilterparameter.- Parameters:
searchSQL- ASearchSQLinstance containing the SQL statement to use for the search.pageSize- An integer indicating the maximum number ofPropertiesobjects per page to retrieve. This can benull. When unspecified, the default page size (ServerCacheCofiguration.QueryPageDefaultSize) is used.Note: If the
continuableparameter isfalseornull, thispageSizevalue is ignored.The number you specify here determines what constitutes a page of query result data. This value, in conjunction with the (Boolean) value you specify for the continuable parameter, can impact retrieval performance.
filter- APropertyFilterobject that represents information for controlling which property values (and with what level of detail and recursion) to return. Ifnull, this method returns values for all non-object properties and returns placeholders for all object-valued properties (PropertyEngineObjectproperties with a state ofPropertyState.UNEVALUATEDorPropertyState.REFERENCE); any subsequent attempts to access an object-valued property will cause an automatic round-trip to the server to fetch its value.The selection list in the
searchSQLparameter determines which top-level properties are returned. The property filter specified here determines the subproperties: the properties returned for the applicable top-level properties. For example, if a top-level property specified in the selection list (searchSQLparameter) is of type Object, the filter parameter will determine which properties are returned in that object.continuable- ABooleanvalue. Iffalseornull, the query is not paged, thepageSizeparameter and the default page size inServerCacheCofiguration.QueryPageDefaultSizeare ignored, and the query will return a number of rows limited by the following values:- The "TOP" value (if specified) in the selection list.
- The value of
ServerCacheCofiguration.NonPagedQueryMaxSize.
If this
continuablevalue istrue, the query can be continued. In this case, when the end of the first page is reached, a request for the next page ofPropertiesobjects is issued. Page requests iterate until all of thePropertiesobjects satisfying the query are retrieved.Queries using continuation use ORDER BY in their implementation. If an ORDER BY clause is not specified in the SQL statement (the
searchSQLparameter), an ORDER BY Id clause is used. If an ORDER BY clause is specified in the SQL statement, but does not contain the Id property, the Id property (having a unique value) is appended to the end of the ORDER BY clause. You should consider to what extent adding the Id property to the ORDER BY clause increases resource consumption for your application. Do not use a continuable query if it would cause a severe performance degradation.- Returns:
- A
RepositoryRowSetcollection object containingRepositoryRowobjects for each row of properties retrieved. All properties returned will have the names as specified in the SQL statement used for the query. Any properties that are not defined in a particular repository, will be returned withnullvalues.When the properties are retrieved from multiple repositories, the returned properties can be different than these same properties returned by other methods. This is because the same properties can exist on multiple repositories, yet have different values on each. When such properties are returned by a query across repositories, the property values are aggregated.
- See Also:
- SQL Syntax Reference
-
fetchObjects
public IndependentObjectSet fetchObjects(SearchSQL searchSQL, java.lang.Integer pageSize, PropertyFilter filter, java.lang.Boolean continuable)
RetrievesIndependentObjectobjects from the repository or repositories specified for this instance.The following property settings can affect this method:
ObjectStore.DefaultQueryTimeLimitObjectStore.MaxQueryTimeLimitObjectStore.QueryDatabaseTimeoutServerCacheCofiguration.QueryPageMaxSizeServerCacheCofiguration.QueryPageDefaultSizeServerCacheCofiguration.NonPagedQueryMaxSizeServerCacheConfiguration.QueryCountDefaultSizeServerCacheConfiguration.QueryCountMaxSize
- Parameters:
searchSQL- ASearchSQLinstance containing the SQL statement to use for the search.pageSize- An integer indicating the maximum number of objects per page to retrieve. This can benull. When unspecified, the default page size (ServerCacheCofiguration.QueryPageDefaultSize) is used.Note: If the
continuableparameter isfalseornull, thispageSizevalue is ignored.The number you specify here determines what constitutes a page of query result data. This value, in conjunction with the (Boolean) value you specify for the continuable parameter, can impact retrieval performance.
filter- APropertyFilterobject that represents information for controlling which property values (and with what level of detail and recursion) to return. Ifnull, this method returns values for all non-object properties and returns placeholders for all object-valued properties (PropertyEngineObjectproperties with a state ofPropertyState.UNEVALUATEDorPropertyState.REFERENCE); any subsequent attempts to access an object-valued property will cause an automatic round-trip to the server to fetch its value.The selection list in the
searchSQLparameter determines which top-level properties are returned. The property filter specified here determines the subproperties: the properties returned for the applicable top-level properties. For example, if a top-level property specified in the selection list (searchSQLparameter) is of typeObject, the filter parameter will determine which properties are returned in that object.continuable- ABooleanvalue. Iffalseornull, the query is not paged, thepageSizeparameter and the default page size inServerCacheCofiguration.QueryPageDefaultSizeare ignored, and the query will return a number of objects limited by the following values:- The "TOP" value (if specified) in the selection list.
- The value of
ServerCacheCofiguration.NonPagedQueryMaxSize.
If this
continuablevalue istrue, the query can be continued. In this case, when the end of the first page is reached, a request for the next page ofEngineObjectobjects is issued. Page requests iterate until all of theEngineObjectobjects satisfying the query are retrieved.Queries using continuation use ORDER BY in their implementation. If an ORDER BY clause is not specified in the SQL statement (the
searchSQLparameter), an ORDER BY Id clause is used. If an ORDER BY clause is specified in the SQL statement, but does not contain the Id property, the Id property (having a unique value) is appended to the end of the ORDER BY clause. You should to what extent adding the Id property to the ORDER BY clause increases resource consumption for your application. Do not use a continuable query if it would cause a severe performance degradation.- Returns:
- An
IndependentObjectSetcollection object containing theIndependentObjectobjects retrieved. - See Also:
- SQL Syntax Reference
-
fetchRows
public RepositoryRowSet fetchRows(StoredSearch storedSearch, java.lang.String searchClauseFromClass, SearchTemplateParameters templateData, java.lang.Integer pageSize, PropertyFilter filter, java.lang.Boolean continuable)
Retrieves rows of properties (Propertiesobjects) from the repository or repositories specified for this instance based on a query generated from the XML for aStoredSearchinstance.The following property settings can affect this method:
ObjectStore.DefaultQueryTimeLimitObjectStore.MaxQueryTimeLimitObjectStore.QueryDatabaseTimeoutServerCacheCofiguration.QueryPageMaxSizeServerCacheCofiguration.QueryPageDefaultSizeServerCacheCofiguration.NonPagedQueryMaxSizeServerCacheConfiguration.QueryCountDefaultSizeServerCacheConfiguration.QueryCountMaxSize
- Parameters:
storedSearch- AStoredSearchinstance containing the XML used to generate a query.searchClauseFromClass- AStringindicating the class for the FROM clause of the query. The supported values aredocument,folderorcustomobject.templateData- ASearchTemplateParametersobject. Refer to theSearchTemplateParametersdocumentation for a description of this parameter. This value may be null.pageSize- An integer indicating the maximum number of objects per page to retrieve. This can benull. When unspecified, the default page size (ServerCacheCofiguration.QueryPageDefaultSize) is used.Note: If the
continuableparameter isfalseornull, thispageSizevalue is ignored.The number you specify here determines what constitutes a page of query result data. This value, in conjunction with the (Boolean) value you specify for the continuable parameter, can impact retrieval performance.
filter- APropertyFilterobject that represents information for controlling which property values (and with what level of detail and recursion) to return. Ifnull, this method returns values for all non-object properties and returns placeholders for all object-valued properties (PropertyEngineObjectproperties with a state ofPropertyState.UNEVALUATEDorPropertyState.REFERENCE); any subsequent attempts to access an object-valued property will cause an automatic round-trip to the server to fetch its value.If a selection list is specified in either the
StoredSearchXML passed in thestoredSearchparameter or in theSearchTemplateParametersinstance passed in thetemplateDataparameter, that selection list determines which top-level properties are returned. The property filter specified here determines the subproperties: the properties returned for the applicable top-level properties. For example, if a top-level property specified in the selection list is of typeObject, the filter parameter will determine which properties are returned in that object.continuable- ABooleanvalue. Iffalseornull, the query is not paged, thepageSizeparameter and the default page size inServerCacheCofiguration.QueryPageDefaultSizeare ignored, and the query will return a number of objects limited by the following values:- The "TOP" value (if specified) in the selection list.
- The value of
ServerCacheCofiguration.NonPagedQueryMaxSize.
If this
continuablevalue istrue, the query can be continued. In this case, when the end of the first page is reached, a request for the next page ofEngineObjectobjects is issued. Page requests iterate until all of theEngineObjectobjects satisfying the query are retrieved.Queries using continuation use the sort order specified in either the
StoredSearchXML passed in thestoredSearchparameter or in theSearchTemplateParametersinstance passed in thetemplateDataparameter. If the sort order is not specified, the results are ordered by Id. If the sort order is specified, but does not contain the Id property, the Id property (having a unique value) is appended to the end of the sort order clause. You should consider to what extent adding the Id property to the sort order clause increases resource consumption for your application. Do not use a continuable query if it would cause a severe performance degradation.- Returns:
- A
RepositoryRowSetcollection object containingRepositoryRowobjects for each row of properties retrieved. All properties returned will have the names as specified in the SQL statement used for the query. Any properties that are not defined in a particular repository, will be returned withnullvalues.When the properties are retrieved from multiple repositories, the returned properties can be different than these same properties returned by other methods. This is because the same properties can exist on multiple repositories, yet have different values on each. When such properties are returned by a query across repositories, the property values are aggregated.
- See Also:
- SQL Syntax Reference
-
fetchObjects
public IndependentObjectSet fetchObjects(StoredSearch storedSearch, java.lang.String searchClauseFromClass, SearchTemplateParameters templateData, java.lang.Integer pageSize, PropertyFilter filter, java.lang.Boolean continuable)
RetrievesIndependentObjectobjects from the repository or repositories specified for this instance based on a query generated from the XML for aStoredSearchinstance.The following property settings can affect this method:
ObjectStore.DefaultQueryTimeLimitObjectStore.MaxQueryTimeLimitObjectStore.QueryDatabaseTimeoutServerCacheCofiguration.QueryPageMaxSizeServerCacheCofiguration.QueryPageDefaultSizeServerCacheCofiguration.NonPagedQueryMaxSizeServerCacheConfiguration.QueryCountDefaultSizeServerCacheConfiguration.QueryCountMaxSize
You can optionally include a filter to control which properties to return with the object. If you pass in
nullfor thefilterparameter, this method returns values for all non-object properties and returns placeholders for all object-valued properties. For more information, see the description of thefilterparameter.- Parameters:
storedSearch- AStoredSearchinstance containing the XML used to generate a query.searchClauseFromClass- AStringindicating the class for the FROM clause of the query. The supported values aredocument,folderorcustomobject.templateData- ASearchTemplateParametersobject. Refer to theSearchTemplateParametersdocumentation for a description of this parameter. This value may be null.pageSize- An integer indicating the maximum number of objects per page to retrieve. This can benull. When unspecified, the default page size (ServerCacheCofiguration.QueryPageDefaultSize) is used.Note: If the
continuableparameter isfalseornull, thispageSizevalue is ignored.The number you specify here determines what constitutes a page of query result data. This value, in conjunction with the (Boolean) value you specify for the continuable parameter, can impact retrieval performance.
filter- APropertyFilterobject that represents information for controlling which property values (and with what level of detail and recursion) to return. Ifnull, this method returns values for all non-object properties and returns placeholders for all object-valued properties (PropertyEngineObjectproperties with a state ofPropertyState.UNEVALUATEDorPropertyState.REFERENCE); any subsequent attempts to access an object-valued property will cause an automatic round-trip to the server to fetch its value.If a selection list is specified in either the
StoredSearchXML passed in thestoredSearchparameter or in theSearchTemplateParametersinstance passed in thetemplateDataparameter, that selection list determines which top-level properties are returned. The property filter specified here determines the subproperties: the properties returned for the applicable top-level properties. For example, if a top-level property specified in the selection list is of typeObject, the filter parameter will determine which properties are returned in that object.continuable- ABooleanvalue. Iffalseornull, the query is not paged, thepageSizeparameter and the default page size inServerCacheCofiguration.QueryPageDefaultSizeare ignored, and the query will return a number of objects limited by the following values:- The "TOP" value (if specified) in the selection list.
- The value of
ServerCacheCofiguration.NonPagedQueryMaxSize.
If this
continuablevalue istrue, the query can be continued. In this case, when the end of the first page is reached, a request for the next page ofEngineObjectobjects is issued. Page requests iterate until all of theEngineObjectobjects satisfying the query are retrieved.Queries using continuation use the sort order specified in either the
StoredSearchXML passed in thestoredSearchparameter or in theSearchTemplateParametersinstance passed in thetemplateDataparameter. If the sort order is not specified, the results are ordered by Id. If the sort order is specified, but does not contain the Id property, the Id property (having a unique value) is appended to the end of the sort order clause. You should consider to what extent adding the Id property to the sort order clause increases resource consumption for your application. Do not use a continuable query if it would cause a severe performance degradation.- Returns:
- An
IndependentObjectSetcollection object containing theIndependentObjectobjects retrieved. - See Also:
- SQL Syntax Reference
-
fetchSearchableClassDescriptions
public ClassDescriptionSet fetchSearchableClassDescriptions(java.lang.String[] classNames, PropertyFilter filter)
RetrievesClassDescriptionobjects from the repository or repositories specified for this instance.You can optionally include a filter to control which properties to return with the object. If you pass in
nullfor thefilterparameter, this method returns values for all non-object properties and returns placeholders for all object-valued properties. For more information, see the description of thefilterparameter.- Parameters:
classNames- AStringarray of the names of the classes to retrieve. The class names can be the symbolic name, the display name, or the object ID for the class (inStringformat).filter- APropertyFilterobject that represents information for controlling which property values (and with what level of detail and recursion) to return. Ifnull, this method returns values for all non-object properties and returns placeholders for all object-valued properties (PropertyEngineObjectproperties with a state ofPropertyState.UNEVALUATEDorPropertyState.REFERENCE); any subsequent attempts to access an object-valued property will cause an automatic round-trip to the server to fetch its value.- Returns:
- A
ClassDescriptionSetcollection object containingClassDescriptionobjects for the metadata retrieved.If the
SearchScopeinstance references multiple repositories, properties that are not applicable to multiple repositories will not be present in theClassDescriptionobjects returned, nor in thePropertyDescriptionobjects contained in theseClassDescriptionobjects.For the
ClassDescriptionobjects returned, these properties are:- SuperclassDescription
- SuperclassPropertyCount
- ImmediateSubclassDescriptions
- NamePropertyIndex
- AllowsInstances
- PermissionDescriptions
- DefaultInstancePermissions
For the
PropertyDescriptionobjects contained in theClassDescriptionobjects, these properties are:- IsSystemGenerated
- IsReadOnly
- IsHidden
- PropertyDefaultObject
- PropertySelectionsObject
- RequiredClass
- ReflectivePropertyId
-
getMergeMode
public MergeMode getMergeMode()
Returns the merge mode used for this instance. The merge mode defaults to UNION when unspecified.- Returns:
- A
MergeModeinstance containing the mode (union or intersection) used.
-
getObjectStores
public ObjectStore[] getObjectStores()
Returns the repositories used as the scope for this instance.- Returns:
- The array of
ObjectStoreinstances for the repositories used as the search scope.
-
-