Class SearchScope
- java.lang.Object
-
- com.filenet.api.query.SearchScope
-
public final class SearchScope extends java.lang.Object
Determines 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
Methods Modifier and Type Method and Description IndependentObjectSet
fetchObjects(SearchSQL searchSQL, java.lang.Integer pageSize, PropertyFilter filter, java.lang.Boolean continuable)
RetrievesIndependentObject
objects from the repository or repositories specified for this instance.IndependentObjectSet
fetchObjects(StoredSearch storedSearch, java.lang.String searchClauseFromClass, SearchTemplateParameters templateData, java.lang.Integer pageSize, PropertyFilter filter, java.lang.Boolean continuable)
RetrievesIndependentObject
objects from the repository or repositories specified for this instance based on a query generated from the XML for aStoredSearch
instance.RepositoryRowSet
fetchRows(SearchSQL searchSQL, java.lang.Integer pageSize, PropertyFilter filter, java.lang.Boolean continuable)
Retrieves rows of properties (Properties
objects) from the repository or repositories specified for this instance.RepositoryRowSet
fetchRows(StoredSearch storedSearch, java.lang.String searchClauseFromClass, SearchTemplateParameters templateData, java.lang.Integer pageSize, PropertyFilter filter, java.lang.Boolean continuable)
Retrieves rows of properties (Properties
objects) from the repository or repositories specified for this instance based on a query generated from the XML for aStoredSearch
instance.ClassDescriptionSet
fetchSearchableClassDescriptions(java.lang.String[] classNames, PropertyFilter filter)
RetrievesClassDescription
objects from the repository or repositories specified for this instance.MergeMode
getMergeMode()
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
- AnObjectStore
instance for the repository to be searched.
-
SearchScope
public SearchScope(ObjectStore[] objectStores, MergeMode mergeMode)
Use this when the scope is multiple object stores. TheMergeMode
object specifies whether to use the union or intersection of the object stores.- Parameters:
objectStores
- An array ofObjectStore
instances for the repositories to be searched.mergeMode
- AMergeMode
instance 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 (Properties
objects) from the repository or repositories specified for this instance.The following property settings can affect this method:
ObjectStore.DefaultQueryTimeLimit
ObjectStore.MaxQueryTimeLimit
ObjectStore.QueryDatabaseTimeout
ServerCacheCofiguration.QueryPageMaxSize
ServerCacheCofiguration.QueryPageDefaultSize
ServerCacheCofiguration.NonPagedQueryMaxSize
ServerCacheConfiguration.QueryCountDefaultSize
ServerCacheConfiguration.QueryCountMaxSize
You can optionally include a filter to control which properties to return with the object. If you pass in
null
for thefilter
parameter, this method returns values for all non-object properties and returns placeholders for all object-valued properties. For more information, see the description of thefilter
parameter.- Parameters:
searchSQL
- ASearchSQL
instance containing the SQL statement to use for the search.pageSize
- An integer indicating the maximum number ofProperties
objects per page to retrieve. This can benull
. When unspecified, the default page size (ServerCacheCofiguration.QueryPageDefaultSize
) is used.Note: If the
continuable
parameter isfalse
ornull
, thispageSize
value 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
- APropertyFilter
object 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 (PropertyEngineObject
properties with a state ofPropertyState.UNEVALUATED
orPropertyState.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
searchSQL
parameter 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 (searchSQL
parameter) is of type Object, the filter parameter will determine which properties are returned in that object.continuable
- ABoolean
value. Iffalse
ornull
, the query is not paged, thepageSize
parameter and the default page size inServerCacheCofiguration.QueryPageDefaultSize
are 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
continuable
value istrue
, the query can be continued. In this case, when the end of the first page is reached, a request for the next page ofProperties
objects is issued. Page requests iterate until all of theProperties
objects 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
searchSQL
parameter), 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
RepositoryRowSet
collection object containingRepositoryRow
objects 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 withnull
values.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)
RetrievesIndependentObject
objects from the repository or repositories specified for this instance.The following property settings can affect this method:
ObjectStore.DefaultQueryTimeLimit
ObjectStore.MaxQueryTimeLimit
ObjectStore.QueryDatabaseTimeout
ServerCacheCofiguration.QueryPageMaxSize
ServerCacheCofiguration.QueryPageDefaultSize
ServerCacheCofiguration.NonPagedQueryMaxSize
ServerCacheConfiguration.QueryCountDefaultSize
ServerCacheConfiguration.QueryCountMaxSize
- Parameters:
searchSQL
- ASearchSQL
instance 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
continuable
parameter isfalse
ornull
, thispageSize
value 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
- APropertyFilter
object 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 (PropertyEngineObject
properties with a state ofPropertyState.UNEVALUATED
orPropertyState.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
searchSQL
parameter 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 (searchSQL
parameter) is of typeObject
, the filter parameter will determine which properties are returned in that object.continuable
- ABoolean
value. Iffalse
ornull
, the query is not paged, thepageSize
parameter and the default page size inServerCacheCofiguration.QueryPageDefaultSize
are 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
continuable
value istrue
, the query can be continued. In this case, when the end of the first page is reached, a request for the next page ofEngineObject
objects is issued. Page requests iterate until all of theEngineObject
objects 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
searchSQL
parameter), 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
IndependentObjectSet
collection object containing theIndependentObject
objects 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 (Properties
objects) from the repository or repositories specified for this instance based on a query generated from the XML for aStoredSearch
instance.The following property settings can affect this method:
ObjectStore.DefaultQueryTimeLimit
ObjectStore.MaxQueryTimeLimit
ObjectStore.QueryDatabaseTimeout
ServerCacheCofiguration.QueryPageMaxSize
ServerCacheCofiguration.QueryPageDefaultSize
ServerCacheCofiguration.NonPagedQueryMaxSize
ServerCacheConfiguration.QueryCountDefaultSize
ServerCacheConfiguration.QueryCountMaxSize
- Parameters:
storedSearch
- AStoredSearch
instance containing the XML used to generate a query.searchClauseFromClass
- AString
indicating the class for the FROM clause of the query. The supported values aredocument
,folder
orcustomobject
.templateData
- ASearchTemplateParameters
object. Refer to theSearchTemplateParameters
documentation 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
continuable
parameter isfalse
ornull
, thispageSize
value 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
- APropertyFilter
object 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 (PropertyEngineObject
properties with a state ofPropertyState.UNEVALUATED
orPropertyState.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
StoredSearch
XML passed in thestoredSearch
parameter or in theSearchTemplateParameters
instance passed in thetemplateData
parameter, 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
- ABoolean
value. Iffalse
ornull
, the query is not paged, thepageSize
parameter and the default page size inServerCacheCofiguration.QueryPageDefaultSize
are 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
continuable
value istrue
, the query can be continued. In this case, when the end of the first page is reached, a request for the next page ofEngineObject
objects is issued. Page requests iterate until all of theEngineObject
objects satisfying the query are retrieved.Queries using continuation use the sort order specified in either the
StoredSearch
XML passed in thestoredSearch
parameter or in theSearchTemplateParameters
instance passed in thetemplateData
parameter. 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
RepositoryRowSet
collection object containingRepositoryRow
objects 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 withnull
values.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)
RetrievesIndependentObject
objects from the repository or repositories specified for this instance based on a query generated from the XML for aStoredSearch
instance.The following property settings can affect this method:
ObjectStore.DefaultQueryTimeLimit
ObjectStore.MaxQueryTimeLimit
ObjectStore.QueryDatabaseTimeout
ServerCacheCofiguration.QueryPageMaxSize
ServerCacheCofiguration.QueryPageDefaultSize
ServerCacheCofiguration.NonPagedQueryMaxSize
ServerCacheConfiguration.QueryCountDefaultSize
ServerCacheConfiguration.QueryCountMaxSize
You can optionally include a filter to control which properties to return with the object. If you pass in
null
for thefilter
parameter, this method returns values for all non-object properties and returns placeholders for all object-valued properties. For more information, see the description of thefilter
parameter.- Parameters:
storedSearch
- AStoredSearch
instance containing the XML used to generate a query.searchClauseFromClass
- AString
indicating the class for the FROM clause of the query. The supported values aredocument
,folder
orcustomobject
.templateData
- ASearchTemplateParameters
object. Refer to theSearchTemplateParameters
documentation 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
continuable
parameter isfalse
ornull
, thispageSize
value 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
- APropertyFilter
object 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 (PropertyEngineObject
properties with a state ofPropertyState.UNEVALUATED
orPropertyState.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
StoredSearch
XML passed in thestoredSearch
parameter or in theSearchTemplateParameters
instance passed in thetemplateData
parameter, 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
- ABoolean
value. Iffalse
ornull
, the query is not paged, thepageSize
parameter and the default page size inServerCacheCofiguration.QueryPageDefaultSize
are 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
continuable
value istrue
, the query can be continued. In this case, when the end of the first page is reached, a request for the next page ofEngineObject
objects is issued. Page requests iterate until all of theEngineObject
objects satisfying the query are retrieved.Queries using continuation use the sort order specified in either the
StoredSearch
XML passed in thestoredSearch
parameter or in theSearchTemplateParameters
instance passed in thetemplateData
parameter. 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
IndependentObjectSet
collection object containing theIndependentObject
objects retrieved. - See Also:
- SQL Syntax Reference
-
fetchSearchableClassDescriptions
public ClassDescriptionSet fetchSearchableClassDescriptions(java.lang.String[] classNames, PropertyFilter filter)
RetrievesClassDescription
objects 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
null
for thefilter
parameter, this method returns values for all non-object properties and returns placeholders for all object-valued properties. For more information, see the description of thefilter
parameter.- Parameters:
classNames
- AString
array 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 (inString
format).filter
- APropertyFilter
object 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 (PropertyEngineObject
properties with a state ofPropertyState.UNEVALUATED
orPropertyState.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
ClassDescriptionSet
collection object containingClassDescription
objects for the metadata retrieved.If the
SearchScope
instance references multiple repositories, properties that are not applicable to multiple repositories will not be present in theClassDescription
objects returned, nor in thePropertyDescription
objects contained in theseClassDescription
objects.For the
ClassDescription
objects returned, these properties are:- SuperclassDescription
- SuperclassPropertyCount
- ImmediateSubclassDescriptions
- NamePropertyIndex
- AllowsInstances
- PermissionDescriptions
- DefaultInstancePermissions
For the
PropertyDescription
objects contained in theClassDescription
objects, 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
MergeMode
instance 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
ObjectStore
instances for the repositories used as the search scope.
-
-