|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.neoworks.jukex.sqlimpl.JukeXTrackStore
The JukeXTrackStore using a MySQL back end. This is where all core objects should be obtained from.
Field Summary | |
static java.lang.String |
DB_NAME
Name of the database to use |
Method Summary | |
Attribute |
createAttribute(java.lang.String name,
int type)
Create a new attribute for data to support in the jukebox schema |
Playlist |
createPlaylist(java.lang.String name)
Create a playlist with the specified name |
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 |
java.lang.String |
getDBName()
Get the name of the database the TrackStore is using |
static TrackStore |
getInstance()
Get an instance of the TrackStore |
Playlist |
getPlaylist(java.lang.String name)
Get the Playlist with the specified name |
Track |
getTrack(long id)
Get a track from the database by database id |
Track |
getTrack(java.net.URL url)
Get a track from the database by URL |
long |
getTrackCount()
Get the total track count |
long[] |
getTrackIds()
Get an array containing the ids of the tracks in the Track database |
java.util.List |
getTracks(java.util.List ids)
Get a List of Tracks corresponding to a list of database ids |
java.util.List |
getTracks(long[] ids)
Retrieve a List of Track objects with ids as
specified in the passed array |
void |
initialise()
Initialise track store |
Track |
storeTrack(java.net.URL url,
java.util.Date modifiedTime)
Create a track in the database with the specified url and return the object representing that track. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String DB_NAME
Method Detail |
public static TrackStore getInstance()
public void initialise()
public long getTrackCount()
getTrackCount
in interface TrackStore
public Track getTrack(java.net.URL url)
getTrack
in interface TrackStore
url
- The URL of the track
public Track getTrack(long id)
getTrack
in interface TrackStore
id
- The id of the track
public java.util.List getTracks(long[] ids)
List
of Track
objects with ids as
specified in the passed array
getTracks
in interface TrackStore
ids
- The array of ids of Tracks to retrieve
List
of Track
objectspublic java.util.List getTracks(java.util.List ids)
getTracks
in interface TrackStore
ids
- A List of database track ids
public Track storeTrack(java.net.URL url, java.util.Date modifiedTime)
TrackStore
storeTrack
in interface TrackStore
url
- The URL of the track to be added to the databasemodifiedTime
- The date that this Track entry was modified
public Attribute getAttribute(java.lang.String name)
TrackStore
getAttribute
in interface TrackStore
Attribute
object representing the name passed, or null
, if it is not found.public java.util.Set getAttributes()
getAttributes
in interface TrackStore
Set
of all Attribute
objects
currently available in the database.public Attribute createAttribute(java.lang.String name, int type) throws java.lang.Exception
createAttribute
in interface TrackStore
name
- The name of the Attributetype
- The type of the Attribute
java.lang.Exception
public java.lang.String getDBName()
public long[] getTrackIds()
TrackStore
getTrackIds
in interface TrackStore
public Playlist getPlaylist(java.lang.String name)
getPlaylist
in interface TrackStore
name
- The name of the playlist required
public Playlist createPlaylist(java.lang.String name)
createPlaylist
in interface TrackStore
public java.util.Collection getAllPlaylists()
TrackStore
getAllPlaylists
in interface TrackStore
public BatchTrackLoader getBatchTrackLoader()
getBatchTrackLoader
in interface TrackStore
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |