Package us.jyg.freshet.dao.model

Examples of us.jyg.freshet.dao.model.Artist


            return true;
    }

    public Song saveSong(SongData songData) {
      Album album = albumDao.getAlbum(songData.getAlbum());
      Artist artist = artistDao.getArtist(songData.getArtist());
      Genre genre = genreDao.getGenre(songData.getGenre());
      Song song = new Song(songData.getName(), songData.getPath(), songData
          .getTrack(), album, artist, genre);
      saveSong(song);
      return song;
View Full Code Here


    while( (f=miner.next()) != null) {
      try {
        if (f.getName().matches(".*[mM][pP]3")) {
          SongData songData = new SongData(f);
          Album album = albumDao.getAlbum(songData.getAlbum());
          Artist artist = artistDao.getArtist(songData.getArtist());
          Genre genre = genreDao.getGenre(songData.getGenre());
          Song song = new Song(songData.getName(), songData.getPath(), songData
              .getTrack(), album, artist, genre);
          songDao.saveSong(song);
//          log.debug("Saved: " + song.getName() + " ("+song.getId() +")"+
View Full Code Here

  public List<Artist> findArtists(String pattern) {
    return null;
  }
 
  public Artist renameArtist(Integer artistId, String newName) {
    Artist a = artistDao.getArtist(artistId);
    a.setName(newName);
    artistDao.saveObject(a);
    return artistDao.getArtist(artistId);
  }
View Full Code Here

    return (Artist)getObject(Artist.class, id);
  }
 
  public Artist getArtist(String name) {
    name = name.replaceAll("'", "%27");
    Artist artist;
    String hql = "from Artist a where a.name = '"+name+"'";
//    log.debug(hql);
    List artists = getHibernateTemplate().find(hql);
    if (artists.size() ==0)
      artist = new Artist(name);
    else
      artist = (Artist)artists.get(0);
    return artist; 
  }
View Full Code Here

TOP

Related Classes of us.jyg.freshet.dao.model.Artist

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.