Class BaseGetEntriesBuilder<PARAMS>

java.lang.Object
org.projectnessie.client.builder.BaseGetEntriesBuilder<PARAMS>
All Implemented Interfaces:
GetEntriesBuilder, KeyRangeBuilder<GetEntriesBuilder>, OnReferenceBuilder<GetEntriesBuilder>, PagingBuilder<GetEntriesBuilder,org.projectnessie.model.EntriesResponse,org.projectnessie.model.EntriesResponse.Entry>, QueryBuilder<GetEntriesBuilder>

public abstract class BaseGetEntriesBuilder<PARAMS> extends Object implements GetEntriesBuilder
  • Field Details

    • maxRecords

      protected Integer maxRecords
    • keys

      protected final List<org.projectnessie.model.ContentKey> keys
    • minKey

      protected org.projectnessie.model.ContentKey minKey
    • maxKey

      protected org.projectnessie.model.ContentKey maxKey
    • prefixKey

      protected org.projectnessie.model.ContentKey prefixKey
    • filter

      protected String filter
    • withContent

      protected boolean withContent
    • refName

      protected String refName
    • hashOnRef

      protected String hashOnRef
  • Constructor Details

  • Method Details

    • maxRecords

      public GetEntriesBuilder maxRecords(int maxRecords)
      Description copied from interface: PagingBuilder
      Sets the maximum number of records to be returned in a single response object from the PagingBuilder.get() method.

      This setter reflects the OpenAPI parameter maxRecords in a paged request.

      Specified by:
      maxRecords in interface PagingBuilder<GetEntriesBuilder,org.projectnessie.model.EntriesResponse,org.projectnessie.model.EntriesResponse.Entry>
    • pageToken

      public GetEntriesBuilder pageToken(String pageToken)
      Description copied from interface: PagingBuilder
      Sets the page token from the previous' PagingBuilder.get() method invocation. When using PagingBuilder.stream() methods this parameter must not be set.

      Only for manual paging via PagingBuilder.get() - do not call when using any of the PagingBuilder.stream() functions.

      This setter reflects the OpenAPI parameter pageToken in a paged request.

      Specified by:
      pageToken in interface PagingBuilder<GetEntriesBuilder,org.projectnessie.model.EntriesResponse,org.projectnessie.model.EntriesResponse.Entry>
    • key

      public GetEntriesBuilder key(org.projectnessie.model.ContentKey key)
      Specified by:
      key in interface KeyRangeBuilder<PARAMS>
    • keys

      public GetEntriesBuilder keys(Collection<org.projectnessie.model.ContentKey> keys)
      Specified by:
      keys in interface KeyRangeBuilder<PARAMS>
    • minKey

      public GetEntriesBuilder minKey(org.projectnessie.model.ContentKey minKey)
      Specified by:
      minKey in interface KeyRangeBuilder<PARAMS>
    • maxKey

      public GetEntriesBuilder maxKey(org.projectnessie.model.ContentKey maxKey)
      Specified by:
      maxKey in interface KeyRangeBuilder<PARAMS>
    • prefixKey

      public GetEntriesBuilder prefixKey(org.projectnessie.model.ContentKey prefixKey)
      Specified by:
      prefixKey in interface KeyRangeBuilder<PARAMS>
    • filter

      public GetEntriesBuilder filter(String filter)
      Description copied from interface: QueryBuilder
      Required: the CEL script.
      Specified by:
      filter in interface QueryBuilder<PARAMS>
    • withContent

      public GetEntriesBuilder withContent(boolean withContent)
      Specified by:
      withContent in interface GetEntriesBuilder
    • params

      protected abstract PARAMS params()
    • get

      protected abstract org.projectnessie.model.EntriesResponse get(PARAMS p) throws org.projectnessie.error.NessieNotFoundException
      Throws:
      org.projectnessie.error.NessieNotFoundException
    • get

      public org.projectnessie.model.EntriesResponse get() throws org.projectnessie.error.NessieNotFoundException
      Description copied from interface: PagingBuilder
      Advanced usage, for manual paging: fetches a response chunk (might be one page or complete response depending on use case and parameters), but callers must implement paging on their own, if necessary. If in doubt, use PagingBuilder.stream() instead.
      Specified by:
      get in interface GetEntriesBuilder
      Specified by:
      get in interface PagingBuilder<GetEntriesBuilder,org.projectnessie.model.EntriesResponse,org.projectnessie.model.EntriesResponse.Entry>
      Throws:
      org.projectnessie.error.NessieNotFoundException
    • stream

      public Stream<org.projectnessie.model.EntriesResponse.Entry> stream() throws org.projectnessie.error.NessieNotFoundException
      Description copied from interface: PagingBuilder
      Retrieve entries/results as a Java Stream, uses automatic paging.
      Specified by:
      stream in interface PagingBuilder<GetEntriesBuilder,org.projectnessie.model.EntriesResponse,org.projectnessie.model.EntriesResponse.Entry>
      Throws:
      org.projectnessie.error.NessieNotFoundException
    • refName

      public GetEntriesBuilder refName(String refName)
      Specified by:
      refName in interface OnReferenceBuilder<R extends OnReferenceBuilder<R>>
    • hashOnRef

      public GetEntriesBuilder hashOnRef(String hashOnRef)
      Description copied from interface: OnReferenceBuilder
      Optional commit ID with an optional sequence of relative lookups. Relative lookups can be by-timestamp, by-n-th-predecessor or by-n-th-parent.

      Relative lookups are only supported for REST API v2 against servers announcing Nessie specification 2.1.0 for most functionalities.

      • Lookup by timestamp starts with * followed by the numeric value of the timestamp in milliseconds since epoch.
      • Lookup by n-th predecessor starts with ~ followed by the value for the n-th commit in the commit log.
      • Lookup by n-th parent starts with ^ followed by either 1, referencing the direct parent, or 2, referencing the merge parent.

      Valid values are:

      • ~10 -> the 10th parent from the HEAD
      • 11223344~10 -> the 10th parent of the commit 11223344
      • 11223344^2 -> the merge parent of the commit 11223344
      • 11223344~10^2 -> the merge parent of the 10th parent of the commit 11223344
      • 11223344~10^1 -> the direct parent of the 10th parent of the commit 11223344 - functionally equal to 11223344~11
      • 11223344*10000000000 -> the commit in the commit log starting at 11223344 with a commit-created timestamp of 10000000000 or less.
      • *10000000000 -> the commit in the commit log starting at HEAD with a commit-created timestamp of 10000000000 or less.
      Specified by:
      hashOnRef in interface OnReferenceBuilder<R extends OnReferenceBuilder<R>>