net.rim.device.api.unifiedsearch
Class SearchFieldCriteria

java.lang.Object
  extended by net.rim.device.api.unifiedsearch.SearchFieldCriteria

public class SearchFieldCriteria
extends Object

Maps search keywords to specific search fields. Use this to describe the data in a SearchableEntity when you register your data in the Unified Search Framework.

Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 6.0.0

Constructor Summary
Category: Signed SearchFieldCriteria(SearchField field, String[] phrases)
          Maximum allowed phrases that RIM apps can associate.
 
Method Summary
Category: Signed  SearchField getField()
          Returns the SearchField instance associated with this object.
Category: Signed  String[] getPhrases()
          Returns the search phrases.
Category: Signed  String toString()
          Returns a String containing the search criteria.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 



Constructor Detail

SearchFieldCriteria

public SearchFieldCriteria(SearchField field,
                           String[] phrases)
Maximum allowed phrases that RIM apps can associate. The current value is 16. Initializes a new instance of SearchFieldCriteria. Note that the Unified Search Framework trims leading and trailing white space in phrases.

Parameters:
field - The SearchField instance associated with this object.
phrases - An array of String objects conataining search phrases.

Note that the framework trims leading and trailing white space in phrases. The framework combines keywords within a phrase using a logical AND operation. Search results for phrases are combined using a logical OR operation.

Throws:
IllegalArgumentException -

  • If the field parameter is null.
  • If the phrases array is null.
  • If the phrases array is empty.
  • If the phrases array contains null.
  • If the phrases array contains empty strings.
  • If there are more than eight members of the phrase array.

Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 6.0.0


Method Detail

getField

public SearchField getField()
Returns the SearchField instance associated with this object.

Returns:
An instance of SearchField.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 6.0.0

getPhrases

public String[] getPhrases()
Returns the search phrases.

Returns:
An array containing the search phrases.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 6.0.0

toString

public String toString()
Returns a String containing the search criteria.

Overrides:
toString in class Object
Returns:
A String containing the search criteria.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 6.0.0





Copyright 1999-2010 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.