Interface LoadIds<T>

All Known Subinterfaces:
LoadType<T>

public interface LoadIds<T>

Terminator methods for a fetch-by-key command chain which constructs the key implicitly from type, id, and (optionally) parent.

All command objects are immutable.

Author:
Jeff Schnitzer
  • Method Summary

    Modifier and Type
    Method
    Description
    id​(long id)
    Specify the numeric id of an entity and start asynchronous fetch.
    id​(String id)
    Specify the String id of an entity and start asynchronous fetch.
    <S> Map<S,​T>
    ids​(Iterable<S> ids)
    Specify the ids of multiple entities and start asynchronous fetch.
    Map<Long,​T>
    ids​(Long... ids)
    Specify the numeric ids of multiple entities and start asynchronous fetch.
    ids​(String... ids)
    Specify the String ids of multiple entities and start asynchronous fetch.
  • Method Details

    • id

      LoadResult<T> id(long id)

      Specify the numeric id of an entity and start asynchronous fetch.

      Parameters:
      id - - the id of the entity to fetch. Note that numeric ids and String ids are not equivalent; 123 and "123" are different ids.
      Returns:
      an asynchronous result that can materialize the entity
    • id

      LoadResult<T> id(String id)

      Specify the String id of an entity and start asynchronous fetch.

      Parameters:
      id - - the id of the entity to fetch. Note that numeric ids and String ids are not equivalent; 123 and "123" are different ids.
      Returns:
      an asynchronous result that can materialize the entity
    • ids

      Map<Long,​T> ids(Long... ids)

      Specify the numeric ids of multiple entities and start asynchronous fetch.

      Parameters:
      ids - - the ids of the entity to fetch. Note that numeric ids and String ids are not equivalent; 123 and "123" are different ids.
      Returns:
      a Map of the asynchronous result. The first method call on the Map will synchronously finish the call.
    • ids

      Map<String,​T> ids(String... ids)

      Specify the String ids of multiple entities and start asynchronous fetch.

      Parameters:
      ids - - the ids of the entity to fetch. Note that numeric ids and String ids are not equivalent; 123 and "123" are different ids.
      Returns:
      a Map of the asynchronous result. The first method call on the Map will synchronously finish the call.
    • ids

      <S> Map<S,​T> ids(Iterable<S> ids)

      Specify the ids of multiple entities and start asynchronous fetch.

      Parameters:
      ids - - the ids of the entities to fetch. The Iterator must provide Long or String. Note that numeric ids and String ids are not equivalent; 123 and "123" are different ids.
      Returns:
      a Map of the asynchronous result. The first method call on the Map will synchronously finish the call.