filenet.vw.api

Class VWLogQuery

  • java.lang.Object
    • filenet.vw.api.VWLogQuery


  • public final class VWLogQuery
    extends java.lang.Object
    Use this class to query for log elements.

    The class implements the next() and hasNext() methods to iteratively search, similar to the Java 2 collection model. The query ends when either method returns a null value.

    Supports distributed transactions

    Since:
    VWWS3.10
    See Also:
    VWLog, VWLogElement
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      int fetchCount()
      Gets the integer value indicating the number of records that can be retrieved, using this logQuery definition.
      java.lang.String getLastRecord()
      Gets the last record in the query results.
      VWLog getLog()
      Gets the log retrieved by the VWLog.startQuery() method.
      boolean hasNext()
      Determines whether or not more elements exist beyond the current element.
      VWLogElement next()
      Gets the next log element in the collection (if one exists).
      void resetFetch()
      Resets the last element fetched for the log query object.
      void setLastRecord(java.lang.String lastWorkRecStr)
      Set the last record in the query result
      java.lang.String toString()
      Gets the string version of the name of the log the query retrieved.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Method Detail

      • next

        public VWLogElement next()
                          throws VWException
        Gets the next log element in the collection (if one exists).

        Supports distributed transactions

        Call the method repeatedly, once for each log element you require from the query. When there are no more log elements available, the method returns null.

        The system retrieves elements from the database in blocks of the size you specify in VWLog.setBufferSize() method. Items return one-by-one to the user via this method. If the application requests more items, this API queries the server for the next block of data. An element returns as long as there is an object in the database that matches the specified query conditions.

        Respecify buffer size with VWLog and create a new VWLogQuery object to optimize performance during retrieval from the server.

        Returns:
        A VWLogElement object, specified by the startQuery method of VWLog. If there are no more log elements after the last one fetched, the method returns null.
        Throws:
        VWException - The method throws an exception if it cannot get the next existing log element in the collection.
      • getLog

        public VWLog getLog()
        Gets the log retrieved by the VWLog.startQuery() method.
        Returns:
        A VWLog object.
      • toString

        public java.lang.String toString()
        Gets the string version of the name of the log the query retrieved. If log is the system log, this method does not return a name.
        Overrides:
        toString in class java.lang.Object
        Returns:
        String that is the name of the log
      • resetFetch

        public void resetFetch()
        Resets the last element fetched for the log query object. The new fetch results include previously fetched elements.
        Since:
        VWWS3.10
      • hasNext

        public boolean hasNext()
                        throws VWException
        Determines whether or not more elements exist beyond the current element. The fetch buffer size must be greater than 1 (one).
        Returns:
        A Boolean value. The method returns true if there are more log elements. If no more elements exist beyond the current element, the method returns false.
        Throws:
        VWException
      • fetchCount

        public int fetchCount()
                       throws VWException
        Gets the integer value indicating the number of records that can be retrieved, using this logQuery definition. Results are approximate because the record set may change before the query returns.
        Returns:
        An integer value indicating the number of records that could be retrieved in the log, using this logQuery object.
        Throws:
        VWException - The method throws an exception if it cannot get the integer value indicating the number of records that can be retrieved, using this logQuery definition. One cause of this is an incorrect query parameter.
        Since:
        CPE 5.2.0.3
      • getLastRecord

        public java.lang.String getLastRecord()
        Gets the last record in the query results.
        Returns:
        A base64-encoded String containing the last record of the query results. Null is returned if no last record.
        Since:
        CPE 5.2.0.3
      • setLastRecord

        public void setLastRecord(java.lang.String lastWorkRecStr)
        Set the last record in the query result
        Parameters:
        lastWorkRecStr - A base64-encoded String containing the last record of the query results. If this value is null, the query starts from the beginning.

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