|
Process Class Relationships | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--filenet.vw.api.VWQuery | +--filenet.vw.api.VWRosterQuery
Use this class to query roster elements or work objects.
An instance of this class will return only one type of item. For example, if the next() or the deprecated fetchWorkObjects method fetches Work Objects, an error occurs if the fetchRosterElements method attempts to fetch additional query items. A query completes when a fetch method returns null values.
VWRosterQuery implements Iterator methods next() and hasNext() which emulate the new collection model in Java 2.
VWRoster.startQuery(java.lang.String, java.lang.Object[], java.lang.Object[], int, java.lang.String, java.lang.Object[])
,
VWRoster.createQuery(java.lang.String, java.lang.Object[], java.lang.Object[], int, java.lang.String, java.lang.Object[], int)
Field Summary | |
static int |
QUERY_GET_TRANSLATED_SYSTEM_FIELDS
|
static int |
QUERY_LOCK_OBJECTS
Value of 16 Flag used to specify that items returned from a query should become locked. |
static int |
QUERY_MAX_VALUES_INCLUSIVE
Value of 64 Flag used to specify that maximum values passed in a query are inclusive, i.e. |
static int |
QUERY_MIN_VALUES_INCLUSIVE
Value of 32 Flag used to specify that minimum values passed in a query are inclusive, i.e. |
static int |
QUERY_READ_BOUND
Value of 2 Flag used to specify that items returned from a query should include those that are already bound to a user or machine. |
static int |
QUERY_READ_LOCKED
Value of 1 Flag used to specify that items returned from a query should include those that are already locked. |
static int |
QUERY_READ_UNWRITABLE
Value of 4 Flag used to specify that items returned from a query should include those that are read-only. |
Method Summary | |
int |
fetchCount()
Gets the integer value indicating the number of records that can be retrieved, using this rosterquery definition. |
VWRosterElement[] |
fetchRosterElements(int bufferSize)
Fetches a specified number of roster elements. |
VWWorkObject[] |
fetchWorkObjects(int bufferSize)
Deprecated. Replaced by next() |
int |
getElementType()
Gets the fetch type for the VWRosterQuery object. |
VWRoster |
getRoster()
Gets a roster that was retrieved by the query initiated by either the VWRoster.createQuery() or VWRoster.startQuery() methods. |
boolean |
hasNext()
Determines whether or not another element can be fetched. |
boolean |
isDone()
Deprecated. Replaced by next() } |
java.lang.Object |
next()
Retrieves the element for each query. |
void |
resetFetch()
Resets the last element fetched for this RosterQuery object. |
java.lang.String |
toString()
Gets the name of the roster retrieved in a query. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int QUERY_READ_LOCKED
public static final int QUERY_READ_BOUND
public static final int QUERY_READ_UNWRITABLE
public static final int QUERY_LOCK_OBJECTS
public static final int QUERY_MIN_VALUES_INCLUSIVE
public static final int QUERY_MAX_VALUES_INCLUSIVE
public static final int QUERY_GET_TRANSLATED_SYSTEM_FIELDS
Method Detail |
public VWRosterElement[] fetchRosterElements(int bufferSize) throws VWException
An instance of this class can return only one type of item. Therefore, an error occurs if the next() or the deprecated fetchWorkObjects method has previously been called.
bufferSize
- An integer value specifying the maximum
number of elements to return in a fetch operation. Specify a
value greater than 0 (zero). The server imposes a maximum limit;
therefore, the number of returned elements might be smaller
than the number specified in this parameter - if the number of
roster elements is large enough.VWException
- Thrown if it cannot
fetch a specified number of roster elements.public VWWorkObject[] fetchWorkObjects(int bufferSize) throws VWException
next()
An instance of this class can return only one type of item. Therefore, an error occurs if the next or fetchRosterElements method has previously been called.
bufferSize
- An integer value specifying the maximum
number of elements to return in a fetch operation. Specify a
value greater than 0 (zero). The server imposes a maximum limit;
therefore, the number of returned elements might be smaller
than the number specified in this parameter - if the number of
work objects is large enough.VWException
- Thrown if it cannot
fetch a specified number of work objects.public VWRoster getRoster()
VWRoster
public boolean isDone() throws VWException
next()
}
VWException
- The method throws an exception if the
object was created with the VWRoster.createQuery() method,
which contains the fetchType parameter.public java.lang.String toString()
toString
in class java.lang.Object
public int getElementType()
Valid fetch type values are as follows:
VWFetchType.FETCH_TYPE_WORKOBJECT
,
VWFetchType.FETCH_TYPE_ROSTER_ELEMENT
public java.lang.Object next() throws VWException
The method return items sequentially (one by one) to the user. An element will be returned as long as there are objects matching the query in the database. The server is queried for the next block of data as items are requested if the buffered items have been exhausted. The server imposes a maximum limit for the block size; therefore, the effective block size at any given time might be smaller than the number specified in VWRoster.setBufferSize() method, if the elements are large, or the server limit was reached. Change the buffer size in the VWRoster and create a new VWRosterQuery object, to get the desired performance on retrievals from the server.
In order to use this method, this VWRosterQuery object must have been created with VWRoster.createQuery() method , which requires the type to be specified. The buffer size for retrievals from the server must be set in the VWRoster object before the VWRosterQuery object is created. An exception will be thrown, if the deprecated startQuery was used to create the VWRosterQuery.
VWException
- The method throws an exception if it cannot
retrieve the subsequent element for the query, before the final
element in the block was called.public void resetFetch()
public boolean hasNext() throws VWException
VWException
- The method throws an exception if
the object was created by the deprecated VWRoster.startQuery()
method.public int fetchCount() throws VWException
VWException
- The method throws an exception if it cannot
get the integer value indicating the number of records that can
be retrieved, using this rosterQuery object roster. One cause of this
is an incorrect query parameter.
|
Process Class Relationships | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |