|
Process API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfilenet.vw.api.VWRosterQuery
public final class 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)
,
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()
Returns the number of records that can be retrieved for the current VWRosterQuery object. |
VWRosterElement[] |
fetchRosterElements(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 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. |
void |
resetFetch()
Resets the last element fetched for this RosterQuery object. |
void |
setBufferSize(int newSize)
Sets the maximum number of elements to return in a fetch (defaults to 50). |
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_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 VWRosterElement[] fetchRosterElements(int bufferSize) throws VWException
next()
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.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.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 |