Interface StructuredEntity

  • All Superinterfaces:
    Entity

    public interface StructuredEntity
    extends Entity
    Entity for storing structured data. Anything that can be represented as a StreamingInput is considered structured data.
    Author:
    Andreas Holstenson
    • Method Summary

      Modifier and Type Method Description
      <T> ObjectEntity<T> asObject​(Class<T> type, Function<T,​Object> identityMapper)
      Get an entity that translates the structured data into objects.
      default <T> ObjectEntity<T> asObject​(se.l4.commons.serialization.Serializer<T> serializer, Function<T,​Object> identityMapper)
      Get an entity that translates the structured data into objects.
      DeleteResult delete​(Object id)
      Delete data associated with the given identifier.
      FetchResult<se.l4.commons.serialization.format.StreamingInput> get​(Object id)
      Get data stored for the given identifier.
      <RT,​Q extends Query<?>>
      Q
      query​(String engine, QueryType<se.l4.commons.serialization.format.StreamingInput,​RT,​Q> type)
      Query the the query engine.
      StoreResult store​(Object id, se.l4.commons.serialization.format.StreamingInput out)
      Store new data and associate it with the given identifier.
      FetchResult<se.l4.commons.serialization.format.StreamingInput> stream()
      Stream everything in this entry.
    • Method Detail

      • get

        FetchResult<se.l4.commons.serialization.format.StreamingInput> get​(Object id)
        Get data stored for the given identifier.
        Parameters:
        id -
        Returns:
      • store

        StoreResult store​(Object id,
                          se.l4.commons.serialization.format.StreamingInput out)
        Store new data and associate it with the given identifier.
        Parameters:
        id -
        out -
        Returns:
      • delete

        DeleteResult delete​(Object id)
        Delete data associated with the given identifier.
        Parameters:
        id -
        Returns:
      • query

        <RT,​Q extends Query<?>> Q query​(String engine,
                                              QueryType<se.l4.commons.serialization.format.StreamingInput,​RT,​Q> type)
        Query the the query engine.
        Parameters:
        index -
        Returns:
      • stream

        FetchResult<se.l4.commons.serialization.format.StreamingInput> stream()
        Stream everything in this entry.
        Returns:
      • asObject

        <T> ObjectEntity<T> asObject​(Class<T> type,
                                     Function<T,​Object> identityMapper)
        Get an entity that translates the structured data into objects. This will call #asObject(Serializer) with a serializer fetched from the current SerializerCollection.
        Parameters:
        type -
        Returns:
      • asObject

        default <T> ObjectEntity<T> asObject​(se.l4.commons.serialization.Serializer<T> serializer,
                                             Function<T,​Object> identityMapper)
        Get an entity that translates the structured data into objects.
        Parameters:
        serializer -
        Returns: