Project: stp

com.ibm.rational.wvcm.stp.cq
Interface CqUserDb.SearchFilter

Enclosing interface:
CqUserDb

public static interface CqUserDb.SearchFilter

A collection of SearchKey/target-value pairs that collectively define the filter for selecting objects for inclusion in a full-text search. In general, an object must match all of the given keys in the filter to be added to the result set. The only exception to this rule are the CqRecordType keys. If more than one CqRecordType key is present, the object needs only match one of them to be a candidate for the result set--the object would need to match all the other types of keys to actually be selected.


Method Summary
<U> List<U>
add(CqUserDb.SearchKey<List<U>> key, U targetItem)
          Extends the target value list associated with a SearchKey by a single item.
 void clear()
          Removes all SearchKey entries from this SearchFilter
<U> U
get(CqUserDb.SearchKey<U> key)
          Returns the target value currently associated with a given SearchKey
 List<Map.Entry<CqUserDb.SearchKey<Object>,Object>> getAll()
           
 List<Map.Entry<CqUserDb.DateLimit,Date>> getDateFilters()
           
<U> List<Map.Entry<CqUserDb.SearchKey<U>,U>>
getEntries(Class<U> type)
          Retrieves SearchKey/target-value pairs of a given target-value type
<V extends CqUserDb.SearchKey<U>,U>
List<Map.Entry<V,U>>
getEntriesByKey(Class<V> keyType)
          Retrieves SearchKey/target-value pairs by SearchKey type
 List<Map.Entry<CqFieldDefinition,List<String>>> getFieldFilters()
           
 List<Map.Entry<CqRecordType,Boolean>> getRecordTypeFilters()
           
 Map.Entry<CqUserDb.SearchLevel,String> getStringFilter()
           
 List<Map.Entry<CqUserDb.WordMode,List<String>>> getWordFilters()
           
<U> U
put(CqUserDb.SearchKey<U> key, U targetValue)
          Adds a SearchKey and its target value to the full text search filter.
 

Method Detail

add

<U> List<U> add(CqUserDb.SearchKey<List<U>> key,
                U targetItem)
Extends the target value list associated with a SearchKey by a single item.

Type Parameters:
U - The type of item in a target value list; currently must be String.
Parameters:
key - The SearchKey whose target value list is to be extended. The SeachKey does not need to already be in the SearchFilter. Currently the SearchKey must be a WordMode enumerator or a CqFieldDefinition proxy.
targetItem - The new item to be added to the target value list
Returns:
The target value list after modification.

clear

void clear()
Removes all SearchKey entries from this SearchFilter


get

<U> U get(CqUserDb.SearchKey<U> key)
Returns the target value currently associated with a given SearchKey

Type Parameters:
U - The data type used to specify the value against which the key attribute will be compared. This type must match the type parameter of the key used and so currently this must be String, List<String>, Date, or Boolean.
Parameters:
key - A SearchKey object representing the attribute of each candidate record that the search should filter on. Currently this may be a SearchLevel enumerator, a DateLimit enumerator, a WordMode enumerator, a CqRecordType proxy, or a CqFieldDefinition proxy.
Returns:
The value currently associated with the given key in this search filter; null if no association is currently defined.

getAll

List<Map.Entry<CqUserDb.SearchKey<Object>,Object>> getAll()
Returns:
A List of all the SearchKey/target-values pairs defined by this SearchFilter.

getDateFilters

List<Map.Entry<CqUserDb.DateLimit,Date>> getDateFilters()
Returns:
A list of the DateLimit entries of this SearchFilter; will never be null but the list may be empty.

getEntries

<U> List<Map.Entry<CqUserDb.SearchKey<U>,U>> getEntries(Class<U> type)
Retrieves SearchKey/target-value pairs of a given target-value type

Type Parameters:
U - The data type used to specify the value against which the key attribute will be compared. This type must match the type parameter of a defined SearchKey and so currently this must be String, List<String>, Date, or Boolean.
Parameters:
type - The Class object for the desired target-value data type.
Returns:
All of the entries in this SearchFilter whose target value type matches the given type. The result will never be null, but the returned list may be empty.

getEntriesByKey

<V extends CqUserDb.SearchKey<U>,U> List<Map.Entry<V,U>> getEntriesByKey(Class<V> keyType)
Retrieves SearchKey/target-value pairs by SearchKey type

Type Parameters:
U - The data type used to specify the value against which the key attribute will be compared. This type must match the type parameter of a defined SearchKey and so currently this must be String, List<String>, Date, or Boolean.
V - A subclass of SearchKey
Parameters:
keyType - The type of keys to retrieve from this search specification
Returns:
All entries of this SearchFilter whose key is of the specified type. The result will never be null, but the returned list may be empty.

getFieldFilters

List<Map.Entry<CqFieldDefinition,List<String>>> getFieldFilters()
Returns:
A list of the CqFieldDefinition entries of this SearchFilter; will never be null but the list may be empty.

getRecordTypeFilters

List<Map.Entry<CqRecordType,Boolean>> getRecordTypeFilters()
Returns:
A list of the CqRecordType entries of this SearchFilter; will never be null but the list may be empty.

getStringFilter

Map.Entry<CqUserDb.SearchLevel,String> getStringFilter()
Returns:
The SearchLevel entry of this SearchFilter; otherwise null

getWordFilters

List<Map.Entry<CqUserDb.WordMode,List<String>>> getWordFilters()
Returns:
A list of the WordMode entries of this SearchFilter; will never be null but the list may be empty.

put

<U> U put(CqUserDb.SearchKey<U> key,
          U targetValue)
Adds a SearchKey and its target value to the full text search filter. Each SearchKey specifies what attribute of an object is to be filtered on and the target value specifies the value against which the attribute value will be compared for possible inclusion in the result set.

Type Parameters:
U - The data type used to specify the target value. This type must match the type parameter of the key used and so currently this must be String, List<String>, Date, or Boolean.
Parameters:
key - A SearchKey<U> object representing the attribute of each candidate object that the search should filter on. Currently this may be a SearchLevel enumerator, a DateLimit enumerator, a WordMode enumerator, a CqRecordType proxy, or a CqFieldDefinition proxy.
targetValue - An instance of class U that specifies which values of the key attribute will select or reject a record in the search. If this value is null (or Boolean.FALSE) the corresponding SearchKey will be removed from the search specification.
Returns:
The value previously associated with the SearchKey.

Generated Tue 10-Jun-2014 09:00 AM

Copyright © IBM 2014. All rights reserved.