Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.neoworks.jukex.sqlimpl
Interface BatchTrackLoader

public interface BatchTrackLoader

Interface that allows a batch retrieval of tracks in order to atone for the inherent slowness of retrieving their attributes from the database on a per track basis, resulting in a huge number of queries.

Author:
  Nick Vincent

  Method Summary
  `void` | `addTrack(long id)` Add a trackID to this batch for retrieval.
  `void` | `addTracks(java.util.List idlist)` Add all of the IDs from this list to the batch for retrieval The List specified must contain Long objects.
  `java.util.Map` | `getTracks()` Retrieve the tracks with the ids that this loader has been told about.
  `void` | `reset()` Clear the IDs to retrieve

  Method Detail

  ### getTracks

      public java.util.Map getTracks()

    Retrieve the tracks with the ids that this loader has been told about. The function returns a `Map` of `Track` objects keyed by Track ID. The Track IDs themselves are `Long` objects.

    Returns:
      A Map keyed by `Long` objects containing `Track` objects.

  ### addTrack

      public void addTrack(long id)

    Add a trackID to this batch for retrieval. Tracks are retrieved in the order in which the IDs are added.

    Parameters:
      `id` - The ID to add to the batch.

  ### addTracks

      public void addTracks(java.util.List idlist)

    Add all of the IDs from this list to the batch for retrieval The List specified must contain Long objects. Any other objects will be ignored.

    Parameters:
      `idlist` - A `List` of `Long` objects representing the IDs of Tracks to add to the batch.

  ### reset

      public void reset()

    Clear the IDs to retrieve

  Overview | Package | Class | Use | Tree | Deprecated | Index | Help
  PREV CLASS NEXT CLASS | FRAMES NO FRAMES
  SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD