Process API

filenet.vw.api
Class VWAttachmentTrackingQuery

java.lang.Object
  extended by filenet.vw.api.VWAttachmentTrackingQuery

public final class VWAttachmentTrackingQuery
extends java.lang.Object

Use this class to query for roster elements that reference a specific attachment.

The class implements the next() and hasNext() methods to iteratively search, similar to the Java 2 collection model.

Objects of this class are constructed using the VWSession.createAttachmentTrackingQuery method.

See Also:
VWRosterElement, VWSession.createAttachmentTrackingQuery(VWAttachment)

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.
 VWAttachment getAttachment()
          Returns the VWAttachment object associated with this active VWAttachmentTrackingQuery object.
 int getBufferSize()
          Returns the maximum number of VWRosterElements that are passed between the server and the client.
 boolean hasNext()
          Determines whether or not more roster elements exist beyond the current roster element.
 VWRosterElement next()
          Gets the next roster element from the results of the "referencing attachment" query.
 void resetFetch()
          Resets the attachment tracking query.
 void setAttachment(VWAttachment thisAttachment)
          Changes the VWAttachment object associated with this VWAttachmentTrackingQuery object and resets the current attachment tracking query.
 void setBufferSize(int bufferSize)
          Changes the maximum number of VWRosterElements that are passed from the server to the client during a VWReferencedAttachmentQuery.next() call.
 java.lang.String toString()
          Gets a string representation of the attachment tracking query.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

_get_FILE_DATE

public static java.lang.String _get_FILE_DATE()
For FileNet internal use only, do not call.

Returns:
the file date

_get_FILE_AUTHOR

public static java.lang.String _get_FILE_AUTHOR()
For FileNet internal use only, do not call.

Returns:
the file author

_get_FILE_REVISION

public static java.lang.String _get_FILE_REVISION()
For FileNet internal use only, do not call.

Returns:
the file revision

next

public VWRosterElement next()
                     throws VWException
Gets the next roster element from the results of the "referencing attachment" query.

Call the next() method repeatedly, once for each roster element you require from the query. When all roster elements that reference the specified attachment have been returned, the next() method returns null.

Internally, the system retrieves roster elements from the database in blocks of the size you specify in the VWAttachmentTrackingQuery.setBufferSize() method. The VWAttachmentTrackingQuery object automatically manages these blocks of VWRosterElement objects and doles individual VWRosterElement objects out one-by-one to the user via the next() method. Internally, the VWAttachmentTrackingQuery object fetches new blocks of VWRosterElements as necessary.

Returns:
A VWRosterElement object that references the specified VWAttachment object. If there are no more roster elements, the method returns null.
Throws:
VWException - The method throws an exception if it cannot get the next existing roster element in the collection.
See Also:
setBufferSize(int), VWRosterElement

toString

public java.lang.String toString()
Gets a string representation of the attachment tracking query.

Overrides:
toString in class java.lang.Object
Returns:
String that identifies the attachment tracking query.

hasNext

public boolean hasNext()
                throws VWException
Determines whether or not more roster elements exist beyond the current roster element.

Returns:
A Boolean value. The method returns true if there are more roster elements. If no more roster elements exist beyond the current element, the method returns false.
Throws:
VWException

resetFetch

public void resetFetch()
Resets the attachment tracking query. Stops the current attachment tracking query. Subsequent calls on next() will start a new attachment tracking query.


setAttachment

public void setAttachment(VWAttachment thisAttachment)
Changes the VWAttachment object associated with this VWAttachmentTrackingQuery object and resets the current attachment tracking query.

Changing the attachment causes the previously existing attachment tracking query to be stopped. After having called the setAttachment method, a subsequent call on the next() method starts the new query using the new VWAttachment object.

Parameters:
thisAttachment - The VWAttachment object for which references will be returned.

getAttachment

public VWAttachment getAttachment()
Returns the VWAttachment object associated with this active VWAttachmentTrackingQuery object.

Returns:
the VWAttachment object associated with this active VWAttachmentTrackingQuery object

setBufferSize

public void setBufferSize(int bufferSize)
Changes the maximum number of VWRosterElements that are passed from the server to the client during a VWReferencedAttachmentQuery.next() call.

This is an efficiency setting. Setting bufferSize to a higher number means fewer (but larger) messages will be sent between the client and the server when fetching the VWRosterElements that reference a VWAttachment object.

A call on the VWReferencedAttachmentQuery.next() method checks to see if the VWReferencedAttachmentQuery object has any VWRosterElement objects ready to return. If not, a request for bufferSize VWRosterElement objects is made to the server. The VWReferencedAttachmentQuery object then keeps track of the group of VWRosterElement objects. The first VWRosterElement object is returned as the result of the next() method call. The remaining VWRosterElement objects are returned on subsequent calls to next().

Parameters:
bufferSize - The number of VWRosterElement objects to be returned in a single interaction with the server. The bufferSize parameter must range between 1 and 200 inclusive. Values less than 1 will cause the bufferSize value to be set to 1. Values greater than 200 will cause the bufferSize value to be set to 200.
See Also:
next()

getBufferSize

public int getBufferSize()
Returns the maximum number of VWRosterElements that are passed between the server and the client.

Returns:
the number of VWRosterElements that are passed between the server and the client.
See Also:
setBufferSize(int)

Process API

© Copyright IBM Corporation 2002, 2008. All rights reserved.