com.holonplatform.vaadin7.data.container

## Interface PropertyBoxItem

- All Superinterfaces:
    com.vaadin.data.Item, Serializable

      public interface PropertyBoxItem
      extends com.vaadin.data.Item

  A container `Item` which uses a `PropertyBox` instance to hold and provide item property values.

  This Item property set is immutable and coincides with the bound PropertyBox property set, so `Item.addItemProperty(Object, com.vaadin.data.Property)` and `Item.removeItemProperty(Object)` operations are not supported, throwing an `UnsupportedOperationException`.

  Since:
    5.0.0

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface com.vaadin.data.Item

      `com.vaadin.data.Item.Editor, com.vaadin.data.Item.PropertySetChangeEvent, com.vaadin.data.Item.PropertySetChangeListener, com.vaadin.data.Item.PropertySetChangeNotifier, com.vaadin.data.Item.Viewer`

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `static PropertyBoxItem` | `create(com.holonplatform.core.property.PropertyBox propertyBox)` Create a PropertyBoxItem using given `propertyBox`
    `static <P extends com.holonplatform.core.property.Property<?>> PropertyBoxItem` | `empty(Iterable<P> properties)` Create a PropertyBoxItem bound to an empty PropertyBox using given properties.
    `static <P extends com.holonplatform.core.property.Property<?>> PropertyBoxItem` | `empty(P... properties)` Create a PropertyBoxItem bound to an empty PropertyBox using given properties.
    `static <P extends com.holonplatform.core.property.Property<?>> PropertyBoxItem` | `fromBean(Object bean, com.holonplatform.core.property.PropertySet<P> properties)` Create a PropertyBoxItem using given `properties` as property set and reading property values from given `bean` instance.
    `com.holonplatform.core.property.PropertyBox` | `getPropertyBox()` Get the `PropertyBox` to which the Item is bound

    - ### Methods inherited from interface com.vaadin.data.Item

      `addItemProperty, getItemProperty, getItemPropertyIds, removeItemProperty`

- - ### Method Detail

    - #### getPropertyBox

          com.holonplatform.core.property.PropertyBox getPropertyBox()

      Get the `PropertyBox` to which the Item is bound
      Returns:
        Item PropertyBox

    - #### create

          static PropertyBoxItem create(com.holonplatform.core.property.PropertyBox propertyBox)

      Create a PropertyBoxItem using given `propertyBox`
      Parameters:
        `propertyBox` - `PropertyBox` to provide item property set and values (not null)
      Returns:
        PropertyBoxItem instance

    - #### empty

          @SafeVarargs
          static <P extends com.holonplatform.core.property.Property<?>> PropertyBoxItem empty(P... properties)

      Create a PropertyBoxItem bound to an empty PropertyBox using given properties.
      Type Parameters:
        `P` - Actual property type
      Parameters:
        `properties` - Property set
      Returns:
        PropertyBoxItem instance

    - #### empty

          static <P extends com.holonplatform.core.property.Property<?>> PropertyBoxItem empty(Iterable<P> properties)

      Create a PropertyBoxItem bound to an empty PropertyBox using given properties.
      Type Parameters:
        `P` - Actual property type
      Parameters:
        `properties` - Property set
      Returns:
        PropertyBoxItem instance

    - #### fromBean

          static <P extends com.holonplatform.core.property.Property<?>> PropertyBoxItem fromBean(Object bean,
                                                                                                  com.holonplatform.core.property.PropertySet<P> properties)

      Create a PropertyBoxItem using given `properties` as property set and reading property values from given `bean` instance.

      Only bean properties whose name matches a `Path` with same name contained in this PropertyBox property set will be considered.

      Bean instance structure must the follow JavaBeans rules providing getter methods to read bean property values.

      Type Parameters:
        `P` - Actual property type
      Parameters:
        `bean` - Bean instance (not null)
        `properties` - Property set (not null)
      Returns:
        PropertyBoxItem instance

Copyright © 2019 The Holon Platform. All rights reserved.