code: @Override
    public Filter adapt(FilterAdapterContext context, PageFilter filter) throws IOException {
      final long pageSize = filter.getPageSize();
      context.getReadHooks().composePreSendHook(new Function<Query, Query>() {
        @Override
        public Query apply(Query query) {
          return query.limit(pageSize);
        }
      });
      // This filter cannot be translated to a RowFilter, all logic is done as a read hook.
      return null;
    }
docs: {@inheritDoc}