|
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.
A given instance of this class returns a single type of item. A query completes when the next() method returns null values.
VWRosterQuery contains methods next()
and hasNext()
which function similarly to the next() and hasNext()
methods in the Iterator interface in Java 2.
VWRoster.startQuery(String,
Object[], Object[], int, String, Object[])
,
VWRoster.createQuery(String, Object[], Object[], int,
String, Object[], int)
Field Summary | |
static int |
QUERY_GET_TRANSLATED_SYSTEM_FIELDS
Deprecated. Not replaced. This is the default. |
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()
Returns the number of records that can be retrieved for the current VWRosterQuery object. |
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(String, Object[], Object[], int, String, Object[]) methods. |
boolean |
hasNext()
Indicates whether another element can be fetched from this VWRosterQuery instance. |
boolean |
isDone()
Deprecated. Replaced by next() . |
java.lang.Object |
next()
Retrieves the subsequent element for this VWRosterQuery instance. Invoke this method repeatedly to retrieve a series of objects that can be cast to the fetch type of this VWRosterQuery object, as specified by the VWRoster.createQuery(String,
Object[], Object[], int, String, Object[], int) call
that created this VWRosterQuery instance. |
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 only return a single item type. Therefore, an error occurs if the next() method has previously been called.
bufferSize
- A positive integer value specifying the maximum
number of elements to return in a fetch operation. The final
number of returned elements will be the lesser of this value,
the Process Server's size limit, and the total number of roster
elements remaining to be fetched.VWException
- Various causes. A possible cause may be
the creation of the current VWRosterQuery object by the
VWRoster.createQuery method.
Use next()
with VWRosterQuery objects that were created
with VWRoster.createQuery method.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()
.
true
if all
available elements have been fetched, indicating the
query has completed; false
, otherwise.VWException
- The method throws an exception if the
current VWRosterQuery instance was created with a call to VWRoster.createQuery(String, Object[], Object[], int, String, Object[], int)
.
For VWRosterQuery instances created with
VWRoster.createQuery(String, Object[], Object[], int, String,
Object[], int), use the hasNext()
method
to determine the query's completion status.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
VWRoster.createQuery(String,
Object[], Object[], int, String, Object[], int)
call
that created this VWRosterQuery instance. Returns null when
no more objects can be returned.
To use this method, create a VWRosterQuery object with a VWRoster.createQuery(String, Object[], Object[], int, String, Object[], int) call, which specifies a range of objects to be fetched, a SQL filter expression, and the type of object to be fetched. The resulting query object will use a default buffer size of 50 retrieved items.
After a set of items in the current retrieval buffer is
exhausted, additional items will be retrieved from
the Process server and buffered. The
effective buffer block size is the lesser of the number specified
with a preceding VWRoster.setBufferSize(int)
call and
the number imposed by the Process server limit.
You can modify retrieval performance by changing the retrieval
buffer size. To change the current retrieval buffer size, set it
with a VWRoster.setBufferSize(int) call from the same instance of
the VWRoster class that created the current VWRosterQuery object.
In other words, after you reset the buffer size, you must create
a new VWRosterQuery object (which will contain
this next() method) with VWRoster.createQuery(String,
Object[], Object[], int, String, Object[], int)
. In the new
instance of VWRosterQuery, the next() method will use the new
buffer size.
Note
This method
requires a buffer size greater than 1 to operate properly.
VWException
- Various causes. A possible cause may be
using the deprecated
VWRoster.startQuery(String,
Object[], Object[], int, String, Object[])
method
to create the current VWRosterQuery instance, instead of a
VWRoster.createQuery(String,
Object[], Object[], int, String, Object[], int) call.hasNext()
public void resetFetch()
public boolean hasNext() throws VWException
true
if there are more
elements that can be fetched.VWException
- Various causes. A possible cause may be
using the deprecated VWRoster.startQuery(String,
Object[], Object[], int, String, Object[])
method
to create the current VWRosterQuery instance, instead of a
VWRoster.createQuery(String,
Object[], Object[], int, String, Object[], int)
call.next()
public int fetchCount() throws VWException
VWException
- Various causes. A possible cause may be
an unsupported fetch type.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |