public interface IVaadinContainerDataSourceAdapter extends Serializable
forms::DataSource
and provides Vaadin Container which can be asked for tabular data. Initially the container will contain no properties (columns) -
you will probably want to call addProperty(Serializable, ValueProvider, boolean, boolean)
first, to register properties (columns) to the container.
The LSPS row objects (returned by forms::DataSource) are not necessarily stored in ItemIDs: use getRowObjectForItemId(Serializable)
and
getItemIdForRowObject(Object)
to convert from row object to ItemIDs and vice versa.Modifier and Type | Interface and Description |
---|---|
static interface |
IVaadinContainerDataSourceAdapter.FilterConfigProvider
Converts filter propertyId to FilterConfig id.
|
static interface |
IVaadinContainerDataSourceAdapter.FullyCapableContainer
An interface for container that can do everything
VaadinContainerDataSourceAdapter needs. |
static interface |
IVaadinContainerDataSourceAdapter.UnconvertableLoadedDataFilter
Filters that implement are impossible to convert into data filters.
|
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.
|
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.
|
IVaadinContainerDataSourceAdapter.FilterConfigProvider getFilterConfigProvider()
void setFilterConfigProvider(IVaadinContainerDataSourceAdapter.FilterConfigProvider filterConfigProvider)
null
.filterConfigProvider
- void addProperty(Serializable id, ValueProvider valueProvider, boolean sortable, boolean readonly)
id
- 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 editablevoid addProperty(Serializable id, ValueProvider valueProvider, ValueProvider filterVP, ValueProvider sortVP, boolean sortable, boolean readonly)
id
- 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 editablevoid removeProperty(Serializable id)
id
- the property ID, not null.ValueProvider getValueProvider(Serializable id)
id
- the property ID of the column, not null
null
if the column does not use any value provider for obtaining column values.ValueProvider getFilterValueProvider(Serializable id)
id
- the property ID of the column, not null
null
if the column does not use any value provider for obtaining filter values.Hashtable<Object,Class<?>> getFilterTypesMap()
Hashtable<Object,Class<?>> getSortTypesMap()
ValueProvider getSortValueProvider(Serializable id)
id
- the property ID of the column, not null
null
if the column does not use any value provider for obtaining sort values.com.vaadin.data.Container.Indexed getContainer()
Container
. The container is constructed once and will not change. Calling addProperty(Serializable, ValueProvider, boolean, boolean)
will add properties to this container as well.Container.Filterable
.RecordHolder getDefinition()
void refresh()
Container.ItemSetChangeListener
.Object getRowObjectForItemId(Serializable itemId)
itemId
- Vaadin itemId
; the item must be present in getContainer()
!IllegalArgumentException
- if the itemId is not present in the container.Serializable getItemIdForRowObject(Object rowObject)
Container
ItemID for particular row object. Used for example to select a particular row in a Grid.rowObject
- the row object as produced by the forms::DataSourceIllegalArgumentException
- if the row object was not obtained yet from forms::DataSource.Copyright © 2007-2018 Whitestein Technologies. All Rights Reserved.