class OfferLogHelper {

    public static Iterator<OfferLog> getListing(StorageClientFactory storageClientFactory, String strategy,
        DataCategory dataCategory, Long offset, Order order, int chunkSize, Integer limit) {

        int actualChunkSize = limit == null ? chunkSize : Math.min(chunkSize, limit);
        Iterator<OfferLog> offerLogIterator = new StorageClientOfferLogIterator(
            storageClientFactory, strategy, order, dataCategory, actualChunkSize, offset);

        if (limit != null) {
            offerLogIterator = IteratorUtils.boundedIterator(offerLogIterator, limit);
        }

        return offerLogIterator;
    }

}