PROPERTY - Item property typeITEM - Item typepublic static interface ItemDataSource.Builder<ITEM,PROPERTY>
ItemDataSource instances.| Modifier and Type | Method and Description |
|---|---|
ItemDataSource.Builder<ITEM,PROPERTY> |
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.
|
ItemDataSource.Builder<ITEM,PROPERTY> |
batchSize(int batchSize)
Set batch (page) size for items loading using
ItemDataProvider. |
ItemDataSource<ITEM,PROPERTY> |
build()
Build
ItemDataSource instance |
ItemDataSource.Builder<ITEM,PROPERTY> |
commitHandler(ItemDataSource.CommitHandler<ITEM> commitHandler)
Set the handler to manage item set modifications.
|
ItemDataSource.Builder<ITEM,PROPERTY> |
dataSource(ItemDataProvider<ITEM> dataProvider)
Set the items data provider.
|
ItemDataSource.Builder<ITEM,PROPERTY> |
defaultSort(com.holonplatform.core.query.QuerySort sort)
Set query default sort.
|
ItemDataSource.Builder<ITEM,PROPERTY> |
defaultValue(PROPERTY propertyId,
Object defaultValue)
Set a default value to initialize the given
propertyId |
ItemDataSource.Builder<ITEM,PROPERTY> |
fixedFilter(com.holonplatform.core.query.QueryFilter filter)
Set query fixed filter (always added to query predicates)
|
ItemDataSource.Builder<ITEM,PROPERTY> |
fixedSort(com.holonplatform.core.query.QuerySort sort)
Set query fixed sort (always added to query sorts)
|
<ID> ItemDataSource.Builder<ITEM,PROPERTY> |
itemIdentifier(ItemIdentifierProvider<ITEM,ID> itemIdentifierProvider)
Set the item identifier provider to use to obtain item ids.
|
ItemDataSource.Builder<ITEM,PROPERTY> |
maxCacheSize(int maxCacheSize)
Set max items cache size
|
ItemDataSource.Builder<ITEM,PROPERTY> |
propertyId(PROPERTY property,
String propertyId)
Set the property String id of given
property. |
ItemDataSource.Builder<ITEM,PROPERTY> |
queryParameter(String name,
Object value)
Add a query parameter
|
ItemDataSource.Builder<ITEM,PROPERTY> |
readOnly(PROPERTY propertyId,
boolean readOnly)
Set whether given property id is read-only.
|
ItemDataSource.Builder<ITEM,PROPERTY> |
sortable(boolean sortable)
Set whether all the properties are sortable.
|
ItemDataSource.Builder<ITEM,PROPERTY> |
sortable(PROPERTY propertyId,
boolean sortable)
Set whether given property id is sortable.
|
default ItemDataSource.Builder<ITEM,PROPERTY> |
withProperty(PROPERTY property,
Class<?> type)
Add an Item property to this data source.
|
ItemDataSource.Builder<ITEM,PROPERTY> |
withProperty(PROPERTY property,
Class<?> type,
boolean generatePropertyId)
Add an Item property to this data source.
|
ItemDataSource.Builder<ITEM,PROPERTY> |
withPropertySortGenerator(PROPERTY property,
ItemDataSource.PropertySortGenerator<PROPERTY> propertySortGenerator)
|
ItemDataSource.Builder<ITEM,PROPERTY> |
withQueryConfigurationProvider(com.holonplatform.core.query.QueryConfigurationProvider queryConfigurationProvider)
Add an external
QueryConfigurationProvider for additional query configuration |
ItemDataSource.Builder<ITEM,PROPERTY> |
withReadOnlyProperty(PROPERTY property,
Class<?> type)
Add an Item property to this data source and declares it as read-only.
|
ItemDataSource.Builder<ITEM,PROPERTY> |
withReadOnlySortableProperty(PROPERTY property,
Class<?> type)
Add an Item property to this data source and declares it as read-only and sortable.
|
ItemDataSource.Builder<ITEM,PROPERTY> |
withSortableProperty(PROPERTY property,
Class<?> type)
Add an Item property to this data source and declares it as sortable.
|
ItemDataSource.Builder<ITEM,PROPERTY> dataSource(ItemDataProvider<ITEM> dataProvider)
dataProvider - The items data provider to set<ID> ItemDataSource.Builder<ITEM,PROPERTY> itemIdentifier(ItemIdentifierProvider<ITEM,ID> itemIdentifierProvider)
ID - Item id typeitemIdentifierProvider - the item identifier provider to setItemDataSource.Builder<ITEM,PROPERTY> withProperty(PROPERTY property, Class<?> type, boolean generatePropertyId)
property - Property to add (not null)type - Property value type (not null)generatePropertyId - Whether to auto generate a property id as Stringdefault ItemDataSource.Builder<ITEM,PROPERTY> withProperty(PROPERTY property, Class<?> type)
property - Property to add (not null)type - Property value type (not null)ItemDataSource.Builder<ITEM,PROPERTY> withSortableProperty(PROPERTY property, Class<?> type)
property - Property to add (not null)type - Property value type (not null)ItemDataSource.Builder<ITEM,PROPERTY> withReadOnlyProperty(PROPERTY property, Class<?> type)
property - Property to add (not null)type - Property value type (not null)ItemDataSource.Builder<ITEM,PROPERTY> withReadOnlySortableProperty(PROPERTY property, Class<?> type)
property - Property to add (not null)type - Property value type (not null)ItemDataSource.Builder<ITEM,PROPERTY> propertyId(PROPERTY property, String propertyId)
property.property - Property (not null)propertyId - Property idItemDataSource.Builder<ITEM,PROPERTY> 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-refreshItemDataSource.Builder<ITEM,PROPERTY> batchSize(int batchSize)
ItemDataProvider.
A value <=0 means no paging, and ItemDataProvider should behave in a consistent
manner.
batchSize - Batch (page) size for items loadingItemDataSource.Builder<ITEM,PROPERTY> maxCacheSize(int maxCacheSize)
maxCacheSize - Max cache size to setItemDataSource.Builder<ITEM,PROPERTY> sortable(boolean sortable)
NOTE: It only applies to already added properties.
sortable - Whether all the properties are sortableItemDataSource.Builder<ITEM,PROPERTY> sortable(PROPERTY propertyId, boolean sortable)
propertyId - Property idsortable - Whether given property id is sortableItemDataSource.Builder<ITEM,PROPERTY> readOnly(PROPERTY propertyId, boolean readOnly)
propertyId - Property idreadOnly - Whether given property id is read-onlyItemDataSource.Builder<ITEM,PROPERTY> defaultValue(PROPERTY propertyId, Object defaultValue)
propertyIdpropertyId - Property iddefaultValue - Default valueItemDataSource.Builder<ITEM,PROPERTY> withPropertySortGenerator(PROPERTY property, ItemDataSource.PropertySortGenerator<PROPERTY> propertySortGenerator)
property - Property (not null)propertySortGenerator - PropertySortGenerator (not null)ItemDataSource.Builder<ITEM,PROPERTY> withQueryConfigurationProvider(com.holonplatform.core.query.QueryConfigurationProvider queryConfigurationProvider)
QueryConfigurationProvider for additional query configurationqueryConfigurationProvider - QueryConfigurationProvider to addItemDataSource.Builder<ITEM,PROPERTY> fixedFilter(com.holonplatform.core.query.QueryFilter filter)
filter - Query fixed filter, or null for noneItemDataSource.Builder<ITEM,PROPERTY> fixedSort(com.holonplatform.core.query.QuerySort sort)
sort - Query fixed sort, or null for noneItemDataSource.Builder<ITEM,PROPERTY> defaultSort(com.holonplatform.core.query.QuerySort sort)
null and no other sort is available, this one will be usedsort - Default query sortItemDataSource.Builder<ITEM,PROPERTY> queryParameter(String name, Object value)
name - Parameter namevalue - Parameter valueItemDataSource.Builder<ITEM,PROPERTY> commitHandler(ItemDataSource.CommitHandler<ITEM> commitHandler)
This is required to activate item set modification support.
commitHandler - Item commit handlerItemDataSource<ITEM,PROPERTY> build()
ItemDataSource instanceCopyright © 2019 The Holon Platform. All rights reserved.