Package com.github.hakko.musiccabinet.domain.model.aggr.UserRecommendedArtists

Examples of com.github.hakko.musiccabinet.domain.model.aggr.UserRecommendedArtists.RecommendedArtist


          currentRecommendedArtist.setContextArtist1(artist);
        } else {
          currentRecommendedArtist.setContextArtist2(artist);
        }
      } else {
        artists.add(currentRecommendedArtist = new RecommendedArtist(artist));
      }
    }
  }
View Full Code Here


    batchUpdate.declareParameter(new SqlParameter("rank", Types.INTEGER));
    batchUpdate.declareParameter(new SqlParameter("contextartist1_name", Types.VARCHAR));
    batchUpdate.declareParameter(new SqlParameter("contextartist2_name", Types.VARCHAR));
   
    for (int i = 0; i < artists.size(); i++) {
      RecommendedArtist rec = artists.get(i);
      batchUpdate.update(new Object[]{user.getLastFmUsername(), rec.getArtist().getName(),
          i, name(rec.getContextArtist1()), name(rec.getContextArtist2())});
    }
    batchUpdate.flush();
  }
View Full Code Here

        + " order by rank";

    return jdbcTemplate.query(sql, new Object[]{lastFmUsername}, new RowMapper<RecommendedArtist>() {
      @Override
      public RecommendedArtist mapRow(ResultSet rs, int rowNum) throws SQLException {
        return new RecommendedArtist(rs.getString(1), rs.getString(2), rs.getString(3));
      }
    });
  }
View Full Code Here

TOP

Related Classes of com.github.hakko.musiccabinet.domain.model.aggr.UserRecommendedArtists.RecommendedArtist

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.