|
Process API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfilenet.vw.api.VWQueueQuery
public class 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
,
Serialized FormField Summary | |
---|---|
static int |
QUERY_GET_NO_SYSTEM_FIELDS
Deprecated. see VWRoster, VWQueue |
static int |
QUERY_GET_NO_TRANSLATED_SYSTEM_FIELDS
Deprecated. see VWRoster, VWQueue |
static int |
QUERY_GET_SYSTEM_FIELDS
Deprecated. Not replaced. This is the default. |
static int |
QUERY_GET_TRANSLATED_SYSTEM_FIELDS
Deprecated. Not replaced. This is the default. See the queryFlags parameter of VWRoster.createQuery(java.lang.String, java.lang.Object[], java.lang.Object[], int, java.lang.String, java.lang.Object[], int) and VWQueue.createQuery(java.lang.String, java.lang.Object[], java.lang.Object[], int, java.lang.String, java.lang.Object[], int) . |
static int |
QUERY_LOCK_OBJECTS
Deprecated. see VWQueue |
static int |
QUERY_MAX_VALUES_INCLUSIVE
Deprecated. see VWLog, VWRoster, VWQueue |
static int |
QUERY_MIN_VALUES_INCLUSIVE
Deprecated. see VWLog, VWRoster, VWQueue |
static int |
QUERY_NO_OPTIONS
Deprecated. see VWLog, VWRoster, VWQueue |
static int |
QUERY_READ_BOUND
Deprecated. see VWQueue |
static int |
QUERY_READ_LOCKED
Deprecated. see VWQueue |
static int |
QUERY_READ_UNWRITABLE
Deprecated. see VWRoster, VWQueue |
static int |
QUERY_RESOLVE_NAMES
Deprecated. see VWRoster, VWQueue |
static int |
QUERY_TRANSLATE_QUERY_FILTER
Deprecated. see VWRoster, VWQueue |
Method Summary | |
---|---|
static java.lang.String |
_get_FILE_AUTHOR()
For FileNet internal use only, do not call. |
static java.lang.String |
_get_FILE_DATE()
For FileNet internal use only, do not call. |
static java.lang.String |
_get_FILE_REVISION()
For FileNet internal use only, do not call. |
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 |
getBufferSize()
Gets the maximum number of elements set by the user to return in a fetch. |
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. |
void |
resetFetch()
Resets the last element fetched for this queue query object. |
void |
setBufferSize(int newSize)
Sets the maximum number of elements to return in a fetch (defaults to 50). |
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_NO_OPTIONS
After passing this value, the returned work items are unlocked, unbound, and writable. If you use this flag in conjunction with another flag, the value of the other flag becomes the value input to the parameter [for example, 0(this value) + n(another flag value) = n(the other flag value)].
public static final int QUERY_READ_LOCKED
VWRoster.createQuery(java.lang.String, java.lang.Object[], java.lang.Object[], int, java.lang.String, java.lang.Object[], int)
and VWQueue.createQuery(java.lang.String, java.lang.Object[], java.lang.Object[], int, java.lang.String, java.lang.Object[], int)
.
public static final int QUERY_READ_BOUND
VWRoster.createQuery(java.lang.String, java.lang.Object[], java.lang.Object[], int, java.lang.String, java.lang.Object[], int)
and VWQueue.createQuery(java.lang.String, java.lang.Object[], java.lang.Object[], int, java.lang.String, java.lang.Object[], int)
.
public static final int QUERY_READ_UNWRITABLE
VWRoster.createQuery(java.lang.String, java.lang.Object[], java.lang.Object[], int, java.lang.String, java.lang.Object[], int)
and VWQueue.createQuery(java.lang.String, java.lang.Object[], java.lang.Object[], int, java.lang.String, java.lang.Object[], int)
.
public static final int QUERY_LOCK_OBJECTS
VWRoster.createQuery(java.lang.String, java.lang.Object[], java.lang.Object[], int, java.lang.String, java.lang.Object[], int)
and VWQueue.createQuery(java.lang.String, java.lang.Object[], java.lang.Object[], int, java.lang.String, java.lang.Object[], int)
.
public static final int QUERY_MIN_VALUES_INCLUSIVE
VWRoster.createQuery(java.lang.String, java.lang.Object[], java.lang.Object[], int, java.lang.String, java.lang.Object[], int)
and VWQueue.createQuery(java.lang.String, java.lang.Object[], java.lang.Object[], int, java.lang.String, java.lang.Object[], int)
.
public static final int QUERY_MAX_VALUES_INCLUSIVE
VWRoster.createQuery(java.lang.String, java.lang.Object[], java.lang.Object[], int, java.lang.String, java.lang.Object[], int)
and VWQueue.createQuery(java.lang.String, java.lang.Object[], java.lang.Object[], int, java.lang.String, java.lang.Object[], int)
.
public static final int QUERY_GET_SYSTEM_FIELDS
Use the system fields for additional queries on objects. A method that requires translation returns a default value (null, 0, or false). Helper methods require the QUERY_GET_TRANSLATED_SYSTEM_FIELDS to function properly.
public static final int QUERY_GET_TRANSLATED_SYSTEM_FIELDS
VWRoster.createQuery(java.lang.String, java.lang.Object[], java.lang.Object[], int, java.lang.String, java.lang.Object[], int)
and VWQueue.createQuery(java.lang.String, java.lang.Object[], java.lang.Object[], int, java.lang.String, java.lang.Object[], int)
.
public static final int QUERY_GET_NO_SYSTEM_FIELDS
System fields and translated system fields are used in the helper methods for each object. Note that VWWorkObject objects have system fields that are not present in VWStepElement objects.
A method that requires translation returns a default value (null, 0, or false) for this flag. This is because related helper methods require the system fields and translated system fields to function properly.
public static final int QUERY_GET_NO_TRANSLATED_SYSTEM_FIELDS
Use for performance enhancement when methods on a retrieved object are not needed and only the returned data itself is needed.
System fields and translated system fields are used in the helper methods for each object. Note that VWWorkObject objects have system fields that are not present in VWStepElement objects. A VWStepElement object contains only parameter data if this flag is used. However, a VWWorkObject object will contain system fields even if this flag is used.
A method that requires translation returns a default value (null, 0, or false) for this flag. This is because related helper methods require the system fields and translated system fields to function properly.
public static final int QUERY_RESOLVE_NAMES
public static final int QUERY_TRANSLATE_QUERY_FILTER
Method Detail |
---|
public static java.lang.String _get_FILE_DATE()
public static java.lang.String _get_FILE_AUTHOR()
public static java.lang.String _get_FILE_REVISION()
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.public int getBufferSize()
public void setBufferSize(int newSize) throws VWException
newSize
- This must be greater than zero.
VWException
- Thrown if buffer size is less than 0.
|
Process API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |