Interface DataGenerator<T>

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      default void destroyAllData()
      Informs the DataGenerator that all data has been dropped.
      default void destroyData​(T item)
      Informs the DataGenerator that the given data item has been dropped and is no longer needed.
      void generateData​(T item, elemental.json.JsonObject jsonObject)
      Adds custom data for the given item to its serialized JsonObject representation.
      default void refreshData​(T item)
      Informs the DataGenerator that a data object has been updated.
    • Method Detail

      • generateData

        void generateData​(T item,
                          elemental.json.JsonObject jsonObject)
        Adds custom data for the given item to its serialized JsonObject representation. This JSON object will be sent to client-side DataProvider.
        Parameters:
        item - the data item being serialized
        jsonObject - the JSON object being sent to the client
      • destroyData

        default void destroyData​(T item)
        Informs the DataGenerator that the given data item has been dropped and is no longer needed. This method should clean up any unneeded information stored for this item.
        Parameters:
        item - the dropped data item
      • destroyAllData

        default void destroyAllData()
        Informs the DataGenerator that all data has been dropped. This method should clean up any unneeded information stored for items.
      • refreshData

        default void refreshData​(T item)
        Informs the DataGenerator that a data object has been updated. This method should update any unneeded information stored for given item.
        Parameters:
        item - the updated item