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

@GwtCompatible public abstract class ListViewDataSubset<I> extends DataSubset<ListViewItem,I>

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.

Any subclass of this should add the following Jaxb annotations:
  • 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
See also the code example in DataSubset
  • Field Details

  • 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 of ListViewItem objects.
      Parameters:
      pagingInfo - the paging constraints and sorting info applied to this result
      totalCount - the total number of items available as the result, which may be greater than the number of items returned in this data subset
      data - the list of items
      ids - a parallel list of identifiers for the items
      errors - 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

      public List<AppianError> getErrors()
      Returns the list of errors generated while building this ListViewDataSubset
      Returns:
      the list of errors generated while building this ListViewDataSubset
    • getData

      public List<ListViewItem> getData()
      Returns the paged results.
      Specified by:
      getData in class DataSubset<ListViewItem,I>
      Returns:
      the page results
    • setData

      protected void setData(List<ListViewItem> data)
      Description copied from class: DataSubset
      Sets the results
      Specified by:
      setData in class DataSubset<ListViewItem,I>
      Parameters:
      data - List of results
    • toString

      public String toString()
      Overrides:
      toString in class DataSubset<ListViewItem,I>
    • multilineToStringHelper

      protected com.appian.core.base.MultilineToStringHelper multilineToStringHelper(int indent)
      Overrides:
      multilineToStringHelper in class DataSubset<ListViewItem,I>
    • multilineToString

      public static com.appian.core.base.ToStringFunction<ListViewDataSubset> multilineToString(int indent)
      Returns a ToStringFunction 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

      public static com.google.common.base.Equivalence<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