public final class S_Selector extends Object
Modifier and Type | Field and Description |
---|---|
protected S_LibraryObjectCursor |
m_Cursor
The open cursor
|
Modifier | Constructor and Description |
---|---|
|
S_Selector(S_LibrarySession session)
Construct a Selector object.
|
protected |
S_Selector(S_LibrarySession session,
String searchClass,
String searchSelection)
Construct a Selector object.
|
Modifier and Type | Method and Description |
---|---|
void |
closeItems()
Closes the search after cursor based access.
|
protected static S_LibraryObject |
constructLibraryObject(S_LibrarySession sess,
S_LibraryObjectData data)
Constructs a Library Object from data corresponding to it.
|
protected static Vector |
constructLibraryObjectVector(S_LibrarySession sess,
Vector vector)
Constructs a vector of library objects using a vector of data
corresponding to them.
|
Long |
getId()
Returns the object's numeric ID.
|
int |
getItemCount()
Returns the number of items in the search results.
|
S_LibraryObject[] |
getItems()
Returns the entire search results as an array.
|
S_LibraryObject |
getItems(int index)
Returns a single search result item from the search results
with an index relatitve the the search sort order.
|
int |
getMaxItemCount()
Returns the setting of the maximum number of items that will be returned in a
getItems() invocation.
|
int |
getMaxItems()
Gets the value of the maximum number of items fetched limit.
|
String |
getSearchClassname()
Returns the search class that was set using setSearchClassname()
|
String |
getSearchSelection()
Returns the search selection that was set using setSearchSelection()
|
S_LibrarySession |
getSession()
Returns the session being used by this Selector.
|
SortSpecification |
getSortSpecification()
Returns the Sort Specification
|
boolean |
isMaxItemsExceeded()
Returns true if the maximum number of items fetched limit
has been exceeded during the last call to getItems().
|
boolean |
isRecursiveSearch()
Returns true if recursive searching is enabled with respect to classes.
|
S_LibraryObject |
nextItem()
Gets the next item using an open cursor on the search.
|
void |
openItems()
Opens a cursor on this Search ready for reading search results.
|
void |
resetItems()
Clears locally stored search results.
|
protected void |
resolveSortSpecification(S_LibrarySession session)
force the SortSpecification (if specified) to be resolved and
verified.
|
protected void |
setId(Long id)
Sets the object's numeric ID.
|
void |
setMaxItemCount(int maxItemCount)
Sets the maximum number of items that will be returned in a
getItems() invocation.
|
void |
setMaxItems(int maxItems)
Sets the maximum number of items fetched limit
when the getItems() methods are called.
|
void |
setRecursiveSearch(boolean recursive)
Enables/disables recursive searching with respect to classes.
|
void |
setSearchClassname(String searchClass)
Sets the search class.
|
void |
setSearchSelection(String searchSelection)
Sets the search selection.
|
void |
setSortSpecification(SortSpecification spec)
Sets the Sort Specification
|
protected static S_LibraryObject |
vectorObjectElement(Vector vector,
int index)
Returns a particular LibraryObject from the vector based
on the index supplied by the user.
|
protected static S_LibraryObject[] |
vectorToObjectArray(Vector vector)
Constructs a vector of objects from an array of Library objects.
|
protected S_LibraryObjectCursor m_Cursor
public S_Selector(S_LibrarySession session) throws IfsException
session
- the current session.IfsException
protected S_Selector(S_LibrarySession session, String searchClass, String searchSelection) throws IfsException
session
- the current session.searchClass
- the search class.searchSelection
- the sarch selection.IfsException
public Long getId()
protected void setId(Long id)
id
- the object's Identifier.public SortSpecification getSortSpecification() throws IfsException
IfsException
- if the operation fails.public void setSortSpecification(SortSpecification spec) throws IfsException
spec
- the sort specificaion.IfsException
- if the operation fails.public String getSearchClassname() throws IfsException
IfsException
- if operation fails.public void setSearchClassname(String searchClass) throws IfsException
searchClass
- the search class.IfsException
- if operation fails.public String getSearchSelection() throws IfsException
IfsException
- if operation fails.public void setSearchSelection(String searchSelection) throws IfsException
searchSelection
- the search selection.IfsException
- if operation fails.public boolean isRecursiveSearch() throws IfsException
IfsException
- if the operation fails.public void setRecursiveSearch(boolean recursive) throws IfsException
recursive
- true for enabled.IfsException
- if the operation fails.public void setMaxItemCount(int maxItemCount) throws IfsException
maxItemCount
- maximum number of items that will
be returned from a getItems() invocationIfsException
- if the operation fails.public int getMaxItemCount() throws IfsException
IfsException
- if the operation fails.public S_LibraryObject[] getItems() throws IfsException
IfsException
- if operation fails.public S_LibraryObject getItems(int index) throws IfsException, IndexOutOfBoundsException
index
- the index of a search result.IfsException
- if operation fails.IndexOutOfBoundsException
- if the index is greater than the number of items in the search.public int getItemCount() throws IfsException
IfsException
- if operation fails.public void openItems() throws IfsException
IfsException
- if the operation fails.closeItems()
public S_LibraryObject nextItem() throws IfsException
IfsException
- if the operation fails.public void closeItems() throws IfsException
IfsException
- if the operation fails.public void resetItems() throws IfsException
IfsException
- if operation fails.public S_LibrarySession getSession() throws IfsException
IfsException
- if the operation failsprotected static Vector constructLibraryObjectVector(S_LibrarySession sess, Vector vector) throws IfsException
sess
- handle to the current sessionvector
- vector of data corresponding to LibraryObjectsIfsException
- if the operation failsprotected static S_LibraryObject constructLibraryObject(S_LibrarySession sess, S_LibraryObjectData data) throws IfsException
sess
- handle to the current sessiondata
- data corresponding to the library objectIfsException
- if the operation failsprotected static S_LibraryObject[] vectorToObjectArray(Vector vector)
vector
- vector of library objectsprotected static S_LibraryObject vectorObjectElement(Vector vector, int index) throws IndexOutOfBoundsException
vector
- vector of LibraryObjectsindex
- points to the needed library object.IndexOutOfBoundsException
- if the index is out of boundspublic void setMaxItems(int maxItems) throws IfsException
maxItems
- the maximum number of items fetched.IfsException
- if operation fails.public int getMaxItems() throws IfsException
IfsException
- if operation fails.public boolean isMaxItemsExceeded() throws IfsException
IfsException
- if operation fails.protected void resolveSortSpecification(S_LibrarySession session) throws IfsException
session
- the current LibrarySessionIfsException
- if not connectedCopyright © 2023. All rights reserved.