/**
* Used in profiles_controller.rb
*/
public QProfileActivityResult search(Map<String, Object> params) {
QProfileActivityQuery query = new QProfileActivityQuery();
QueryContext queryContext = new QueryContext().setMaxLimit();
List<String> profileKeys = RubyUtils.toStrings(params.get("profileKeys"));
if (profileKeys != null) {
query.setQprofileKeys(profileKeys);
}
Date since = RubyUtils.toDate(params.get("since"));
if (since != null) {
query.setSince(since);
}
Date to = RubyUtils.toDate(params.get("to"));
if (to != null) {
query.setTo(to);
}
Integer page = RubyUtils.toInteger(params.get("p"));
int pageIndex = page != null ? page : 1;
queryContext.setPage(pageIndex, 50);