Class ImmutableDatabaseMeta.Builder

java.lang.Object
org.nuiton.db.meta.ImmutableDatabaseMeta.Builder
Enclosing class:
ImmutableDatabaseMeta

@Generated(from="DatabaseMeta", generator="Immutables") public static final class ImmutableDatabaseMeta.Builder extends Object
Builds instances of type ImmutableDatabaseMeta. 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 Details

    • from

      @CanIgnoreReturnValue public final ImmutableDatabaseMeta.Builder from(DatabaseMeta instance)
      Fill a builder with attribute values from the provided DatabaseMeta instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • schema

      @CanIgnoreReturnValue public final ImmutableDatabaseMeta.Builder schema(String schema)
      Initializes the value for the schema attribute.
      Parameters:
      schema - The value for schema
      Returns:
      this builder for use in a chained invocation
    • addCustomTypes

      @CanIgnoreReturnValue public final ImmutableDatabaseMeta.Builder addCustomTypes(CustomTypeMeta element)
      Adds one element to customTypes list.
      Parameters:
      element - A customTypes element
      Returns:
      this builder for use in a chained invocation
    • addCustomTypes

      @CanIgnoreReturnValue public final ImmutableDatabaseMeta.Builder addCustomTypes(CustomTypeMeta... elements)
      Adds elements to customTypes list.
      Parameters:
      elements - An array of customTypes elements
      Returns:
      this builder for use in a chained invocation
    • customTypes

      @CanIgnoreReturnValue public final ImmutableDatabaseMeta.Builder customTypes(Iterable<? extends CustomTypeMeta> elements)
      Sets or replaces all elements for customTypes list.
      Parameters:
      elements - An iterable of customTypes elements
      Returns:
      this builder for use in a chained invocation
    • addAllCustomTypes

      @CanIgnoreReturnValue public final ImmutableDatabaseMeta.Builder addAllCustomTypes(Iterable<? extends CustomTypeMeta> elements)
      Adds elements to customTypes list.
      Parameters:
      elements - An iterable of customTypes elements
      Returns:
      this builder for use in a chained invocation
    • addTables

      @CanIgnoreReturnValue public final ImmutableDatabaseMeta.Builder addTables(TableMeta element)
      Adds one element to tables list.
      Parameters:
      element - A tables element
      Returns:
      this builder for use in a chained invocation
    • addTables

      @CanIgnoreReturnValue public final ImmutableDatabaseMeta.Builder addTables(TableMeta... elements)
      Adds elements to tables list.
      Parameters:
      elements - An array of tables elements
      Returns:
      this builder for use in a chained invocation
    • tables

      @CanIgnoreReturnValue public final ImmutableDatabaseMeta.Builder tables(Iterable<? extends TableMeta> elements)
      Sets or replaces all elements for tables list.
      Parameters:
      elements - An iterable of tables elements
      Returns:
      this builder for use in a chained invocation
    • addAllTables

      @CanIgnoreReturnValue public final ImmutableDatabaseMeta.Builder addAllTables(Iterable<? extends TableMeta> elements)
      Adds elements to tables list.
      Parameters:
      elements - An iterable of tables elements
      Returns:
      this builder for use in a chained invocation
    • addViews

      @CanIgnoreReturnValue public final ImmutableDatabaseMeta.Builder addViews(TableMeta element)
      Adds one element to views list.
      Parameters:
      element - A views element
      Returns:
      this builder for use in a chained invocation
    • addViews

      @CanIgnoreReturnValue public final ImmutableDatabaseMeta.Builder addViews(TableMeta... elements)
      Adds elements to views list.
      Parameters:
      elements - An array of views elements
      Returns:
      this builder for use in a chained invocation
    • views

      @CanIgnoreReturnValue public final ImmutableDatabaseMeta.Builder views(Iterable<? extends TableMeta> elements)
      Sets or replaces all elements for views list.
      Parameters:
      elements - An iterable of views elements
      Returns:
      this builder for use in a chained invocation
    • addAllViews

      @CanIgnoreReturnValue public final ImmutableDatabaseMeta.Builder addAllViews(Iterable<? extends TableMeta> elements)
      Adds elements to views list.
      Parameters:
      elements - An iterable of views elements
      Returns:
      this builder for use in a chained invocation
    • addProcedures

      @CanIgnoreReturnValue public final ImmutableDatabaseMeta.Builder addProcedures(ProcedureMeta element)
      Adds one element to procedures list.
      Parameters:
      element - A procedures element
      Returns:
      this builder for use in a chained invocation
    • addProcedures

      @CanIgnoreReturnValue public final ImmutableDatabaseMeta.Builder addProcedures(ProcedureMeta... elements)
      Adds elements to procedures list.
      Parameters:
      elements - An array of procedures elements
      Returns:
      this builder for use in a chained invocation
    • procedures

      @CanIgnoreReturnValue public final ImmutableDatabaseMeta.Builder procedures(Iterable<? extends ProcedureMeta> elements)
      Sets or replaces all elements for procedures list.
      Parameters:
      elements - An iterable of procedures elements
      Returns:
      this builder for use in a chained invocation
    • addAllProcedures

      @CanIgnoreReturnValue public final ImmutableDatabaseMeta.Builder addAllProcedures(Iterable<? extends ProcedureMeta> elements)
      Adds elements to procedures list.
      Parameters:
      elements - An iterable of procedures elements
      Returns:
      this builder for use in a chained invocation
    • build

      public ImmutableDatabaseMeta build()
      Builds a new ImmutableDatabaseMeta.
      Returns:
      An immutable instance of DatabaseMeta
      Throws:
      IllegalStateException - if any required attributes are missing