Package us.jyg.freshet.dao.model

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


  }
 
  public void testGetSong() {
    for(Iterator itr=songs.iterator(); itr.hasNext();) {
      Integer id = ((Song)itr.next()).getId();
      Song song = songDao.getSong(id);
      assertNotNull(song);
      Album album = song.getAlbum();
      assertNotNull(album);
      String albumName = album.getName();
      assertNotNull(albumName);
      assertFalse(albumName.equals(""));
    }
View Full Code Here


      assertFalse(albumName.equals(""));
    }
  }

  public void testGetSongs(SongAttribute attr) {
    Song song = (Song)songDao.getSongs().get(0);
    Album album = song.getAlbum();
    assertNotNull(album);
    assertNotNull(album.getId());
    assertTrue(album.getId() > 0);
    assertNotNull(album.getName());
//    List<Song> songs = songDao.getSongs(album);
View Full Code Here

      try {
        Thread.sleep(1000);
      } catch (InterruptedException iE) {
        log.error("Empty Randomzier sleeper woken up... weird .");
      }
      Song s = SongQ.getInstance().next();
      log.debug(s.getName());
    }
  }
View Full Code Here

    songFactory.create("test/data");
    SongQ songQ = SongQ.getInstance();
    assertEquals(0, songQ.size());
    List<Song> allSongs = songManager.getSongs();
    for (Iterator itr=allSongs.iterator(); itr.hasNext();) {
      Song song = (Song)itr.next();
      songQ.up(song, "test");
    }
    assertEquals(allSongs.size(), songQ.size());
  }
View Full Code Here

    int count = 0;
    while( (f=miner.next()) != null) {
      try {
        if (f.getName().matches(".*[mM][pP]3")) {
          SongData songData = new SongData(f);
          Song song = songManager.saveSong(songData);
          count++;
          log.debug("Saved: " + song.getName() + " ("+song.getId() +")"+
              ", " + song.getAlbum().getName() +
              ", " + song.getArtist().getName() +
              ", " + song.getGenre().getName());
        }
      } catch (SongDataException sdE) {
        log.error("Could not process file: " +f.getAbsolutePath());
      }
      if (count % 100 == 0) log.debug("Count " + count);
View Full Code Here

TOP

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

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.