com.holonplatform.vaadin.data

## Interface ItemDataSource.Configuration<ITEM,PROPERTY>

- All Superinterfaces:
    com.holonplatform.core.query.QueryConfigurationProvider, Serializable
  Enclosing interface:
    ItemDataSource<ITEM,PROPERTY>

      public static interface ItemDataSource.Configuration<ITEM,PROPERTY>
      extends com.holonplatform.core.query.QueryConfigurationProvider, Serializable

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `Optional<ItemDataSource.CommitHandler<ITEM>>` | `getCommitHandler()` Get the commit handler
    `Optional<ItemDataProvider<ITEM>>` | `getDataProvider()` Get the item data provider.
    `Optional<ItemIdentifierProvider<ITEM,?>>` | `getItemIdentifierProvider()` Get the `ItemIdentifierProvider`.
    `List<ItemDataSource.ItemSort<PROPERTY>>` | `getItemSorts()` Get current data source items sorting directives properties, providing item property to sort and direction.
    `Iterable<PROPERTY>` | `getProperties()` Get available item properties.
    `Object` | `getPropertyDefaultValue(PROPERTY property)` Get the default value for the given property.
    `Class<?>` | `getPropertyType(PROPERTY property)` Gets the data type of the given data source property.
    `boolean` | `isAutoRefresh()` Returns whether auto-refresh is enabled for this data source, i.e. items are loaded when one of the data source methods which involve operations on item set is called.
    `boolean` | `isPropertyReadOnly(PROPERTY property)` Get whether the given property is read only.
    `boolean` | `isPropertySortable(PROPERTY property)` Get whether the given property is sortable.

    - ### Methods inherited from interface com.holonplatform.core.query.QueryConfigurationProvider

      `getQueryFilter, getQueryParameters, getQuerySort`

- - ### Method Detail

    - #### getItemIdentifierProvider

          Optional<ItemIdentifierProvider<ITEM,?>> getItemIdentifierProvider()

      Get the `ItemIdentifierProvider`.
      Returns:
        the item identifier provider

    - #### getDataProvider

          Optional<ItemDataProvider<ITEM>> getDataProvider()

      Get the item data provider.
      Returns:
        the item data provider

    - #### getCommitHandler

          Optional<ItemDataSource.CommitHandler<ITEM>> getCommitHandler()

      Get the commit handler
      Returns:
        the commit handler

    - #### getProperties

          Iterable<PROPERTY> getProperties()

      Get available item properties.
      Returns:
        Available item properties iterable

    - #### getPropertyType

          Class<?> getPropertyType(PROPERTY property)

      Gets the data type of the given data source property.
      Parameters:
        `property` - Property (not null)
      Returns:
        Property data type

    - #### isPropertyReadOnly

          boolean isPropertyReadOnly(PROPERTY property)

      Get whether the given property is read only.
      Parameters:
        `property` - Property (not null)
      Returns:
        `true` if property is read only, `false` otherwise

    - #### isPropertySortable

          boolean isPropertySortable(PROPERTY property)

      Get whether the given property is sortable.
      Parameters:
        `property` - Property (not null)
      Returns:
        `true` if property is sortable, `false` otherwise

    - #### getPropertyDefaultValue

          Object getPropertyDefaultValue(PROPERTY property)

      Get the default value for the given property.
      Parameters:
        `property` - Property (not null)
      Returns:
        Property default value, or `null` if not available

    - #### isAutoRefresh

          boolean isAutoRefresh()

      Returns whether auto-refresh is enabled for this data source, i.e. items are loaded when one of the data source methods which involve operations on item set is called.

      If auto-refresh is not enabled, `ItemDataSource.refresh()` method must be called to load items.

      Default is `true`.

      Returns:
        Whether auto-refresh is enabled for this data source

    - #### getItemSorts

          List<ItemDataSource.ItemSort<PROPERTY>> getItemSorts()

      Get current data source items sorting directives properties, providing item property to sort and direction.
      Returns:
        Data source items sorting directives, or an empty list if none

Copyright © 2017 The Holon Platform. All rights reserved.