Class ImmutableTableMeta
java.lang.Object
org.nuiton.db.meta.ImmutableTableMeta
- All Implemented Interfaces:
TableMeta
@Generated(from="TableMeta",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableTableMeta
extends Object
implements TableMeta
Immutable implementation of
TableMeta.
Use the builder to create immutable instances:
ImmutableTableMeta.builder().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableTableMeta.Builderbuilder()Creates a builder forImmutableTableMeta.static ImmutableTableMetaCreates an immutable copy of aTableMetavalue.booleanThis instance is equal to all instances ofImmutableTableMetathat have equal attribute values.com.google.common.collect.ImmutableList<ColumnMeta> getCount()getName()inthashCode()Computes a hash code from attributes:name,isView,columns,count,comment.booleanisView()toString()Prints the immutable valueTableMetawith attribute values.final ImmutableTableMetawithColumns(Iterable<? extends ColumnMeta> elements) Copy the current immutable object with elements that replace the content ofcolumns.final ImmutableTableMetawithColumns(ColumnMeta... elements) Copy the current immutable object with elements that replace the content ofcolumns.final ImmutableTableMetawithComment(String value) Copy the current immutable object by setting a present value for the optionalcommentattribute.final ImmutableTableMetawithComment(Optional<String> optional) Copy the current immutable object by setting an optional value for thecommentattribute.final ImmutableTableMetawithCount(long value) Copy the current immutable object by setting a present value for the optionalcountattribute.final ImmutableTableMetaCopy the current immutable object by setting an optional value for thecountattribute.final ImmutableTableMetawithIsView(boolean value) Copy the current immutable object by setting a value for theisViewattribute.final ImmutableTableMetaCopy the current immutable object by setting a value for thenameattribute.Methods inherited from interface TableMeta
findColumn
-
Method Details
-
getName
-
isView
-
getColumns
- Specified by:
getColumnsin interfaceTableMeta- Returns:
- The value of the
columnsattribute
-
getCount
-
getComment
- Specified by:
getCommentin interfaceTableMeta- Returns:
- The value of the
commentattribute
-
withName
Copy the current immutable object by setting a value for thenameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for name- Returns:
- A modified copy or the
thisobject
-
withIsView
Copy the current immutable object by setting a value for theisViewattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for isView- Returns:
- A modified copy or the
thisobject
-
withColumns
Copy the current immutable object with elements that replace the content ofcolumns.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withColumns
Copy the current immutable object with elements that replace the content ofcolumns. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of columns elements to set- Returns:
- A modified copy or
thisif not changed
-
withCount
Copy the current immutable object by setting a present value for the optionalcountattribute.- Parameters:
value- The value for count- Returns:
- A modified copy or
thisif not changed
-
withCount
Copy the current immutable object by setting an optional value for thecountattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for count- Returns:
- A modified copy or
thisif not changed
-
withComment
Copy the current immutable object by setting a present value for the optionalcommentattribute.- Parameters:
value- The value for comment- Returns:
- A modified copy or
thisif not changed
-
withComment
Copy the current immutable object by setting an optional value for thecommentattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for comment- Returns:
- A modified copy or
thisif not changed
-
equals
-
hashCode
-
toString
-
copyOf
Creates an immutable copy of aTableMetavalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable TableMeta instance
-
builder
Creates a builder forImmutableTableMeta.ImmutableTableMeta.builder() .name(String) // required
name.isView(boolean) // requiredisView.addColumns|addAllColumns(org.nuiton.db.meta.ColumnMeta) //columnselements .count(Optional<Long>) // optionalcount.comment(Optional<String>) // optionalcomment.build();- Returns:
- A new ImmutableTableMeta builder
-