Interface DataAccessSession<D>

Type Parameters:
D - Type of data access is given to.

public interface DataAccessSession<D>
Session providing access to data.
Since:
5.2.5
  • Method Summary

    Modifier and Type
    Method
    Description
    Provides the renderer having means to produce representable information for displaying a data element.
    Attention: This call should return very fast.
    Creates an aspectable builder for data streams.
    Attention: This call should return very fast.
    <A> A
    Look up a specific aspect that may be supported by this plug-in.
    Attention: This method may be called very often and must return very fast.
    getData(String identifier)
    Gets a data object by its identifier.
    getData(Collection<String> identifiers)
    Bulk operation to get data objects by their identifiers.
    getIdentifier(D object)
    Provide a unique identifier for the given data object.
  • Method Details

    • getAspect

      @Nullable <A> A getAspect(@NotNull SessionAspectType<A> type)
      Look up a specific aspect that may be supported by this plug-in.
      Attention: This method may be called very often and must return very fast.
      Type Parameters:
      A - The object type of the aspect.
      Parameters:
      type - The type of aspect.
      Returns:
      An aspect implementer or null, if the aspect is not supported.
      Since:
      5.2.5
    • getData

      @NotNull D getData(@NotNull String identifier) throws NoSuchElementException
      Gets a data object by its identifier.
      Parameters:
      identifier - The identifier to look up.
      Returns:
      The matching data object.
      Throws:
      NoSuchElementException - If there is no data object for the given identifier.
      Since:
      5.2.5
    • getData

      @NotNull List<D> getData(@NotNull Collection<String> identifiers)
      Bulk operation to get data objects by their identifiers. The resulting object list has to match the list of identifiers in size and order. Listed identifiers not fit to provide a data object must result in a null entry in the returned list.
      Parameters:
      identifiers - The identifiers to fetch data objects for.
      Returns:
      A list of matching data objects.
      Since:
      5.2.5
    • getIdentifier

      @NotNull String getIdentifier(@NotNull D object) throws NoSuchElementException
      Provide a unique identifier for the given data object.
      Parameters:
      object - The data object to provide an identifer for.
      Returns:
      A unique identifer matching the given object.
      Throws:
      NoSuchElementException - If the given object could not be identified as eligible data object.
      Since:
      5.2.5
    • createDataSnippetProvider

      @NotNull DataSnippetProvider<D> createDataSnippetProvider()
      Provides the renderer having means to produce representable information for displaying a data element.
      Attention: This call should return very fast.
      Returns:
      A renderer for data.
      Since:
      5.2.11
    • createDataStreamBuilder

      @NotNull DataStreamBuilder<D> createDataStreamBuilder()
      Creates an aspectable builder for data streams.
      Attention: This call should return very fast.
      Returns:
      A data stream builder.
      Since:
      5.2.19