@ParametersAreNonnullByDefault @Generated(value="org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableTableMeta extends Object implements TableMeta
TableMeta.
Use the builder to create immutable instances:
ImmutableTableMeta.builder().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableTableMeta.Builder
Builds instances of type
ImmutableTableMeta. |
| Modifier and Type | Method and Description |
|---|---|
static ImmutableTableMeta.Builder |
builder()
Creates a builder for
ImmutableTableMeta. |
static ImmutableTableMeta |
copyOf(TableMeta instance)
Creates an immutable copy of a
TableMeta value. |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableTableMeta that have equal attribute values. |
com.google.common.collect.ImmutableList<ColumnMeta> |
getColumns() |
Optional<String> |
getComment() |
Optional<Long> |
getCount() |
String |
getName() |
int |
hashCode()
Computes a hash code from attributes:
name, isView, columns, count, comment. |
boolean |
isView() |
String |
toString()
Prints the immutable value
TableMeta with attribute values. |
ImmutableTableMeta |
withColumns(ColumnMeta... elements)
Copy the current immutable object with elements that replace the content of
columns. |
ImmutableTableMeta |
withColumns(Iterable<? extends ColumnMeta> elements)
Copy the current immutable object with elements that replace the content of
columns. |
ImmutableTableMeta |
withComment(Optional<String> optional)
Copy the current immutable object by setting an optional value for the
comment attribute. |
ImmutableTableMeta |
withComment(String value)
Copy the current immutable object by setting a present value for the optional
comment attribute. |
ImmutableTableMeta |
withCount(long value)
Copy the current immutable object by setting a present value for the optional
count attribute. |
ImmutableTableMeta |
withCount(Optional<Long> optional)
Copy the current immutable object by setting an optional value for the
count attribute. |
ImmutableTableMeta |
withIsView(boolean value)
Copy the current immutable object by setting a value for the
isView attribute. |
ImmutableTableMeta |
withName(String value)
Copy the current immutable object by setting a value for the
name attribute. |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitfindColumnpublic String getName()
public boolean isView()
public com.google.common.collect.ImmutableList<ColumnMeta> getColumns()
getColumns in interface TableMetacolumns attributepublic Optional<String> getComment()
getComment in interface TableMetacomment attributepublic final ImmutableTableMeta withName(String value)
name attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for namethis objectpublic final ImmutableTableMeta withIsView(boolean value)
isView attribute.
A value equality check is used to prevent copying of the same value by returning this.value - A new value for isViewthis objectpublic final ImmutableTableMeta withColumns(ColumnMeta... elements)
columns.elements - The elements to setthis objectpublic final ImmutableTableMeta withColumns(Iterable<? extends ColumnMeta> elements)
columns.
A shallow reference equality check is used to prevent copying of the same value by returning this.elements - An iterable of columns elements to setthis objectpublic final ImmutableTableMeta withCount(long value)
count attribute.value - The value for countthis objectpublic final ImmutableTableMeta withCount(Optional<Long> optional)
count attribute.
An equality check is used on inner nullable value to prevent copying of the same value by returning this.optional - A value for countthis objectpublic final ImmutableTableMeta withComment(String value)
comment attribute.value - The value for commentthis objectpublic final ImmutableTableMeta withComment(Optional<String> optional)
comment attribute.
An equality check is used on inner nullable value to prevent copying of the same value by returning this.optional - A value for commentthis objectpublic boolean equals(@Nullable Object another)
ImmutableTableMeta that have equal attribute values.public int hashCode()
name, isView, columns, count, comment.public String toString()
TableMeta with attribute values.public static ImmutableTableMeta copyOf(TableMeta instance)
TableMeta value.
Uses accessors to get values to initialize the new immutable instance.
If an instance is already immutable, it is returned as is.instance - The instance to copypublic static ImmutableTableMeta.Builder builder()
ImmutableTableMeta.
ImmutableTableMeta.builder()
.name(String) // required name
.isView(boolean) // required isView
.addColumns|addAllColumns(org.nuiton.db.meta.ColumnMeta) // columns elements
.count(Long) // optional count
.comment(String) // optional comment
.build();
Copyright © 2019 Nuiton. All rights reserved.