public interface DatastoreDataProvider extends com.vaadin.data.provider.DataProvider<com.holonplatform.core.property.PropertyBox,com.holonplatform.core.query.QueryFilter>, QueryConfigurationProviderSupport
DataProvider backed by a Datastore.
The data type is PropertyBox and the supported filter type is QueryFilter.
Supports QueryConfigurationProvider registration through QueryConfigurationProviderSupport.
| Modifier and Type | Interface and Description |
|---|---|
static interface |
DatastoreDataProvider.Builder
Builder to create
DatastoreDataProvider instances. |
| Modifier and Type | Method and Description |
|---|---|
static DatastoreDataProvider.Builder |
builder()
Get a builder to create
DatastoreDataProvider instances. |
static DatastoreDataProvider |
create(com.holonplatform.core.datastore.Datastore datastore,
com.holonplatform.core.datastore.DataTarget<?> target,
com.holonplatform.core.property.PropertySet<?> propertySet)
Create a new
DatastoreDataProvider. |
static DatastoreDataProvider |
create(com.holonplatform.core.datastore.Datastore datastore,
com.holonplatform.core.datastore.DataTarget<?> target,
com.holonplatform.core.property.PropertySet<?> propertySet,
ItemIdentifierProvider<com.holonplatform.core.property.PropertyBox,Object> itemIdentifier)
Create a
DatastoreDataProvider, using given ItemIdentifierProvider to obtain the
PropertyBox item identifier. |
static DatastoreDataProvider |
create(com.holonplatform.core.datastore.Datastore datastore,
com.holonplatform.core.datastore.DataTarget<?> target,
com.holonplatform.core.property.PropertySet<?> propertySet,
com.holonplatform.core.property.Property<?>... identifierProperties)
|
addDataProviderListener, fetch, fromCallbacks, fromFilteringCallbacks, fromStream, getId, isInMemory, ofCollection, ofItems, refreshAll, refreshItem, size, withConfigurableFilter, withConfigurableFilter, withConvertedFilteraddQueryConfigurationProviderstatic DatastoreDataProvider create(com.holonplatform.core.datastore.Datastore datastore, com.holonplatform.core.datastore.DataTarget<?> target, com.holonplatform.core.property.PropertySet<?> propertySet)
DatastoreDataProvider.
The PropertyBox items will be fetched from the persistence source using a properly configured Datastore
query, with given dataTarget representing the persistent entity to query. The PropertyBox
items will be built using given propertySet.
The DataProvider.getId(Object) method will simply return the PropertyBox item instance, relying
on the PropertyBox equals and hashCode logic to identify each item.
If the given PropertySet provides identifier properties (see
PropertySet.getIdentifiers()), the identifier properties will be used as PropertyBox item
identifiers, i.e. the equals and hashCode logic of the items will be implemented
accordingly to the values of the identifier properties.
datastore - The Datastore to use (not null)target - The data target to use (not null)propertySet - The query projection property set (not null)DatastoreDataProvider instancestatic DatastoreDataProvider create(com.holonplatform.core.datastore.Datastore datastore, com.holonplatform.core.datastore.DataTarget<?> target, com.holonplatform.core.property.PropertySet<?> propertySet, com.holonplatform.core.property.Property<?>... identifierProperties)
DatastoreDataProvider and use given identifierProperties as PropertyBox
items identifiers.
The PropertyBox items will be fetched from the persistence source using a properly configured Datastore
query, with given dataTarget representing the persistent entity to query. The PropertyBox
items will be built using given propertySet.
The provided identifier properties will be used as PropertyBox item identifiers, i.e. the
equals and hashCode logic of the items will be implemented accordingly to the values of
the identifier properties.
datastore - The Datastore to use (not null)target - The data target to use (not null)propertySet - The query projection property set (not null)identifierProperties - Properties to use as item identifiersDatastoreDataProvider instancestatic DatastoreDataProvider create(com.holonplatform.core.datastore.Datastore datastore, com.holonplatform.core.datastore.DataTarget<?> target, com.holonplatform.core.property.PropertySet<?> propertySet, ItemIdentifierProvider<com.holonplatform.core.property.PropertyBox,Object> itemIdentifier)
DatastoreDataProvider, using given ItemIdentifierProvider to obtain the
PropertyBox item identifier.
The PropertyBox items will be fetched from the persistence source using a properly configured Datastore
query, with given dataTarget representing the persistent entity to query. The PropertyBox
items will be built using given propertySet.
The given itemIdentifier will be used to provide the item identifier through the
DataProvider.getId(Object) method.
datastore - The Datastore to use (not null)target - The data target to use (not null)propertySet - The query projection property set (not null)itemIdentifier - Item identifier providerDatastoreDataProvider instancestatic DatastoreDataProvider.Builder builder()
DatastoreDataProvider instances.Copyright © 2019 The Holon Platform. All rights reserved.