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 Summary
Modifier and TypeMethodDescriptionaddAllCustomTypes(Iterable<? extends CustomTypeMeta> elements) Adds elements tocustomTypeslist.addAllProcedures(Iterable<? extends ProcedureMeta> elements) Adds elements toprocedureslist.addAllTables(Iterable<? extends TableMeta> elements) Adds elements totableslist.addAllViews(Iterable<? extends TableMeta> elements) Adds elements toviewslist.addCustomTypes(CustomTypeMeta element) Adds one element tocustomTypeslist.addCustomTypes(CustomTypeMeta... elements) Adds elements tocustomTypeslist.addProcedures(ProcedureMeta element) Adds one element toprocedureslist.addProcedures(ProcedureMeta... elements) Adds elements toprocedureslist.Adds one element totableslist.Adds elements totableslist.Adds one element toviewslist.Adds elements toviewslist.build()Builds a newImmutableDatabaseMeta.customTypes(Iterable<? extends CustomTypeMeta> elements) Sets or replaces all elements forcustomTypeslist.from(DatabaseMeta instance) Fill a builder with attribute values from the providedDatabaseMetainstance.procedures(Iterable<? extends ProcedureMeta> elements) Sets or replaces all elements forprocedureslist.Initializes the value for theschemaattribute.Sets or replaces all elements fortableslist.Sets or replaces all elements forviewslist.
-
Method Details
-
from
Fill a builder with attribute values from the providedDatabaseMetainstance. 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:
thisbuilder for use in a chained invocation
-
schema
Initializes the value for theschemaattribute.- Parameters:
schema- The value for schema- Returns:
thisbuilder for use in a chained invocation
-
addCustomTypes
@CanIgnoreReturnValue public final ImmutableDatabaseMeta.Builder addCustomTypes(CustomTypeMeta element) Adds one element tocustomTypeslist.- Parameters:
element- A customTypes element- Returns:
thisbuilder for use in a chained invocation
-
addCustomTypes
@CanIgnoreReturnValue public final ImmutableDatabaseMeta.Builder addCustomTypes(CustomTypeMeta... elements) Adds elements tocustomTypeslist.- Parameters:
elements- An array of customTypes elements- Returns:
thisbuilder for use in a chained invocation
-
customTypes
@CanIgnoreReturnValue public final ImmutableDatabaseMeta.Builder customTypes(Iterable<? extends CustomTypeMeta> elements) Sets or replaces all elements forcustomTypeslist.- Parameters:
elements- An iterable of customTypes elements- Returns:
thisbuilder for use in a chained invocation
-
addAllCustomTypes
@CanIgnoreReturnValue public final ImmutableDatabaseMeta.Builder addAllCustomTypes(Iterable<? extends CustomTypeMeta> elements) Adds elements tocustomTypeslist.- Parameters:
elements- An iterable of customTypes elements- Returns:
thisbuilder for use in a chained invocation
-
addTables
Adds one element totableslist.- Parameters:
element- A tables element- Returns:
thisbuilder for use in a chained invocation
-
addTables
Adds elements totableslist.- Parameters:
elements- An array of tables elements- Returns:
thisbuilder for use in a chained invocation
-
tables
@CanIgnoreReturnValue public final ImmutableDatabaseMeta.Builder tables(Iterable<? extends TableMeta> elements) Sets or replaces all elements fortableslist.- Parameters:
elements- An iterable of tables elements- Returns:
thisbuilder for use in a chained invocation
-
addAllTables
@CanIgnoreReturnValue public final ImmutableDatabaseMeta.Builder addAllTables(Iterable<? extends TableMeta> elements) Adds elements totableslist.- Parameters:
elements- An iterable of tables elements- Returns:
thisbuilder for use in a chained invocation
-
addViews
Adds one element toviewslist.- Parameters:
element- A views element- Returns:
thisbuilder for use in a chained invocation
-
addViews
Adds elements toviewslist.- Parameters:
elements- An array of views elements- Returns:
thisbuilder for use in a chained invocation
-
views
@CanIgnoreReturnValue public final ImmutableDatabaseMeta.Builder views(Iterable<? extends TableMeta> elements) Sets or replaces all elements forviewslist.- Parameters:
elements- An iterable of views elements- Returns:
thisbuilder for use in a chained invocation
-
addAllViews
@CanIgnoreReturnValue public final ImmutableDatabaseMeta.Builder addAllViews(Iterable<? extends TableMeta> elements) Adds elements toviewslist.- Parameters:
elements- An iterable of views elements- Returns:
thisbuilder for use in a chained invocation
-
addProcedures
@CanIgnoreReturnValue public final ImmutableDatabaseMeta.Builder addProcedures(ProcedureMeta element) Adds one element toprocedureslist.- Parameters:
element- A procedures element- Returns:
thisbuilder for use in a chained invocation
-
addProcedures
@CanIgnoreReturnValue public final ImmutableDatabaseMeta.Builder addProcedures(ProcedureMeta... elements) Adds elements toprocedureslist.- Parameters:
elements- An array of procedures elements- Returns:
thisbuilder for use in a chained invocation
-
procedures
@CanIgnoreReturnValue public final ImmutableDatabaseMeta.Builder procedures(Iterable<? extends ProcedureMeta> elements) Sets or replaces all elements forprocedureslist.- Parameters:
elements- An iterable of procedures elements- Returns:
thisbuilder for use in a chained invocation
-
addAllProcedures
@CanIgnoreReturnValue public final ImmutableDatabaseMeta.Builder addAllProcedures(Iterable<? extends ProcedureMeta> elements) Adds elements toprocedureslist.- Parameters:
elements- An iterable of procedures elements- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableDatabaseMeta.- Returns:
- An immutable instance of DatabaseMeta
- Throws:
IllegalStateException- if any required attributes are missing
-