PROPERTY - Item property typeITEM - Item typepublic interface ItemDataSourceContainerBuilder<ITEM,PROPERTY,B extends ItemDataSourceContainerBuilder<ITEM,PROPERTY,B>>
ItemDataSourceContainer instances.| Modifier and Type | Interface and Description |
|---|---|
static interface |
ItemDataSourceContainerBuilder.BaseItemDataSourceContainerBuilder<ITEM,PROPERTY>
Default
ItemDataSourceContainerBuilder. |
| Modifier and Type | Method and Description |
|---|---|
B |
autoRefresh(boolean autoRefresh)
Set if auto-refresh is enabled for this container, i.e. items are loaded when one of the Container method which
involve operations on item set is called.
|
B |
batchSize(int batchSize)
Set batch (page) size for items loading using
ItemDataProvider. |
B |
buffered(boolean buffered)
Sets the buffered mode to the specified status.
|
ItemDataSourceContainer<ITEM,PROPERTY> |
build()
Build
ItemDataSourceContainer instance |
B |
commitHandler(ItemDataSource.CommitHandler<ITEM> commitHandler)
Set the handler to manage item set modifications.
|
B |
dataSource(ItemDataProvider<ITEM> dataProvider)
Set the items data provider.
|
B |
defaultSort(com.holonplatform.core.query.QuerySort sort)
Set query default sort.
|
B |
defaultValue(PROPERTY propertyId,
Object defaultValue)
Set a default value to initialize the given
propertyId |
B |
fixedFilter(com.holonplatform.core.query.QueryFilter filter)
Set query fixed filter (always added to query predicates)
|
B |
fixedSort(com.holonplatform.core.query.QuerySort sort)
Set query fixed sort (always added to query sorts)
|
B |
itemAdapter(ItemAdapter<ITEM> itemAdapter)
Set the item adapter to convert data source item data type to a container
Item and back. |
<ID> B |
itemIdentifier(ItemIdentifierProvider<ITEM,ID> itemIdentifierProvider)
Set the item identifier provider to use to obtain item ids.
|
B |
maxCacheSize(int maxCacheSize)
Set max items cache size
|
B |
queryParameter(String name,
Object value)
Add a query parameter
|
B |
readOnly(PROPERTY propertyId,
boolean readOnly)
Set whether given property id is read-only.
|
B |
sortable(PROPERTY propertyId,
boolean sortable)
Set whether given property id is sortable.
|
B |
withItemSetChangeListener(com.vaadin.data.Container.ItemSetChangeListener listener)
Add an
Container.ItemSetChangeListener |
B |
withProperty(PROPERTY propertyId,
Class<?> type)
Add an Item property to this container
|
B |
withPropertySortGenerator(PROPERTY property,
ItemDataSource.PropertySortGenerator<PROPERTY> propertySortGenerator)
|
B |
withQueryConfigurationProvider(com.holonplatform.core.query.QueryConfigurationProvider queryConfigurationProvider)
Add an external
QueryConfigurationProvider for additional query configuration |
B |
withReadOnlyProperty(PROPERTY propertyId,
Class<?> type)
Add an Item property to this container and declares it as read-only
|
B |
withReadOnlySortableProperty(PROPERTY propertyId,
Class<?> type)
Add an Item property to this container and declares it as read-only and sortable
|
B |
withSortableProperty(PROPERTY propertyId,
Class<?> type)
Add an Item property to this container and declares it as sortable
|
B dataSource(ItemDataProvider<ITEM> dataProvider)
dataProvider - The items data provider to setB itemAdapter(ItemAdapter<ITEM> itemAdapter)
Item and back.itemAdapter - The item adapter to set<ID> B itemIdentifier(ItemIdentifierProvider<ITEM,ID> itemIdentifierProvider)
ID - Item id typeitemIdentifierProvider - the item identifier provider to setB withProperty(PROPERTY propertyId, Class<?> type)
propertyId - Property idtype - Property value typeB withSortableProperty(PROPERTY propertyId, Class<?> type)
propertyId - Property idtype - Property value typeB withReadOnlyProperty(PROPERTY propertyId, Class<?> type)
propertyId - Property idtype - Property value typeB withReadOnlySortableProperty(PROPERTY propertyId, Class<?> type)
propertyId - Property idtype - Property value typeB autoRefresh(boolean autoRefresh)
If auto-refresh is not enabled, ItemDataSource.refresh() method must be called to load items before using
this Container.
autoRefresh - true to enable auto-refreshB batchSize(int batchSize)
ItemDataProvider.
A value <=0 means no paging, and ItemDataProvider should behave in a consistent manner.
batchSize - Batch (page) size for items loadingB maxCacheSize(int maxCacheSize)
maxCacheSize - Max cache size to setB sortable(PROPERTY propertyId, boolean sortable)
propertyId - Property idsortable - Whether given property id is sortableB readOnly(PROPERTY propertyId, boolean readOnly)
propertyId - Property idreadOnly - Whether given property id is read-onlyB defaultValue(PROPERTY propertyId, Object defaultValue)
propertyIdpropertyId - Property iddefaultValue - Default valueB buffered(boolean buffered)
When in buffered mode, an internal buffer will be used to store changes using ItemDataSource.CommitHandler until
ItemDataSource.commit() is called. Calling ItemDataSource.discard() will revert the internal
buffer to the value of the data source.
When in non-buffered mode, write operations will be done directly on the data source using ItemDataSource.CommitHandler.
In this mode the ItemDataSource.commit() and ItemDataSource.discard() methods serve no purpose.
buffered - true if buffered mode should be turned on, false otherwiseB withPropertySortGenerator(PROPERTY property, ItemDataSource.PropertySortGenerator<PROPERTY> propertySortGenerator)
property - Property (not null)propertySortGenerator - PropertySortGenerator (not null)B withQueryConfigurationProvider(com.holonplatform.core.query.QueryConfigurationProvider queryConfigurationProvider)
QueryConfigurationProvider for additional query configurationqueryConfigurationProvider - QueryConfigurationProvider to addB fixedFilter(com.holonplatform.core.query.QueryFilter filter)
filter - Query fixed filter, or null for noneB fixedSort(com.holonplatform.core.query.QuerySort sort)
sort - Query fixed sort, or null for noneB defaultSort(com.holonplatform.core.query.QuerySort sort)
null and no other sort is available, this one will be usedsort - Default query sortB queryParameter(String name, Object value)
name - Parameter namevalue - Parameter valueB commitHandler(ItemDataSource.CommitHandler<ITEM> commitHandler)
This is required to activate item set modification support, using methods such as Container.addItem(),
Container.removeItem(Object) and Buffered.commit().
commitHandler - Item commit handlerB withItemSetChangeListener(com.vaadin.data.Container.ItemSetChangeListener listener)
Container.ItemSetChangeListenerlistener - Listener to addItemDataSourceContainer<ITEM,PROPERTY> build()
ItemDataSourceContainer instanceCopyright © 2019 The Holon Platform. All rights reserved.