DataTable
Represents a collection of domain objects (typically entity instances).
API
class DataTable {
DataTable(ObjectSpecification elementType) (1)
DataTable(ObjectSpecification elementType, Predicate<ObjectAssociation> columnFilter) (2)
DataTable(ObjectSpecification elementType, Can<? extends ObjectAssociation> dataColumns) (3)
DataTable(ObjectSpecification elementType, String tableFriendlyName, Can<? extends ObjectAssociation> dataColumns, Can<ManagedObject> dataElements)
DataTable forDomainType(Class<?> domainType) (4)
DataTable forDomainType(Class<?> domainType, Predicate<ObjectAssociation> columnFilter) (5)
String getLogicalName() (6)
int getElementCount() (7)
Stream<ManagedObject> streamDataElements()
DataTable addDataElementsFrom(DataTable otherTable) (8)
DataTable setDataElements(Iterable<ManagedObject> dataElements) (9)
void setDataElementPojos(Iterable<?> dataElementPojos) (10)
DataTable populateEntities() (11)
DataTable populateEntities(Query<?> query) (12)
DataTable visit(CellVisitor visitor)
DataTable visit(CellVisitor visitor, Predicate<DataColumn> columnFilter)
Blob exportToBlob(CollectionContentsExporter exporter) (13)
Predicate<ObjectAssociation> columnFilterIncluding(Where whereToInclude)
Predicate<ObjectAssociation> columnFilterExcludingMixins()
Predicate<ObjectAssociation> columnFilterIncludingEnabledForSnapshot()
}
1 | DataTable(ObjectSpecification)
Returns an empty DataTable for given domain object type, with all properties as columns, excluding mixed-in ones. (For more control on which columns to include, consider a different constructor.) |
2 | DataTable(ObjectSpecification, Predicate)
Returns an empty DataTable for given domain object type, with all (including mixed-in) associations as columns, that pass given columnFilter . If the filter is null it acts as a pass-through. |
3 | DataTable(ObjectSpecification, Can)
Returns an empty DataTable for given domain object type. |
4 | forDomainType(Class)
Returns an empty DataTable for given domain object type, with all properties as columns, excluding mixed-in ones. (For more control on which columns to include, consider #forDomainType(Class, Predicate) or a constructor that fits.) |
5 | forDomainType(Class, Predicate)
Returns an empty DataTable for given domain object type, with all (including mixed-in) associations as columns, that pass given columnFilter . If the filter is null it acts as a pass-through. |
6 | getLogicalName()
Unique within application scope, can act as an id. |
7 | getElementCount()
Count data rows. |
8 | addDataElementsFrom(DataTable)
Adds all data-elements from the other table to this table. |
9 | setDataElements(Iterable)
Sets the data-elements of this table, which make up the rows of this table. |
10 | setDataElementPojos(Iterable)
Sets the data-elements of this table from given pojos, that are adapted to ManagedObject (s). |
11 | populateEntities()
Populates this table from the underlying (default) persistence layer. |
12 | populateEntities(Query)
Populates this table from the underlying (default) persistence layer, using given Query to refine the result. |
13 | exportToBlob(CollectionContentsExporter)
Typical use-case: |
Members
DataTable(ObjectSpecification)
Returns an empty DataTable for given domain object type, with all properties as columns, excluding mixed-in ones. (For more control on which columns to include, consider a different constructor.)
The table can be populated later on using DataTable#setDataElements(Iterable) or #setDataElementPojos(Iterable) .
DataTable(ObjectSpecification, Predicate)
Returns an empty DataTable for given domain object type, with all (including mixed-in) associations as columns, that pass given columnFilter . If the filter is null it acts as a pass-through.
The table can be populated later on using DataTable#setDataElements(Iterable) or #setDataElementPojos(Iterable) .
DataTable(ObjectSpecification, Can)
Returns an empty DataTable for given domain object type.
The table can be populated later on using DataTable#setDataElements(Iterable) or #setDataElementPojos(Iterable) .
forDomainType(Class)
Returns an empty DataTable for given domain object type, with all properties as columns, excluding mixed-in ones. (For more control on which columns to include, consider #forDomainType(Class, Predicate) or a constructor that fits.)
The table can be populated later on using DataTable#setDataElements(Iterable) or #setDataElementPojos(Iterable) .
forDomainType(Class, Predicate)
Returns an empty DataTable for given domain object type, with all (including mixed-in) associations as columns, that pass given columnFilter . If the filter is null it acts as a pass-through.
The table can be populated later on using DataTable#setDataElements(Iterable) or #setDataElementPojos(Iterable) .
setDataElements(Iterable)
Sets the data-elements of this table, which make up the rows of this table.
setDataElementPojos(Iterable)
Sets the data-elements of this table from given pojos, that are adapted to ManagedObject (s).
populateEntities(Query)
Populates this table from the underlying (default) persistence layer, using given Query to refine the result.