I
- - the identifier typeT
- - the facet type@GwtCompatible
public abstract class ListView<I,T>
extends java.lang.Object
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 ListView is a data structure geared toward presenting a set of data with additional information about
how the data can be filtered. It contains a ListViewDataSubset
of ListViewItem
objects
and a list of Facet
objects that define how the underlying data can be filtered.
@XmlElement(type=[Your concrete ListViewDataSubset implementation class].class,
namespace=Type.APPIAN_NAMESPACE)
getDataSubset()
along with an @XmlSeeAlso({I.class,DataSubset<I>
.class,T.class})
where I is the first type parameter to this class, DataSubset<I>
is an implementing class of DataSubset
using I, and T is the second type parameter to this class.
@XmlRootElement(namespace=Type.APPIAN_NAMESPACE, name=ListView.XML_ROOT_ELEMENT)
annotation
to the class @XmlType(namespace = [Your Namespace], propOrder={"dataSubset", "facets"})
annotation to the class
For example:
@XmlRootElement(namespace=Type.APPIAN_NAMESPACE, name=ListView.XML_ROOT_ELEMENT)
@XmlType(namespace=[Your Namespace], propOrder = {"dataSubset", "facets"})
@XmlSeeAlso({Person.class, Adress.class})
public static class PersonListView extends ListView <Person, Address>
{
private ListViewDataSubset <Person>
dataSubset;
private List <Facet<Address>>
facets;
public PersonListView(ListViewDataSubset ) {}
@Override
@XmlElement(type=PersonListViewDataSubset.class, namespace=[Your Namespace])
public ListViewDataSubset <Person>
getDataSubset() {
return dataSubset;
}
@Override
protected void setDataSubset(ListViewDataSubset <Person>
dataSubset) {
this.dataSubset = dataSubset;
}
@Override
@XmlElement(type=Facet.class, namespace=[Your Namespace])
public List <Facet<Address>>
getFacets() {
return facets;
}
@Override
protected void setFacets(List <Facet<Address>>
facets) {
this.facets = facets;
}
}
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
LOCAL_PART |
static javax.xml.namespace.QName |
QNAME |
protected static java.lang.String |
XML_ROOT_ELEMENT |
Constructor and Description |
---|
ListView(ListViewDataSubset<I> dataSubset)
Constructs a ListView with the given
ListViewDataSubset and an empty list of Facets. |
ListView(ListViewDataSubset<I> dataSubset,
java.util.List<Facet<T>> facets)
Constructs a ListView with the given
ListViewDataSubset and list of Facets. |
Modifier and Type | Method and Description |
---|---|
static com.google.common.base.Equivalence<ListView> |
equalDataCheck()
Returns a
Equivalence object that can be used to determine if two ListView objects are equal. |
abstract ListViewDataSubset<I> |
getDataSubset()
Returns the
ListViewDataSubset . |
abstract java.util.List<Facet<T>> |
getFacets()
Returns the facets that are applicable to the current (possibly filtered) data set.
|
static com.appian.core.base.ToStringFunction<ListView> |
multilineToString(int indent)
Returns a
ToStringFunction that can be used to generate the multiline String representation
of a ListView |
protected abstract void |
setDataSubset(ListViewDataSubset<I> dataSubset) |
protected abstract void |
setFacets(java.util.List<Facet<T>> facets) |
java.lang.String |
toString() |
protected static final java.lang.String XML_ROOT_ELEMENT
public static final java.lang.String LOCAL_PART
public static final javax.xml.namespace.QName QNAME
public ListView(ListViewDataSubset<I> dataSubset)
ListViewDataSubset
and an empty list of Facets.
Same as calling new ListView(dataSubset, null)
dataSubset
- - the datasubset this ListView will be constructed withpublic ListView(ListViewDataSubset<I> dataSubset, java.util.List<Facet<T>> facets)
ListViewDataSubset
and list of Facets.dataSubset
- - the datasubset this ListView will be constructed withfacets
- - the lsit of Facets this ListView will be constructed withpublic abstract ListViewDataSubset<I> getDataSubset()
ListViewDataSubset
.protected abstract void setDataSubset(ListViewDataSubset<I> dataSubset)
public abstract java.util.List<Facet<T>> getFacets()
public java.lang.String toString()
toString
in class java.lang.Object
public static com.appian.core.base.ToStringFunction<ListView> multilineToString(int indent)
ToStringFunction
that can be used to generate the multiline String representation
of a ListViewindent
- - number of spaces to increment each level of indentationpublic static com.google.common.base.Equivalence<ListView> equalDataCheck()
Equivalence
object that can be used to determine if two ListView objects are equal.
This Equivalence object's equivalent(ListView lv1, ListView lv2) method should be used to determine
Equality instead of equals()Equivalence
object to check if two ListView objects are equalCopyright © 2003-2024 Appian Corporation. All Rights Reserved.