Class SimpleDataItem

java.lang.Object
io.jmix.ui.data.impl.SimpleDataItem
All Implemented Interfaces:
DataItem, DataItem.HasId, Serializable

public class SimpleDataItem extends Object implements DataItem, DataItem.HasId
Data item, which contains an instance of any class.
See Also:
  • Field Details

    • item

      protected Object item
  • Constructor Details

    • SimpleDataItem

      public SimpleDataItem(Object item)
  • Method Details

    • getItem

      public Object getItem()
      Returns:
      item
    • setItem

      public void setItem(Object item)
      Sets item.
      Parameters:
      item - item to be set
    • getValue

      public Object getValue(String path)
      Get an property value. Locates the property by the given path in object graph starting from this object.

      Each property in a class which will be used by SimpleDataItem must have a public getter method. Reflection is used to get property values.

      Specified by:
      getValue in interface DataItem
      Parameters:
      path - path to the attribute
      Returns:
      the value of a property with the specified property path. If property value is an instance of Collection, then method returns List of SimpleDataItem. If any traversing property value is null, this method stops here and returns current value. Otherwise method returns getter value
    • getMethodsCache

      protected MethodsCache getMethodsCache(Object object)
    • getId

      public Object getId()
      Specified by:
      getId in interface DataItem.HasId
      Returns:
      unique identifier of DataItem