public class VaadinContainerDataSourceAdapter extends Object implements IVaadinContainerDataSourceAdapter
Container.
Polls forms::DataSource as the container is polled for data. Automatically pages the queries.| Modifier and Type | Class and Description |
|---|---|
protected class |
VaadinContainerDataSourceAdapter.DataSourceQueryFactory |
static class |
VaadinContainerDataSourceAdapter.LazyQueryContainerAdapter
This class exists because LazyQueryContainer has every method set to final, so I could not simply override it.
|
IVaadinContainerDataSourceAdapter.FilterConfigProvider, IVaadinContainerDataSourceAdapter.FullyCapableContainer, IVaadinContainerDataSourceAdapter.UnconvertableLoadedDataFilter| Constructor and Description |
|---|
VaadinContainerDataSourceAdapter(Variant.RecordVariant dataSource)
Wraps forms::DataSource
|
| Modifier and Type | Method and Description |
|---|---|
void |
addProperty(Serializable id,
ValueProvider valueProvider,
boolean sortable,
boolean readonly)
Adds a property (column) to this data source.
|
void |
addProperty(Serializable id,
ValueProvider valueProvider,
ValueProvider filterVP,
ValueProvider sortVP,
boolean sortable,
boolean readonly)
Adds a property (column) to this data source.
|
protected IVaadinContainerDataSourceAdapter.FullyCapableContainer |
createContainer(org.vaadin.addons.lazyquerycontainer.LazyQueryDefinition definition,
VaadinContainerDataSourceAdapter.DataSourceQueryFactory factory) |
com.vaadin.data.Container.Indexed |
getContainer()
Returns the Vaadin
Container. |
RecordHolder |
getDefinition()
forms::DataSource
|
IVaadinContainerDataSourceAdapter.FilterConfigProvider |
getFilterConfigProvider()
Returned object provides information about configured filters.
|
Hashtable<Object,Class<?>> |
getFilterTypesMap() |
ValueProvider |
getFilterValueProvider(Serializable id)
A value provider used by a column filter to obtain column values.
|
Serializable |
getItemIdForRowObject(Object rowObject)
Returns the
Container ItemID for particular row object. |
Object |
getRowObjectForItemId(Serializable itemId)
Returns the row object for given row ID.
|
Hashtable<Object,Class<?>> |
getSortTypesMap() |
ValueProvider |
getSortValueProvider(Serializable id)
A value provider used by column sort to obtain values.
|
ValueProvider |
getValueProvider(Serializable id)
A value provider used by a column to obtain column values.
|
void |
refresh()
Polls the data again.
|
void |
removeProperty(Serializable id)
Removes a property (column) from this data source.
|
void |
setFilterConfigProvider(IVaadinContainerDataSourceAdapter.FilterConfigProvider filterConfigProvider)
Sets filter config provider.
|
String |
toString() |
public VaadinContainerDataSourceAdapter(Variant.RecordVariant dataSource)
dataSource - the datasource, not null, must be present.protected IVaadinContainerDataSourceAdapter.FullyCapableContainer createContainer(org.vaadin.addons.lazyquerycontainer.LazyQueryDefinition definition, VaadinContainerDataSourceAdapter.DataSourceQueryFactory factory)
public com.vaadin.data.Container.Indexed getContainer()
IVaadinContainerDataSourceAdapterContainer. The container is constructed once and will not change. Calling IVaadinContainerDataSourceAdapter.addProperty(Serializable, ValueProvider, boolean, boolean)
will add properties to this container as well.getContainer in interface IVaadinContainerDataSourceAdapterContainer.Filterable.public void addProperty(Serializable id, ValueProvider valueProvider, boolean sortable, boolean readonly)
IVaadinContainerDataSourceAdapteraddProperty in interface IVaadinContainerDataSourceAdapterid - the property ID, not null.valueProvider - provides cell value for this column. The produced value is passed to the renderer; the provider is also used for filtering and sorting.sortable - true if this column should be sortablereadonly - true if this column should be editablepublic void addProperty(Serializable id, ValueProvider valueProvider, ValueProvider filterVP, ValueProvider sortVP, boolean sortable, boolean readonly)
IVaadinContainerDataSourceAdapteraddProperty in interface IVaadinContainerDataSourceAdapterid - the property ID, not null.valueProvider - provides cell value for this column. The produced value is passed to the renderer; the provider is also used for filtering and sorting.filterVP - provides column value for filtering purposes. E.g. column filter will see this value.sortVP - provides column value for sorting purposes. E.g. column sort will see this value.sortable - true if this column should be sortablereadonly - true if this column should be editablepublic void removeProperty(Serializable id)
IVaadinContainerDataSourceAdapterremoveProperty in interface IVaadinContainerDataSourceAdapterid - the property ID, not null.public ValueProvider getValueProvider(Serializable id)
IVaadinContainerDataSourceAdaptergetValueProvider in interface IVaadinContainerDataSourceAdapterid - the property ID of the column, not nullnull if the column does not use any value provider for obtaining column values.public ValueProvider getFilterValueProvider(Serializable id)
IVaadinContainerDataSourceAdaptergetFilterValueProvider in interface IVaadinContainerDataSourceAdapterid - the property ID of the column, not nullnull if the column does not use any value provider for obtaining filter values.public Hashtable<Object,Class<?>> getFilterTypesMap()
getFilterTypesMap in interface IVaadinContainerDataSourceAdapterpublic ValueProvider getSortValueProvider(Serializable id)
IVaadinContainerDataSourceAdaptergetSortValueProvider in interface IVaadinContainerDataSourceAdapterid - the property ID of the column, not nullnull if the column does not use any value provider for obtaining sort values.public Hashtable<Object,Class<?>> getSortTypesMap()
getSortTypesMap in interface IVaadinContainerDataSourceAdapterpublic RecordHolder getDefinition()
IVaadinContainerDataSourceAdaptergetDefinition in interface IVaadinContainerDataSourceAdapterpublic void refresh()
IVaadinContainerDataSourceAdapterContainer.ItemSetChangeListener.refresh in interface IVaadinContainerDataSourceAdapterpublic Object getRowObjectForItemId(Serializable itemId)
IVaadinContainerDataSourceAdaptergetRowObjectForItemId in interface IVaadinContainerDataSourceAdapteritemId - Vaadin itemId; the item must be present in IVaadinContainerDataSourceAdapter.getContainer()!public Serializable getItemIdForRowObject(Object rowObject)
IVaadinContainerDataSourceAdapterContainer ItemID for particular row object. Used for example to select a particular row in a Grid.getItemIdForRowObject in interface IVaadinContainerDataSourceAdapterrowObject - the row object as produced by the forms::DataSourcepublic IVaadinContainerDataSourceAdapter.FilterConfigProvider getFilterConfigProvider()
IVaadinContainerDataSourceAdaptergetFilterConfigProvider in interface IVaadinContainerDataSourceAdapterpublic void setFilterConfigProvider(IVaadinContainerDataSourceAdapter.FilterConfigProvider filterConfigProvider)
IVaadinContainerDataSourceAdapternull.setFilterConfigProvider in interface IVaadinContainerDataSourceAdapterCopyright © 2007-2018 Whitestein Technologies. All Rights Reserved.