return mapper.map(entityDao.find((Postgres9Connection) con, id));
}
@Override
public List<UserNotification> findByUserId(PartakeConnection con, String userId, int offset, int limit) throws DAOException {
Postgres9StatementAndResultSet psars = indexDao.select((Postgres9Connection) con,
"SELECT id FROM " + INDEX_TABLE_NAME + " WHERE userId = ? OFFSET ? LIMIT ?",
new Object[] { userId, offset, limit });
Postgres9IdMapper<UserNotification> idMapper = new Postgres9IdMapper<UserNotification>((Postgres9Connection) con, mapper, entityDao);
DataIterator<UserNotification> it = new Postgres9DataIterator<UserNotification>(idMapper, psars);