@NotThreadSafe public static final class ImmutableColumnMeta.Builder extends Object
ImmutableColumnMeta.
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.
| Modifier and Type | Method and Description |
|---|---|
ImmutableColumnMeta.Builder |
addAllForeignKeyColumns(Iterable<String> elements)
Adds elements to
foreignKeyColumns set. |
ImmutableColumnMeta.Builder |
addForeignKeyColumns(String... elements)
Adds elements to
foreignKeyColumns set. |
ImmutableColumnMeta.Builder |
addForeignKeyColumns(String element)
Adds one element to
foreignKeyColumns set. |
ImmutableColumnMeta |
build()
Builds a new
ImmutableColumnMeta. |
ImmutableColumnMeta.Builder |
comment(Optional<String> comment)
Initializes the optional value
comment to comment. |
ImmutableColumnMeta.Builder |
comment(String comment)
Initializes the optional value
comment to comment. |
ImmutableColumnMeta.Builder |
customType(CustomTypeMeta customType)
Initializes the optional value
customType to customType. |
ImmutableColumnMeta.Builder |
customType(Optional<? extends CustomTypeMeta> customType)
Initializes the optional value
customType to customType. |
ImmutableColumnMeta.Builder |
foreignKeyColumns(Iterable<String> elements)
Sets or replaces all elements for
foreignKeyColumns set. |
ImmutableColumnMeta.Builder |
from(ColumnMeta instance)
Fill a builder with attribute values from the provided
ColumnMeta instance. |
ImmutableColumnMeta.Builder |
isForeignKey(boolean isForeignKey)
Initializes the value for the
isForeignKey attribute. |
ImmutableColumnMeta.Builder |
isPrimaryKey(boolean isPrimaryKey)
Initializes the value for the
isPrimaryKey attribute. |
ImmutableColumnMeta.Builder |
isUnique(boolean isUnique)
Initializes the value for the
isUnique attribute. |
ImmutableColumnMeta.Builder |
length(int length)
Initializes the optional value
length to length. |
ImmutableColumnMeta.Builder |
length(Optional<Integer> length)
Initializes the optional value
length to length. |
ImmutableColumnMeta.Builder |
name(String name)
Initializes the value for the
name attribute. |
ImmutableColumnMeta.Builder |
nullable(boolean nullable)
Initializes the value for the
nullable attribute. |
ImmutableColumnMeta.Builder |
possibleValues(Map<String,String> possibleValues)
Initializes the optional value
possibleValues to possibleValues. |
ImmutableColumnMeta.Builder |
possibleValues(Optional<? extends Map<String,String>> possibleValues)
Initializes the optional value
possibleValues to possibleValues. |
ImmutableColumnMeta.Builder |
type(String type)
Initializes the value for the
type attribute. |
@CanIgnoreReturnValue public final ImmutableColumnMeta.Builder from(ColumnMeta instance)
ColumnMeta 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.instance - The instance from which to copy valuesthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableColumnMeta.Builder name(String name)
name attribute.name - The value for namethis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableColumnMeta.Builder type(String type)
type attribute.type - The value for typethis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableColumnMeta.Builder customType(CustomTypeMeta customType)
customType to customType.customType - The value for customTypethis builder for chained invocation@CanIgnoreReturnValue public final ImmutableColumnMeta.Builder customType(Optional<? extends CustomTypeMeta> customType)
customType to customType.customType - The value for customTypethis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableColumnMeta.Builder length(int length)
length to length.length - The value for lengththis builder for chained invocation@CanIgnoreReturnValue public final ImmutableColumnMeta.Builder length(Optional<Integer> length)
length to length.length - The value for lengththis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableColumnMeta.Builder nullable(boolean nullable)
nullable attribute.nullable - The value for nullablethis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableColumnMeta.Builder comment(String comment)
comment to comment.comment - The value for commentthis builder for chained invocation@CanIgnoreReturnValue public final ImmutableColumnMeta.Builder comment(Optional<String> comment)
comment to comment.comment - The value for commentthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableColumnMeta.Builder isPrimaryKey(boolean isPrimaryKey)
isPrimaryKey attribute.isPrimaryKey - The value for isPrimaryKeythis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableColumnMeta.Builder isUnique(boolean isUnique)
isUnique attribute.isUnique - The value for isUniquethis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableColumnMeta.Builder isForeignKey(boolean isForeignKey)
isForeignKey attribute.isForeignKey - The value for isForeignKeythis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableColumnMeta.Builder addForeignKeyColumns(String element)
foreignKeyColumns set.element - A foreignKeyColumns elementthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableColumnMeta.Builder addForeignKeyColumns(String... elements)
foreignKeyColumns set.elements - An array of foreignKeyColumns elementsthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableColumnMeta.Builder foreignKeyColumns(Iterable<String> elements)
foreignKeyColumns set.elements - An iterable of foreignKeyColumns elementsthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableColumnMeta.Builder addAllForeignKeyColumns(Iterable<String> elements)
foreignKeyColumns set.elements - An iterable of foreignKeyColumns elementsthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableColumnMeta.Builder possibleValues(Map<String,String> possibleValues)
possibleValues to possibleValues.possibleValues - The value for possibleValuesthis builder for chained invocation@CanIgnoreReturnValue public final ImmutableColumnMeta.Builder possibleValues(Optional<? extends Map<String,String>> possibleValues)
possibleValues to possibleValues.possibleValues - The value for possibleValuesthis builder for use in a chained invocationpublic ImmutableColumnMeta build()
ImmutableColumnMeta.IllegalStateException - if any required attributes are missingCopyright © 2019 Nuiton. All rights reserved.