|
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.VWQueueQuery
Use this class to query for queue elements, work objects, or Instruction elements. A given instance of this class returns a series of single type of item. A query completes when the next() method returns null a null value.
VWQueueQuery contains methods next()
and hasNext()
which function similarly to the next() and hasNext()
methods in the Iterator interface in Java 2.
VWQueue.startQuery(String,
Object[], Object[], int, String, Object[])
,
VWQueue.createQuery(String, Object[], Object[], int,
String, Object[], int)
,
VWQueue
,
VWQueueElement
,
VWWorkObject
,
VWStepElement
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()
Gets the integer value indicating the number of records that can be retrieved, using this queueQuery object. |
VWInstructionElement[] |
fetchInstructionElements(int bufferSize)
Deprecated. Replaced by next() |
VWQueueElement[] |
fetchQueueElements(int bufferSize)
Deprecated. Replaced by next() |
VWWorkObject[] |
fetchWorkObjects(int bufferSize)
Deprecated. Replaced by next() |
int |
getElementType()
Gets the fetch type of this VWQueueQuery object. |
VWQueue |
getQueue()
Gets the queue retrieved by the VWQueue.createQuery() method or the deprecated VWQueue.startQuery() method. |
boolean |
hasNext()
Indicates whether another element can be fetched from this VWQueueQuery instance. |
boolean |
isDone()
Deprecated. Replaced by next() |
java.lang.Object |
next()
Retrieves the subsequent element for this VWQueueQuery instance. Invoke this method repeatedly to retrieve a series of objects that can be cast to the fetch type of this VWQueueQuery object, as specified by the VWQueue.createQuery(String,
Object[], Object[], int, String, Object[], int) call
that created this VWQueueQuery instance. |
void |
resetFetch()
Resets the last element fetched for this queue query object. |
java.lang.String |
toString()
Retrieves a string version of the current query's queue name. |
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 VWWorkObject[] fetchWorkObjects(int bufferSize) throws VWException
next()
bufferSize
- An integer value specifying the maximum number of Work
Objects to return for each fetch operation. The value must be
greater than zero (0). The server imposes a maximum; therefore,
the number of returned work objects might be smaller than
the number specified here.VWException
- Thrown if it cannot
fetch a specific number of work objects.public VWQueueElement[] fetchQueueElements(int bufferSize) throws VWException
next()
bufferSize
- An integer value specifying the maximum
number of elements to return for each fetch operation. The
value must be greater than zero (0). The server imposes a maximum;
therefore, the number of returned elements might be smaller
than the number specified in the parameter.VWException
- Thrown if it cannot
fetch a specific number of queue elements.public VWInstructionElement[] fetchInstructionElements(int bufferSize) throws VWException
next()
bufferSize
- An integer value specifying the maximum
number of elements to return for each fetch operation. The
value must be greater than zero (0). The server imposes a
maximum; therefore, the number of returned elements might be
smaller than the number specified in the parameter.VWException
- Thrown if it cannot
fetch a specific number of Instruction elements.public VWQueue getQueue()
VWQueue
public boolean isDone()
next()
public java.lang.String toString()
toString
in class java.lang.Object
public void resetFetch()
public int getElementType()
Fetch types are:
If VWFetchType.FETCH_TYPE_NONE (-1) returns, the application used the deprecated VWQueue.startQuery() method to create this object.
public java.lang.Object next() throws VWException
VWQueue.createQuery(String,
Object[], Object[], int, String, Object[], int)
call
that created this VWQueueQuery instance. Returns null when
no more objects can be returned.
To use this method, create a VWQueueQuery object with a VWQueue.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 VWQueue.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 VWQueue.setBufferSize(int) call from the same instance of
the VWQueue class that created the current VWQueueQuery object.
In other words, after you reset the buffer size, you must create
a new VWQueueQuery object (which will contain
this next() method) with VWQueue.createQuery(String,
Object[], Object[], int, String, Object[], int)
. In the new
instance of VWQueueQuery, 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
VWQueue.startQuery(String,
Object[], Object[], int, String, Object[])
method
to create the current VWQueueQuery instance, instead of a
VWQueue.createQuery(String,
Object[], Object[], int, String, Object[], int) call.hasNext()
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
VWQueue.startQuery(String,
Object[], Object[], int, String, Object[])
method
to create the current VWQueueQuery instance, instead of a
VWQueue.createQuery(String,
Object[], Object[], int, String, Object[], int)
call.next()
public int fetchCount() throws VWException
VWException
- Thrown if it cannot
get the integer value indicating the number of records that can
be retrieved, using this VWQueueQuery object queue. One cause of this
is an incorrect query parameter.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |