|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Dao
Method Summary | |
---|---|
int |
count(java.lang.String hql,
java.util.Map<java.lang.String,java.lang.Object> params)
|
void |
deleteAiBag(AIBag delete)
Deletes an AIBag. |
void |
deleteArtist(Artist delete)
Deletes an artist. |
void |
evict(java.lang.Object o)
|
void |
evictSong(long songid)
|
IUser |
findUserByName(java.lang.String username)
Searches for a User, and returns if, if found. |
AIBag |
getAIBagById(long id)
Retrieves the ai_bag with the given id from the database. |
AIBag |
getArtistAppearances(long artistid)
Return a list of all appearances of an artist in songs. |
Artist |
getArtistById(long id)
Retrieves the artist with the given id from the database. |
Band |
getBandById(long id)
Retrieves the band with the given id from the database. |
Band |
getBandByName(java.lang.String name)
Retrieves the band with the given name from the database. |
java.util.List<java.lang.Long[]> |
getDoubleSongs()
Searches the database for songs that are stored more than one time in the database. |
Instrument |
getInstrumentById(long id)
Retrieves the instrument with the given id from the database. |
Keywordbag |
getKeywordBagById(long id)
Retrieves the keyword bag with the given id from the database. |
Keyword |
getKeywordById(long id)
Retrieves the keyword with the given id from the database. |
Keywordbag |
getKeywordsBag(java.util.Collection<Keyword> keywords)
|
AIBag |
getMostUsedAIBag(Band band)
Searches the database for the most used AIBag for this band. |
Playlist |
getNeighbours(long songid,
IUser user)
Returns a Playlist containing Songs that are neighbours of the given Song and User. |
Playlist |
getPlaylistById(long playlistid,
IUser user)
Returns a specific Playlist |
Playlist |
getPlaylistByName(java.lang.String name)
Retrieves the Playlist with the given name from the database. |
org.hibernate.SessionFactory |
getSessionFactory2()
Returns the SessionFactory. |
Song |
getSong(Band band,
java.lang.String songname)
Find a song with the given name performed by the specified band. |
Song |
getSongById(long id)
Retrieves the song with the given id from the database. |
java.util.List<java.lang.Long> |
getSongIds()
|
java.util.List<Song> |
getSongsById(java.util.Collection<java.lang.Long> ids)
Retrieves a number of songs from the database, corresponding with the given Ids. |
org.springframework.orm.hibernate3.HibernateTemplate |
getSupport()
|
java.util.List<AIBag> |
listAIBags()
Returns a list of all Artist-Instrument bags. |
java.util.List<java.lang.Object[]> |
listBands(IUser user)
|
java.util.List<Keywordbag> |
listKeywordbags()
Returns a list of all Keyword bags. |
java.util.List<Keyword> |
listKeywords()
Lists all known Keywords. |
java.util.List<java.lang.Object[]> |
listKeywords(IUser user,
java.util.List<Keywordbag> bags)
|
java.util.List<Keywordbag> |
listKeywordsBags(java.util.List<Keyword> keywords)
Returns a list with all keyword bags that contain at least all keywords given in the "keywords" parameter. |
java.util.List<java.lang.Object[]> |
listMonthlySongCounts()
|
java.util.Map<java.lang.String,java.lang.Integer> |
listMonthlyStatistics(IUser user)
Returns per-user play-statistics. |
java.util.List<java.lang.Object[]> |
listNamableItems()
|
java.util.List<Playlist> |
listPlaylists()
Lists all Playlists. |
java.util.List<Playlist> |
listPlaylists(Band band)
Lists all playlists on which a band is present. |
java.util.List<Playlist> |
listPlaylists(Song song)
|
java.util.List<Playlist> |
listPodcasts()
Lists all Playlists that contain Podcasts. |
void |
mergeBands(Band keep,
Band remove)
Merge two bands, moving all songs from one to the other. |
void |
mergePlaylists(Playlist keep,
Playlist delete)
Merge the two playlists into one. |
void |
mergeSongs(Song keep,
Song remove)
Merges two songs to one. |
void |
registerSongChangeListener(SongChangeListener listener)
Adds a SongChangeListener to the internal list of listeners. |
void |
save(AIBag aibag)
Persist the properties of this AIBag. |
void |
save(Artist artist)
Persist the properties of this artist. |
void |
save(Band band)
Persist the properties of this band. |
void |
save(Instrument instr)
Persist the properties of this Instrument. |
void |
save(Keyword keyword)
Persist the properties of this keyword. |
void |
save(Keywordbag keywordbag)
Persist a keyword bag. |
void |
save(Link link)
Persist the properties of this link. |
void |
save(Playlist playlist)
Persist the properties of this playlist. |
void |
save(Song song)
Persist the properties of this song. |
java.util.List |
search(java.lang.String hql,
java.util.Map<java.lang.String,java.lang.Object> params,
int maxResults)
Searches in the Database, and returns the objects that were selected. |
java.util.List |
search(java.lang.String hql,
java.util.Map<java.lang.String,java.lang.Object> params,
int maxResults,
int offset)
Searches in the Database, and returns the objects that were selected. |
Artist |
searchArtist(java.lang.String artistfirstname,
java.lang.String artistlastname)
Find an artist matching the given first and last name. |
Band |
searchBand(java.lang.String bandname)
Locate and load the band with the given name. |
Instrument |
searchInstrument(java.lang.String instrname)
Returns the instrument with the given instrument name or NULL if there is no instrument with the given name. |
Keyword |
searchKeyword(java.lang.String keyworddesc)
Find a keyword matching the given keyword-string. |
java.util.List<Playlist> |
searchPlaylist(java.lang.String playlistname)
Find a playlist matching the given name. |
Playlist |
songsByBand(long bandid)
|
Playlist |
songsByKeyword(long keywordid)
|
Playlist |
songsByKeywordbags(java.util.List<Keywordbag> bags,
IUser user,
int maxResults)
Generates a Playlist containing songs that belong to the specified Keywordbags. |
Playlist |
songsByKeywordIds(java.util.List<java.lang.Long> keywordIds,
IUser user)
|
Playlist |
songsByKeywords(java.util.List<Keyword> keywords,
IUser user)
|
Methods inherited from interface org.musicontroller.security.UserDao |
---|
delete, findUserByLoginname, findUserByNamePassword, getUserById, getUserByLoginname, listRoles, listUsers, save |
Method Detail |
---|
java.util.List<java.lang.Long> getSongIds()
Song getSongById(long id)
id
- The song id.
java.util.List<Song> getSongsById(java.util.Collection<java.lang.Long> ids)
ids
- The ids to get. This must not be null.
Band getBandById(long id)
id
- The band id.
Band getBandByName(java.lang.String name)
name
- The band name.
Keyword getKeywordById(long id)
id
- The keyword id.
Keywordbag getKeywordBagById(long id)
id
- The keyword bag id.
Artist getArtistById(long id)
id
- The artist id.
AIBag getAIBagById(long id)
id
- The ai_bag id.
Instrument getInstrumentById(long id)
id
- The instrument id.
Playlist getPlaylistById(long playlistid, IUser user)
playlistid
- The requested playlist id.user
- The user to use for retrieving "special" playlists.
Playlist getPlaylistByName(java.lang.String name)
name
- The playlist name.
Playlist songsByBand(long bandid)
Playlist songsByKeyword(long keywordid)
Playlist songsByKeywordbags(java.util.List<Keywordbag> bags, IUser user, int maxResults)
bags
- The Keywordbag(s) the Song could be in. If this parameter is null,
an empty Playlist is returned.user
- The User-object (Used for sorting according to listening-habits). If
this parameter is null, anonymous sorting is used.maxResults
- Specifiec the maximum amount of records to return. Pass a
value >0 to show all matches.
Playlist songsByKeywords(java.util.List<Keyword> keywords, IUser user)
Playlist songsByKeywordIds(java.util.List<java.lang.Long> keywordIds, IUser user)
Playlist getNeighbours(long songid, IUser user)
songid
- The Song to get the neighbours for.user
- The User for whom to inspect the played and requested-Events
java.util.List<java.lang.Long[]> getDoubleSongs()
void mergeSongs(Song keep, Song remove)
keep
- This song stays.remove
- This song will be removed.java.util.List search(java.lang.String hql, java.util.Map<java.lang.String,java.lang.Object> params, int maxResults)
hql
- The HQL-query.params
- Query parameters as name,value pairsmaxResults
- The maximum amount of objects to return. Use 0 for all results.
java.util.List search(java.lang.String hql, java.util.Map<java.lang.String,java.lang.Object> params, int maxResults, int offset)
hql
- The HQL-query.params
- Query parameters as name,value pairsmaxResults
- The maximum amount of objects to return. Use 0 for all results.offset
- The first offset objects will not be returned
Band searchBand(java.lang.String bandname)
bandname
- The band name.
void mergeBands(Band keep, Band remove)
keep
- Keep this band. Add all songs of the other band to this band.remove
- The band to remove, moving all songs to the other band.Keyword searchKeyword(java.lang.String keyworddesc)
keyworddesc
- The desired keyword string.
java.util.List<Playlist> searchPlaylist(java.lang.String playlistname)
playlistname
- The desired playlist name.
Artist searchArtist(java.lang.String artistfirstname, java.lang.String artistlastname)
artistfirstname
- The desired artist name. May be null.artistlastname
- The desired artist last name. The result is null
if this is null.
AIBag getArtistAppearances(long artistid)
artistid
- The artist to search.
void save(Band band)
band
- The band to persist.void save(Keyword keyword)
keyword
- The keyword to persist.void save(Keywordbag keywordbag)
keywordbag
- The keyword bag to persist.void save(Playlist playlist)
playlist
- The playlist to persist.void save(Link link)
link
- The link to persist.void save(Song song)
song
- The song to persist.void save(Artist artist)
artist
- The artist to persist.void save(Instrument instr)
instr
- The instrument to persist.void save(AIBag aibag)
aibag
- The AIBag to persist.Song getSong(Band band, java.lang.String songname)
band
- The bandsongname
- The song name.
IUser findUserByName(java.lang.String username)
username
- The username to search for
java.util.List<Playlist> listPlaylists(Band band)
band
- The Band to search Playlists for.
java.util.List<Playlist> listPlaylists(Song song)
java.util.List<Playlist> listPlaylists()
java.util.List<Playlist> listPodcasts()
void evictSong(long songid)
void evict(java.lang.Object o)
java.util.List<java.lang.Object[]> listBands(IUser user)
user
- The User to get this list for.
java.util.List<Keyword> listKeywords()
java.util.List<java.lang.Object[]> listKeywords(IUser user, java.util.List<Keywordbag> bags)
user
- The User to get this list for.bags
- The Keywordbags to show Keywords of (or null to show all keywords)
java.util.List<Keywordbag> listKeywordsBags(java.util.List<Keyword> keywords)
keywords
- The list of keywords that hava to be present in each keyword bag in
the result. If this parameter is null or empty, the result is null.
Keywordbag getKeywordsBag(java.util.Collection<Keyword> keywords)
keywords
-
java.util.List<java.lang.Object[]> listMonthlySongCounts()
java.util.Map<java.lang.String,java.lang.Integer> listMonthlyStatistics(IUser user)
user
- The user to gather these statistics for.
Event
java.util.List<java.lang.Object[]> listNamableItems()
java.util.List<Keywordbag> listKeywordbags()
Instrument searchInstrument(java.lang.String instrname)
instrname
- The intsrument name.
int count(java.lang.String hql, java.util.Map<java.lang.String,java.lang.Object> params) throws java.lang.Exception
java.lang.Exception
AIBag getMostUsedAIBag(Band band)
band
- The Band
java.util.List<AIBag> listAIBags()
void mergePlaylists(Playlist keep, Playlist delete)
keep
- This playlist will receive all songs from the other playlist.delete
- This The songs of this playlist will be moved to the other playlist
and this playlist will be deleted.void deleteArtist(Artist delete)
delete
- The artist to delete.void deleteAiBag(AIBag delete)
delete
- The AIBag to delete.org.hibernate.SessionFactory getSessionFactory2()
void registerSongChangeListener(SongChangeListener listener)
listener
- The SongChangeListener to register.org.springframework.orm.hibernate3.HibernateTemplate getSupport()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |