|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.ptc.windchill.cadx.search.IntegratedSearchTask
public class IntegratedSearchTask
Provides a search API for the client to use to get paged, sorted, and
integrated database and content searches. The session id is used to
get back the next page of a search that has already been executed. If
the session isn't accessed in a while the session id will be timed out
and the search results will not be available. After a search session
id is no longer needed then the closeSession method should be used to
close the session. The session id should be retrieved by using getSessionID
after a successful call to search. The session id should be saved and
then used to retrieve the next page if the IntegratedSearchTask instance
that initiated the search can not be saved. Calling search and specifying
a pageOffset will retrieve that page. The first page is offset of 0.
This class is being implemented to support the increased functionality
of the HTML Search for release 6. This class will be superseded in release
7 and will probably be deprecated in that release or shortly after.
Supported API: true
Extendable: false
| Field Summary | |
|---|---|
static String |
ALL_ITERATIONS
Supported API: true |
static String |
ALL_VERSIONS
Supported API: true |
| Constructor Summary | |
|---|---|
IntegratedSearchTask()
Get a new instance of IntegratedSearchTask to use for new searches. |
|
IntegratedSearchTask(long a_sessionID)
Get a new instance of IntegratedSearchTask to use with a previous paging session. |
|
| Method Summary | |
|---|---|
void |
clearSession()
Closes an older session and clears the session id and total size attributes in preparation for a new search. |
void |
closeSession()
Used to close a database paging session. |
QueryResult |
getPage(int offset,
int range,
Vector displayAttributes)
Get the specified page from an existing search results. |
long |
getSessionID()
Return the session id of this paging session. |
int |
getTotalSize()
Return the total number of objects in the search results. |
QueryResult |
search(Vector classnames,
Hashtable criteria,
String keyword,
Vector displayAttributes,
Vector sortKeys,
int pageOffset,
int pageRange,
String searchFilter,
Vector contentLibrary,
Locale locale)
Will execute a search against the content search engine and the database search using all of the parameters. |
QueryResult |
search(Vector classnames,
Hashtable criteria,
String keyword,
Vector displayAttributes,
Vector sortKeys,
int pageRange,
String searchFilter,
Vector contentLibrary,
Locale locale)
Will execute a search against the content search engine and the database search using all of the parameters. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String ALL_VERSIONS
public static final String ALL_ITERATIONS
| Constructor Detail |
|---|
public IntegratedSearchTask()
public IntegratedSearchTask(long a_sessionID)
a_sessionID - Session id for an existing paging session. Retrieved from a previous search of IntegratedSearchTask. Session ids will automatically time out if not used for a period of time. Paging sessions that are no longer needed should be closed.| Method Detail |
|---|
public void clearSession()
public void closeSession()
throws WTException
WTException
public QueryResult search(Vector classnames,
Hashtable criteria,
String keyword,
Vector displayAttributes,
Vector sortKeys,
int pageRange,
String searchFilter,
Vector contentLibrary,
Locale locale)
throws WTException
classnames - A list of the classes (of type Class not String) that this search will use in a compound search. All of the criteria attributes and the sorting attributes must be the same for each of the classes in the list. The sorting must be in the same order and the types of the attributes must be the same.criteria - A series of name value pairs of type String that specify the search criteria. The "keyword" name with a value for the string specifies the keyword used in the content search.keyword - String used to search against the content search engine. If this string is null no content search will be run. Set this string to null if there is no content search engine installed on the system.displayAttributes - List of attributes that are used to inflate the attribute values after a search.sortKeys - List of sort key strings that the results should be sorted in. The keys are ordered with the first sort key being the first in the list. The string is of the format:
pageRange - For the database paging of the search results this sets the size of a page.searchFilter - Can be set to either ALL_VERSIONS or ALL_ITERATIONS. The ALL_VERSIONS will return the latest iteration of each of the versions for the iterated object. ALL_ITERATIONS will return all iterations of all versions of the iterated object.contentLibrary - A list of the content libraries which the content search should be executed against.locale - Locale of the client that is executed this method.
WTException
public QueryResult search(Vector classnames,
Hashtable criteria,
String keyword,
Vector displayAttributes,
Vector sortKeys,
int pageOffset,
int pageRange,
String searchFilter,
Vector contentLibrary,
Locale locale)
throws WTException
classnames - A list of the classes (of type Class not String) that this search will use in a compound search. All of the criteria attributes and the sorting attributes must be the same for each of the classes in the list. The sorting must be in the same order and the types of the attributes must be the same.criteria - A series of name value pairs of type String that specify the search criteria. The "keyword" name with a value for the string specifies the keyword used in the content search.keyword - String used to search against the content search engine. If this string is null no content search will be run. Set this string to null if there is no content search engine installed on the system.displayAttributes - List of attributes that are used to inflate the attribute values after a search or retrieval of a page.sortKeys - List of sort key strings that the results should be sorted in. The keys are ordered with the first sort key being the first in the list. The string is of the format:
pageOffset - For the database paging of the search results this is the page offset into the results that is being requested. If the session id has been set to a valid session then a new query is not done but the offset is used to return a specific page of the query results. The first page is 0.pageRange - For the database paging of the search results this sets the size of a page.searchFilter - Can be set to either ALL_VERSIONS or ALL_ITERATIONS. The ALL_VERSIONS will return the latest iteration of each of the versions for the iterated object. ALL_ITERATIONS will return all iterations of all versions of the iterated object.contentLibrary - A list of the content libraries which the content search should be executed against.locale - Locale of the client that is executed this method.
WTException
public QueryResult getPage(int offset,
int range,
Vector displayAttributes)
throws WTException
offset - For the database paging of the search results this is the page offset into the results that is being requested. The first page is 0, the second is 1, ....range - For the database paging of the search results this sets the size of a page.displayAttributes - List of attributes that are used to inflate the attribute values after a search or retrieval of a page.
WTExceptionpublic long getSessionID()
public int getTotalSize()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||