Class HibernateFileSystemLibraryLoader
- java.lang.Object
-
- com.tagtraum.beatunes.library.LibraryLoader
-
- com.tagtraum.beatunes.library.filesystem.HibernateFileSystemLibraryLoader
-
public class HibernateFileSystemLibraryLoader extends LibraryLoader
Hibernate File System Library Loader.- Author:
- Hendrik Schreiber
-
-
Constructor Summary
Constructors Constructor Description HibernateFileSystemLibraryLoader(HibernateMediaLibrary<?> library)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long[]
addSongs(AudioSong... audioSongs)
Adds audio song to database.MediaLibrary
getMediaLibrary()
MediaLibraryEvent
load(LibraryDescriptor libraryDescriptor, ProgressListener progressListener, boolean full)
Implement this method to establish the actual loading process.-
Methods inherited from class com.tagtraum.beatunes.library.LibraryLoader
getHibernateMediaLibrary, load
-
-
-
-
Constructor Detail
-
HibernateFileSystemLibraryLoader
public HibernateFileSystemLibraryLoader(HibernateMediaLibrary<?> library)
-
-
Method Detail
-
getMediaLibrary
public MediaLibrary getMediaLibrary()
- Specified by:
getMediaLibrary
in classLibraryLoader
-
load
public MediaLibraryEvent load(LibraryDescriptor libraryDescriptor, ProgressListener progressListener, boolean full) throws Exception
Description copied from class:LibraryLoader
Implement this method to establish the actual loading process. Do not call this method yourself. It will be called byAbstractMediaLibrary
. Note that loading includes loading tracks from an external source (e.g. iTunes or the file system) AND building playlists based on them. At the very least, a library playlist must be built.- Specified by:
load
in classLibraryLoader
- Parameters:
libraryDescriptor
- describes the library we are supposed to loadprogressListener
- progress listener to notify of progress @see #load(com.tagtraum.core.ProgressListener, javax.swing.JDialog)full
- attempt full synchronization no matter what- Returns:
- event object describing the load results
- Throws:
Exception
- if something went wrong
-
addSongs
public long[] addSongs(AudioSong... audioSongs)
Adds audio song to database. Fails silently.- Parameters:
audioSongs
- audioSongs to add- Returns:
- new ids or
null
in case of failure
-
-