UserRequestParams uparams = refreshParams(context);
List<Object> entities = new ArrayList<Object>();
Community[] communities = Community.findAllTop(context);
for (Community c : communities) {
entities.add(trim ? new CommunityEntityTrim(c, uparams) : new CommunityEntity(c, uparams));
}
return entities;
} catch (SQLException ex) {
throw new EntityException("Internal server error", "SQL error", 500);