query.setRpp(hitsPerPage);
QueryResult res = twitter.search(query);
// is res.getTweets() sorted?
for (Object o : res.getTweets()) {
Tweet twe = (Tweet) o;
// determine maxId in the first page
if (page == 0 && maxId < twe.getId())
maxId = twe.getId();
if (maxMillis < twe.getCreatedAt().getTime())
maxMillis = twe.getCreatedAt().getTime();
if (twe.getCreatedAt().getTime() + 1000 < lastMaxCreateTime)
breakPaging = true;
else {
String userName = twe.getFromUser().toLowerCase();
JUser user = userMap.get(userName);
if (user == null) {
user = new JUser(userName).init(twe);
userMap.put(userName, user);
}