@Override
public List<Event> findByEditorUserId(PartakeConnection con, String editorUserId, EventFilterCondition criteria, int offset, int limit) throws DAOException {
String condition = conditionClauseForCriteria(criteria);
Postgres9StatementAndResultSet psars = editorIndexDao.select((Postgres9Connection) con,
"SELECT id FROM " + EDITOR_INDEX_TABLE_NAME + " WHERE editorId = ? " + condition + " ORDER BY beginDate DESC OFFSET ? LIMIT ?",
new Object[] { editorUserId, offset, limit });
Postgres9IdMapper<Event> idMapper = new Postgres9IdMapper<Event>((Postgres9Connection) con, mapper, entityDao);
try {
DataIterator<Event> it = new Postgres9DataIterator<Event>(idMapper, psars);
return DAOUtil.convertToList(it);
} finally {
psars.close();
}
}