Package us.jyg.freshet.dao.model

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


  public void setBrowseGenresDisplay(FreshetForm ff, User user) {
    log.debug("entering setBrowseGenresDisplay");
    ff.setBrowseItems(new ArrayList<SongAttribute>(genreManager.getGenres()));
    ff.setBrowseType(""+Constants.BROWSE_GENRES);
    ff.setNextBrowseType(""+Constants.BROWSE_GENRE);
        ff.setUser((user==null)?new Guest():user);
        log.debug("exiting setBrowseGenresDisplay");
    }
View Full Code Here


    log.debug("entering setBrowseGenreDisplay");
    Integer genreId = new Integer(ff.getBrowseId());
    ff.setBrowseItems(new ArrayList<SongAttribute>(artistManager.getArtistsbyGenre(genreId)));
    ff.setBrowseGenre(genreManager.getGenre(genreId));
    ff.setBrowseType(Constants.BROWSE_GENRE);
        ff.setUser((user==null)?new Guest():user);
        ff.setNextBrowseType(Constants.BROWSE_ARTIST);
  }
View Full Code Here

 
  public void setBrowseArtistsDisplay(FreshetForm ff, User user) {
    log.debug("entering setBrowseArtistsDisplay");
    ff.setBrowseItems(new ArrayList<SongAttribute>(artistManager.getArtists()));
    ff.setBrowseType(Constants.BROWSE_ARTISTS);
        ff.setUser((user==null)?new Guest():user);
        ff.setNextBrowseType(Constants.BROWSE_ARTIST);
  }
View Full Code Here

    ff.setBrowseArtist(artistManager.getArtist(artistId));
    Song song0 = (Song)songManager.getSongs(ff.getBrowseArtist()).get(0);
    ff.setBrowseGenre(song0.getGenre());
    ff.setBrowseItems(new ArrayList<SongAttribute>(albumManager.getAlbumsbyArtist(artistId)));
    ff.setBrowseType(Constants.BROWSE_ARTIST);
        ff.setUser((user==null)?new Guest():user);
        ff.setNextBrowseType(Constants.BROWSE_ALBUM);
  }
View Full Code Here

    ff.setBrowseItems(songManager.getSongs(ff.getBrowseAlbum()));
    Song song0 = (Song)ff.getBrowseItems().get(0);
    ff.setBrowseGenre(song0.getGenre());
    ff.setBrowseArtist(song0.getArtist());
    ff.setBrowseType(Constants.BROWSE_ALBUM);
        ff.setUser((user==null)?new Guest():user);
        ff.setNextBrowseType(Constants.BROWSE_SONG);
  }
View Full Code Here

        if (ff.getSearchTerm() != null || !"".equals(ff.getSearchTerm())) {
            songs = songManager.findSongs(ff.getSearchTerm());
        }
    ff.setBrowseItems(songs);
    ff.setBrowseType(Constants.BROWSE_SEARCH);
        ff.setUser((user==null)?new Guest():user);
        ff.setNextBrowseType(Constants.BROWSE_SONG);
  }
View Full Code Here

    public void setBrowseHistoryDisplay(FreshetForm ff, User user) {
    log.debug("entering setBrowseSearchDisplay");
    ff.setBrowseItems(songQ.getHistory());
    ff.setBrowseType(Constants.BROWSE_HISTORY);
        ff.setUser((user==null)?new Guest():user);
        ff.setNextBrowseType(Constants.BROWSE_SONG);
  }
View Full Code Here

        } catch (Exception e) {
            log.error("cannot get local host name, weird.");
        }

        if (host != null) {
            Guest guest = new Guest();
            guest.setUsername(Constants.USERNAME_GUEST);
            guest.setHost(host);
            guests.add(guest);
            log.info( guest.getHost() + "added to guest list");
            status = true;
            log.info("Guest logged in from: " + hostname+"/"+host);
            guests.add(guest);
        } else {
            throw new LoginException("Cannot have a null host for a guest");
View Full Code Here

    public void insertSong(FreshetForm ff) {
        int qId = Integer.parseInt(ff.getQueueId());
        Song s = songManager.getSong(qId);
        if (ff.getUser()==null)
            ff.setUser(new Guest());

        songManager.modifySongWeight(s, 1);
        songQ.insertSong(s, Integer.parseInt(ff.getInsertIdx()), ff.getUser().getUsername());
    }
View Full Code Here

TOP

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

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.