Class ImmutableHiveTable.Builder

  • Enclosing class:
    ImmutableHiveTable

    @NotThreadSafe
    public static final class ImmutableHiveTable.Builder
    extends Object
    Builds instances of type ImmutableHiveTable. Initialize attributes and then invoke the build() method to create an immutable instance.

    Builder is not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.

    • Method Detail

      • from

        @CanIgnoreReturnValue
        public final ImmutableHiveTable.Builder from​(Contents instance)
        Fill a builder with attribute values from the provided org.projectnessie.model.Contents instance.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • from

        @CanIgnoreReturnValue
        public final ImmutableHiveTable.Builder from​(HiveTable instance)
        Fill a builder with attribute values from the provided org.projectnessie.model.HiveTable instance.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • id

        @CanIgnoreReturnValue
        public final ImmutableHiveTable.Builder id​(String id)
        Initializes the value for the id attribute.

        If not set, this attribute will have a default value as returned by the initializer of id.

        Parameters:
        id - The value for id
        Returns:
        this builder for use in a chained invocation
      • tableDefinition

        @CanIgnoreReturnValue
        public final ImmutableHiveTable.Builder tableDefinition​(@Size(min=1)
                                                                @javax.validation.constraints.Size(min=1) byte... tableDefinition)
        Initializes the value for the tableDefinition attribute.
        Parameters:
        tableDefinition - The elements for tableDefinition
        Returns:
        this builder for use in a chained invocation
      • addPartitions

        @CanIgnoreReturnValue
        public final ImmutableHiveTable.Builder addPartitions​(byte[] element)
        Adds one element to partitions list.
        Parameters:
        element - A partitions element
        Returns:
        this builder for use in a chained invocation
      • addPartitions

        @CanIgnoreReturnValue
        public final ImmutableHiveTable.Builder addPartitions​(byte[]... elements)
        Adds elements to partitions list.
        Parameters:
        elements - An array of partitions elements
        Returns:
        this builder for use in a chained invocation
      • partitions

        @CanIgnoreReturnValue
        public final ImmutableHiveTable.Builder partitions​(Iterable<? extends byte[]> elements)
        Sets or replaces all elements for partitions list.
        Parameters:
        elements - An iterable of partitions elements
        Returns:
        this builder for use in a chained invocation
      • addAllPartitions

        @CanIgnoreReturnValue
        public final ImmutableHiveTable.Builder addAllPartitions​(Iterable<? extends byte[]> elements)
        Adds elements to partitions list.
        Parameters:
        elements - An iterable of partitions elements
        Returns:
        this builder for use in a chained invocation