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
Interface TrackStore

All Known Implementing Classes:
  JukeXTrackStore

public interface TrackStore

TrackStore is the core of the JukeX system. The TrackStore provides the means to access all core objects. It handles all database operations.

Author:
  Nick Vincent (nick@neoworks.com)

Method Summary
`Attribute` | `createAttribute(java.lang.String name, int type)` Return an attribute of the corresponding name and type, creating a new attribute within the system if necessary.
`Playlist` | `createPlaylist(java.lang.String name)` Get the Playlist with the specified name, or create it if it does not already exist.
`java.util.Collection` | `getAllPlaylists()` Return all of the Playlists currently defined
`Attribute` | `getAttribute(java.lang.String name)` Return the Attribute object representing the attribute with that name
`java.util.Set` | `getAttributes()` Get a list of all the attributes currently supported by the system
`BatchTrackLoader` | `getBatchTrackLoader()` Return a batch track loader
`Playlist` | `getPlaylist(java.lang.String name)` Get the Playlist with the specified name
`Track` | `getTrack(long id)` Get a Track object by database id
`Track` | `getTrack(java.net.URL url)` Get a Track object by URL
`long` | `getTrackCount()` Get the number of tracks in the Track database
`long[]` | `getTrackIds()` Get an array containing the ids of the tracks in the Track database
`java.util.List` | `getTracks(java.util.List ids)` Retrieve a `List` of `Track` objects with ids as specified in a List of Integers.
`java.util.List` | `getTracks(long[] ids)` Retrieve a `List` of `Track` objects with ids as specified.
`Track` | `storeTrack(java.net.URL url, java.util.Date modifieddate)` Create a track in the database with the specified url and return the object representing that track.

Method Detail

### getTrack

    public Track getTrack(java.net.URL url)

  Get a Track object by URL

  Parameters:
    `url` - The URL of the track
  Returns:
    The Track object

### getTrack

    public Track getTrack(long id)

  Get a Track object by database id

  Parameters:
    `id` - The track id
  Returns:
    The Track object

### getTracks

    public java.util.List getTracks(long[] ids)

  Retrieve a `List` of `Track` objects with ids as specified.

  Parameters:
    `ids` - Array of ids for the Tracks to retrieve
  Returns:
    A `List` of `Track` objects

### getTrackCount

    public long getTrackCount()

  Get the number of tracks in the Track database

  Returns:
    The number of tracks

### getTrackIds

    public long[] getTrackIds()

  Get an array containing the ids of the tracks in the Track database

  Returns:
    An array of track ids

### getTracks

    public java.util.List getTracks(java.util.List ids)

  Retrieve a `List` of `Track` objects with ids as specified in a List of Integers.

  Parameters:
    `ids` - The List of Integer objects of ids of Tracks to retrieve
  Returns:
    A `List` of `Track` objects

### storeTrack

    public Track storeTrack(java.net.URL url,
                            java.util.Date modifieddate)

  Create a track in the database with the specified url and return the object representing that track.

  Parameters:
    `url` - The URL of the track to be added to the database
    `modifieddate` - The date that this Track entry was modified
  Returns:
    The newly added Track

### getAttribute

    public Attribute getAttribute(java.lang.String name)

  Return the Attribute object representing the attribute with that name

  Returns:
    The `Attribute` object representing the name passed, or `null`, if it is not found.

### getAttributes

    public java.util.Set getAttributes()

  Get a list of all the attributes currently supported by the system

  Returns:
    The `Set` of all `Attribute` objects currently available in the database.

### createAttribute

    public Attribute createAttribute(java.lang.String name,
                                     int type)
                              throws java.lang.Exception

  Return an attribute of the corresponding name and type, creating a new attribute within the system if necessary.

  Returns:
    An attribute with the corresponding name and type.
    `java.lang.Exception`

### getAllPlaylists

    public java.util.Collection getAllPlaylists()

  Return all of the Playlists currently defined

  Returns:
    A Collection of Playlist objects currently known by the TrackStore

### getPlaylist

    public Playlist getPlaylist(java.lang.String name)

  Get the Playlist with the specified name

  Returns:
    A Playlist with the specified name, or `null` if one does not exist.

### createPlaylist

    public Playlist createPlaylist(java.lang.String name)

  Get the Playlist with the specified name, or create it if it does not already exist.

  Returns:
    A Playlist with the specified name

### getBatchTrackLoader

    public BatchTrackLoader getBatchTrackLoader()

  Return a batch track loader

  Returns:
    A BatchTrackLoader from this TrackStore

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