if (ratings.size() == 0) {
return;
}
final int gameId = getGameId();
_invoker.postUnit(new RepositoryUnit("loadRatings(" + gameId + ")") {
@Override public void invokePersist () throws Exception {
// map the records by player id so that we can correlate with the db results
IntMap<PlayerRating> map = IntMaps.newHashIntMap();
for (PlayerRating rating : ratings) {
map.put(rating.playerId, rating);