Package org.projectnessie.model
Class ImmutableSqlView
- java.lang.Object
-
- org.projectnessie.model.Content
-
- org.projectnessie.model.SqlView
-
- org.projectnessie.model.ImmutableSqlView
-
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableSqlView extends SqlView
Immutable implementation ofSqlView.Use the builder to create immutable instances:
ImmutableSqlView.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableSqlView.BuilderBuilds instances of typeImmutableSqlView.-
Nested classes/interfaces inherited from class org.projectnessie.model.SqlView
SqlView.Dialect
-
Nested classes/interfaces inherited from class org.projectnessie.model.Content
Content.Type
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableSqlView.Builderbuilder()Creates a builder forImmutableSqlView.static ImmutableSqlViewcopyOf(SqlView instance)Creates an immutable copy of aSqlViewvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableSqlViewthat have equal attribute values.SqlView.DialectgetDialect()StringgetId()Unique id for this object.StringgetSqlText()inthashCode()Computes a hash code from attributes:id,sqlText,dialect.StringtoString()Prints the immutable valueSqlViewwith attribute values.ImmutableSqlViewwithDialect(SqlView.Dialect value)Copy the current immutable object by setting a value for thedialectattribute.ImmutableSqlViewwithId(String value)Copy the current immutable object by setting a value for theidattribute.ImmutableSqlViewwithSqlText(String value)Copy the current immutable object by setting a value for thesqlTextattribute.
-
-
-
Method Detail
-
getId
public String getId()
Unique id for this object.This id is unique for the entire lifetime of this Content object and persists across renames. Two content objects with the same key will have different id.
-
getSqlText
public String getSqlText()
- Specified by:
getSqlTextin classSqlView- Returns:
- The value of the
sqlTextattribute
-
getDialect
public SqlView.Dialect getDialect()
- Specified by:
getDialectin classSqlView- Returns:
- The value of the
dialectattribute
-
withId
public final ImmutableSqlView withId(String value)
Copy the current immutable object by setting a value for theidattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for id- Returns:
- A modified copy of the
thisobject
-
withSqlText
public final ImmutableSqlView withSqlText(String value)
Copy the current immutable object by setting a value for thesqlTextattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for sqlText- Returns:
- A modified copy of the
thisobject
-
withDialect
public final ImmutableSqlView withDialect(SqlView.Dialect value)
Copy the current immutable object by setting a value for thedialectattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for dialect- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableSqlViewthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:id,sqlText,dialect.
-
toString
public String toString()
Prints the immutable valueSqlViewwith attribute values.
-
copyOf
public static ImmutableSqlView copyOf(SqlView instance)
Creates an immutable copy of aSqlViewvalue. 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 SqlView instance
-
builder
public static ImmutableSqlView.Builder builder()
Creates a builder forImmutableSqlView.ImmutableSqlView.builder() .id(String) // optionalid.sqlText(String) // requiredsqlText.dialect(org.projectnessie.model.SqlView.Dialect) // requireddialect.build();- Returns:
- A new ImmutableSqlView builder
-
-