}
if (playerIds != null) {
where.add(RatingRecord.PLAYER_ID.in(playerIds));
}
OrderBy ob = new OrderBy(
new SQLExpression<?>[] { RatingRecord.RATING, RatingRecord.LAST_UPDATED },
new OrderBy.Order[] { OrderBy.Order.DESC, OrderBy.Order.DESC });
return from(RatingRecord.class).where(where).limit(limit).orderBy(ob).select();
}