public final class Search extends Object
SearchSpecification,
AttributeSearchSpecification,
ContextSearchSpecification,
SearchResultObject| Modifier and Type | Field and Description |
|---|---|
protected Long |
m_Id
Id of server-side Search object.
|
protected SearchSpecification |
m_SearchSpecification
SearchSpecification defining Search.
|
protected LibrarySession |
m_Session
LibrarySession in which Search will execute.
|
| Modifier | Constructor and Description |
|---|---|
protected |
Search(LibrarySession sess,
Long searchObjectId)
Constructs a Search object.
|
|
Search(LibrarySession sess,
SearchSpecification sp)
Constructs a Search object.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the search.
|
static String |
convertAttributeName(ClassObject cls,
String attrName)
Helper Functions used by Qualifiers to convert attribute names from
old names to current names.
|
protected static void |
createView(LibrarySession sess,
ViewSpecification vsp) |
void |
dispose()
Disposes this Search.
|
String |
explainPlan(String planTable,
String planName,
boolean clearRows,
AttributeValue[] bindValues)
Generates the Query plan for the Search.
|
int |
getItemCount()
Returns the number of rows in search result.
|
int |
getItemCount(AttributeValue[] bindValues)
Returns the number of rows in search result.
|
int |
getItemCount(AttributeValue[] bindValues,
String language)
Returns the number of rows in search result.
|
int |
getItemCount(AttributeValue[] bindValues,
String language,
int timeout)
Returns the number of rows in search result.
|
int |
getItemCount(String language)
Returns the number of rows in search result.
|
SearchResultObject[] |
getItems()
Returns the all the rows in the Search Result.
|
SearchResultObject |
getItems(int index)
Returns the ith row in the Search Result.
|
LibraryObject[] |
getResolvedItems()
Returns the resolved objects for all the rows in the Search Result.
|
LibraryObject |
getResolvedItems(int index)
Returns the resolved object for the ith row in the Search Result.
|
SearchSpecification |
getSearchSpecification()
Returns the SearchSpecification of this Search.
|
String |
getSQL()
Returns the SQL query generated by the search.
|
SearchResultObject |
next()
Returns the next result row.
|
void |
open()
Opens the Search.
|
void |
open(AttributeValue[] bindValues)
Opens the Search.
|
void |
open(AttributeValue[] bindValues,
String language)
Opens the Search.
|
void |
open(AttributeValue[] bindValues,
String language,
int timeout)
Opens the Search.
|
void |
open(String language)
Opens the Search.
|
void |
open(String sqlHint,
AttributeValue[] bindValues)
Another variation of open.
|
void |
setSearchSpecification(SearchSpecification sp)
Set the SearchSpecification.
|
protected LibrarySession |
verifyConnected()
Ensure LibrarySession of this Search is valid.
|
protected SearchSpecification m_SearchSpecification
protected LibrarySession m_Session
protected Long m_Id
public Search(LibrarySession sess, SearchSpecification sp) throws IfsException
sess - LibrarySession in which Search will execute.sp - SearchSpecification defining Search. The SearchSpecification is cloned,
any changes in SearchSpecification after constructing a Search will not
be picked up.IfsException - 21000 if sess is not valid; 19001 if sp is not validprotected Search(LibrarySession sess, Long searchObjectId) throws IfsException
sess - LibrarySession in which Search will execute.searchObjectId - id of server-side Search Object. This contains the Specification
and is ready to execute it.IfsException - 21000 if sess is not validprotected static void createView(LibrarySession sess, ViewSpecification vsp) throws IfsException
IfsExceptionpublic void setSearchSpecification(SearchSpecification sp) throws IfsException
sp - SearchSpecification defining Search.IfsException - 19001 if sp is not validpublic SearchSpecification getSearchSpecification() throws IfsException
IfsException - if the operation failspublic String explainPlan(String planTable, String planName, boolean clearRows, AttributeValue[] bindValues) throws IfsException
planTable - The db table where the plan is stored.planName - A name for the planclearRows - If true, the planTable is cleared of the generated rows.bindValues - Bind values for the SearchIfsException - 22009 on errorSearchSpecificationpublic void open()
throws IfsException
IfsException - if the operation fails.public void open(String language) throws IfsException
language - language to be used for searchIfsException - if open failspublic void open(AttributeValue[] bindValues) throws IfsException
bindValues - array of late bound valuesIfsException - if open failspublic void open(AttributeValue[] bindValues, String language) throws IfsException
bindValues - array of late bound valueslanguage - language to be used for the searchIfsException - if open failspublic void open(AttributeValue[] bindValues, String language, int timeout) throws IfsException
bindValues - array of late bound valueslanguage - language to be used for the searchtimeout - search will timeout after this number of seconds;
if 0, the timeout is infinite.IfsException - if open failspublic void open(String sqlHint, AttributeValue[] bindValues) throws IfsException
sqlHint - Hint specified in Oracle Hint syntax. See Oracle Performance
and Tuning manual.bindValues - Bind ValuesIfsException - if open fails.public int getItemCount()
throws IfsException
IfsException - if the operation fails.public int getItemCount(String language) throws IfsException
language - language to be used for searchIfsException - if the operation fails.public int getItemCount(AttributeValue[] bindValues) throws IfsException
bindValues - array of late bound valuesIfsException - if the operation fails.public int getItemCount(AttributeValue[] bindValues, String language) throws IfsException
bindValues - array of late bound valueslanguage - language to be used for the searchIfsException - if the operation fails.public int getItemCount(AttributeValue[] bindValues, String language, int timeout) throws IfsException
bindValues - array of late bound valueslanguage - language to be used for the searchtimeout - search will timeout after this amount of time;
if 0, infinite timeout.IfsException - if the operation fails.public String getSQL() throws IfsException
IfsException - if the operation failspublic SearchResultObject next() throws IfsException
IfsException - IFS-22000 if there is no more rows in the search results.SearchResultObjectpublic SearchResultObject[] getItems() throws IfsException
IfsExceptionpublic SearchResultObject getItems(int index) throws IfsException
IfsExceptionpublic void close()
throws IfsException
IfsException - if operation failspublic void dispose()
throws IfsException
Dispose a search to fully release its resources. If opened, the Search is closed. Once disposed, the Search cannot be reopened.
IfsException - if the operation failspublic static String convertAttributeName(ClassObject cls, String attrName)
cls - attribute's classattrName - attributeNameprotected LibrarySession verifyConnected() throws IfsException
IfsException - 21000 if session is invalid.public LibraryObject[] getResolvedItems() throws IfsException
IfsExceptionpublic LibraryObject getResolvedItems(int index) throws IfsException
IfsExceptionCopyright © 2025. All rights reserved.