Package com.appiancorp.suiteapi.common
Class ResultPage
java.lang.Object
com.appiancorp.suiteapi.common.Result
com.appiancorp.suiteapi.common.ResultPage
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ReportResultPage
Class for storing the results returned by a paging service call. The results returned
by the call can be accessed using the
Result.getResults()
method of the
Result
base class. Since paging methods may return only a subset of all
the results getAvailableItems()
can be used to get the total number of results
available on the server.- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addResults
(Object[] results_) Add results to the result page.long
Returns the total number of items available on the server (as opposed to the number of items actually returned by the service call and stored in the result page, which may be different when using a paging method and specifying a batch size that is less than the total number of results on the server).Integer[]
Returns the codes for why the requested objects that were not returned from the server couldn't be returned.Long[]
Returns the ids of any objects requested but not returned from the server.Returns the parent object of the results (for instance, if getting a page of members of a group, this field might be populated with the group ID).void
setAvailableItems
(long availableItems_) SeegetAvailableItems()
.void
setCodesForFailedIds
(Integer[] codesForFailedIds_) void
setFailedIds
(Long[] failedIds_) SeegetFailedIds()
.void
SeegetParent()
.toString()
Returns theResultPage
and its array of results as a string.Methods inherited from class com.appiancorp.suiteapi.common.Result
getNumResults, getResults, setResults
-
Constructor Details
-
ResultPage
public ResultPage()
-
-
Method Details
-
toString
Returns theResultPage
and its array of results as a string. -
getAvailableItems
public long getAvailableItems()Returns the total number of items available on the server (as opposed to the number of items actually returned by the service call and stored in the result page, which may be different when using a paging method and specifying a batch size that is less than the total number of results on the server).- Returns:
- The total number of items available on the server.
- See Also:
-
setAvailableItems
public void setAvailableItems(long availableItems_) SeegetAvailableItems()
.- Parameters:
availableItems_
- The number of available items.- See Also:
-
addResults
Add results to the result page.- Parameters:
results_
- The objects to add to the result page.
-
getFailedIds
Returns the ids of any objects requested but not returned from the server. The corresponding array of error codes for why the objects couldn't be returned is accessible throughgetCodesForFailedIds()
.- Returns:
- The ids of any objects requested but not returned from the server.
- See Also:
-
setFailedIds
SeegetFailedIds()
.- Parameters:
failedIds_
- An array of failed ids.- See Also:
-
getCodesForFailedIds
Returns the codes for why the requested objects that were not returned from the server couldn't be returned. The corresponding array of ids of the requested objects that weren't returned is accessible throughgetFailedIds()
.- Returns:
- The codes for why the requested objects that were not returned from the server couldn't be returned.
- See Also:
-
setCodesForFailedIds
- Parameters:
codesForFailedIds_
- The codes for why the requested objects that were not returned from the server couldn't be returned.- See Also:
-
getParent
Returns the parent object of the results (for instance, if getting a page of members of a group, this field might be populated with the group ID). This field never populated by the backend, and is only populated in select instances by Java.- Returns:
- The parent object of the results.
- See Also:
-
setParent
SeegetParent()
.- Parameters:
object_
- The parent object of the results- See Also:
-