Class ListResponse

    • Field Detail

      • objectList

        protected List objectList
      • currentIndex

        protected transient int currentIndex
    • Constructor Detail

      • ListResponse

        public ListResponse()
        Creates an empty response.
      • ListResponse

        public ListResponse​(Object object)
      • ListResponse

        public ListResponse​(List objectList)
    • Method Detail

      • size

        public int size()
        Description copied from interface: QueryResponse
        Returns a number of results in the response.
        Specified by:
        size in interface QueryResponse
      • isList

        public boolean isList()
        Description copied from interface: QueryResponse
        Returns whether current iteration result is a list or an update count.
        Specified by:
        isList in interface QueryResponse
      • currentUpdateCount

        public int[] currentUpdateCount()
        Description copied from interface: QueryResponse
        Returns an update count under the current iterator position. Returned value is an int[] to accommodate batch queries. For a regular update result, the value will be an int[1]. Use QueryResponse.isList() to check the result type before calling this method.
        Specified by:
        currentUpdateCount in interface QueryResponse
      • next

        public boolean next()
        Description copied from interface: QueryResponse
        Rewinds response iterator to the next result, returning true if it is available.
        Specified by:
        next in interface QueryResponse
      • reset

        public void reset()
        Description copied from interface: QueryResponse
        Restarts response iterator.
        Specified by:
        reset in interface QueryResponse
      • firstList

        public List firstList()
        Description copied from interface: QueryResponse
        A utility method for quickly retrieving the first list in the response. Returns null if the query has no lists. Note that this method resets current iterator to an undefined state.
        Specified by:
        firstList in interface QueryResponse
      • firstUpdateCount

        public int[] firstUpdateCount()
        Description copied from interface: QueryResponse
        A utility method for quickly retrieving the first update count from the response. Note that this method resets current iterator to an undefined state.
        Specified by:
        firstUpdateCount in interface QueryResponse