Package com.appiancorp.type.system
Class ListViewDataSubset<I>
java.lang.Object
com.appiancorp.suiteapi.common.paging.DataSubset<ListViewItem,I>
com.appiancorp.type.system.ListViewDataSubset<I>
- Type Parameters:
I
- identifiers
- Direct Known Subclasses:
TypedValueListViewDataSubset
This class is available as a preview of functionality that will be added to the supported public API in a future release. While it is in the preview phase, it is subject to change or removal without deprecation or notice. Although notice of change is not guaranteed, we will try to let developers know of major changes through announcements in release notes.
A ListViewDataSubset is a DataSubset
designed specifically to be used with ListView
objects. The items in the data
field of a ListViewDataSubset are of type ListViewItem
.
- Add
@XmlElement(type=Object.class, nillable=true, namespace="")
DataSubset.getIdentifiers()
along with an@XmlSeeAlso(I.class)
where I is the type parameter to this class. - Add
@XmlRootElement(namespace=Type.APPIAN_NAMESPACE, name=ListViewDataSubset.XML_ROOT_ELEMENT)
annotation to the class - Add
@XmlType(namespace=[Your Namespace], propOrder = {"startIndex", "batchSize", "sort", "totalCount", "data", "identifiers", "errors"})
annotation to the class
DataSubset
-
Field Summary
Fields inherited from class com.appiancorp.suiteapi.common.paging.DataSubset
BATCH_SIZE_FIELD_NAME, IDENTIFIERS_FIELD_NAME, RESULTS_FIELD_NAME, SORT_FIELD_NAME, START_INDEX_FIELD_NAME, TOTAL_COUNT_FIELD_NAME
-
Constructor Summary
ModifierConstructorDescriptionprotected
ListViewDataSubset
(int startIndex, int batchSize, List<SortInfo> sort, int totalCount, List<ListViewItem> data, List<I> ids, List<AppianError> errors) Same as other constructor except the paging information is broken out into separate parametersListViewDataSubset
(PagingInfo pagingInfo, int totalCount, List<ListViewItem> data, List<I> ids, List<AppianError> errors) Constructs a ListViewDataSubset using the given paging information, the total number of results, the list of results, the underlying data source identifiers, and the list of errors collected while building this datasubset. -
Method Summary
Modifier and TypeMethodDescriptionstatic com.google.common.base.Equivalence<ListViewDataSubset<?>>
Returns an Equivalence object that can be used to determine if two ListViewDataSubset objects are equal.getData()
Returns the paged results.Returns the list of errors generated while building this ListViewDataSubsetstatic com.appian.core.base.ToStringFunction<ListViewDataSubset>
multilineToString
(int indent) Returns aToStringFunction
that can be used to generate the multiline String representation of a ListViewDataSubsetprotected com.appian.core.base.MultilineToStringHelper
multilineToStringHelper
(int indent) protected void
setData
(List<ListViewItem> data) Sets the resultstoString()
Methods inherited from class com.appiancorp.suiteapi.common.paging.DataSubset
getBatchSize, getIdentifiers, getSort, getStartIndex, getTotalCount, setIdentifiers
-
Field Details
-
XML_ROOT_ELEMENT
- See Also:
-
QNAME
-
-
Constructor Details
-
ListViewDataSubset
protected ListViewDataSubset() -
ListViewDataSubset
public ListViewDataSubset(PagingInfo pagingInfo, int totalCount, List<ListViewItem> data, List<I> ids, List<AppianError> errors) Constructs a ListViewDataSubset using the given paging information, the total number of results, the list of results, the underlying data source identifiers, and the list of errors collected while building this datasubset. The list of results must be a list ofListViewItem
objects.- Parameters:
pagingInfo
- the paging constraints and sorting info applied to this resulttotalCount
- the total number of items available as the result, which may be greater than the number of items returned in this data subsetdata
- the list of itemsids
- a parallel list of identifiers for the itemserrors
- a parallel list of errors that should be returned instead of the corresponding item, place a null in the corresponding list position to indicate no error; leave entire list null if there are no errors
-
ListViewDataSubset
public ListViewDataSubset(int startIndex, int batchSize, List<SortInfo> sort, int totalCount, List<ListViewItem> data, List<I> ids, List<AppianError> errors) Same as other constructor except the paging information is broken out into separate parameters
-
-
Method Details
-
getErrors
Returns the list of errors generated while building this ListViewDataSubset- Returns:
- the list of errors generated while building this ListViewDataSubset
-
getData
Returns the paged results.- Specified by:
getData
in classDataSubset<ListViewItem,
I> - Returns:
- the page results
-
setData
Description copied from class:DataSubset
Sets the results- Specified by:
setData
in classDataSubset<ListViewItem,
I> - Parameters:
data
- List of results
-
toString
- Overrides:
toString
in classDataSubset<ListViewItem,
I>
-
multilineToStringHelper
protected com.appian.core.base.MultilineToStringHelper multilineToStringHelper(int indent) - Overrides:
multilineToStringHelper
in classDataSubset<ListViewItem,
I>
-
multilineToString
public static com.appian.core.base.ToStringFunction<ListViewDataSubset> multilineToString(int indent) Returns aToStringFunction
that can be used to generate the multiline String representation of a ListViewDataSubset- Parameters:
indent
- - number of spaces to increment each level of indentation- Returns:
- a ToStringFunction object to get the multiline string representation of a ListViewDataSubset
-
equalDataCheck
Returns an Equivalence object that can be used to determine if two ListViewDataSubset objects are equal. This Equivalence objects equivalent(ListViewDataSubset lvds1, ListViewDataSubset lvds2) should be used instead of equals().- Returns:
- an Equivalent object that can be used to determine if ListViewDataSubsets are equivalent
-