
net.kemitix.itunes.medialibrary.MediaLibraryImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of itunes-medialibrary Show documentation
Show all versions of itunes-medialibrary Show documentation
Java library for reading/writing to the iTunes MediaLibrary SQLite database
The newest version!
package net.kemitix.itunes.medialibrary;
import java.io.File;
import java.sql.SQLException;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Component
class MediaLibraryImpl implements MediaLibrary {
private final AlbumDao albumDao;
private final ArtistDao artistDao;
private final ItemDao itemDao;
private final AlbumTrackDao albumTracksDao;
@Autowired
public MediaLibraryImpl(
AlbumDao albumDao,
ArtistDao artistDao,
ItemDao itemDao,
AlbumTrackDao albumTracksDao
) {
this.albumDao = albumDao;
this.artistDao = artistDao;
this.itemDao = itemDao;
this.albumTracksDao = albumTracksDao;
}
@Override
public List getAlbums() throws SQLException {
return albumDao.selectAll();
}
@Override
public List getArtists() throws SQLException {
return artistDao.selectAll();
}
@Override
public List- getItems() throws SQLException {
return itemDao.selectAll();
}
@Override
public List
getAlbumTracks() throws SQLException {
return albumTracksDao.selectAll();
}
@Override
public AlbumTrack findAlbumTrack(File file) {
return albumTracksDao.find(file);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy